Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to calculate diff_analysis with less than 5 sample per group ? #113

Open
UpalabdhaD opened this issue Dec 22, 2023 · 2 comments
Open

Comments

@UpalabdhaD
Copy link

Hi ,
I was interesented in calculating diff analysis. My dataset include 6 sample, 3 per group.

So i was wondering is it possible to run diff analysis for less than 5 sample per group ?

  • When I run diff_analysis:
diff_analysis(obj = rf_pseq_obj, classgroup = "Status",
                       mlfun = "lda",
                       filtermod = "pvalue",
                       firstcomfun = "kruskal_test",
                       firstalpha = 0.05,
                       strictmod = TRUE,
                       secondcomfun = "wilcox_test",
                       subclmin = 3,
                       subclwilc = TRUE,
                       secondalpha = 0.01,
                       lda=3)
  • got the following error:
Error: The sample number of each groups is smaller than 5.
Traceback:

1. diff_analysis(obj = rf_pseq_obj, classgroup = "Status", mlfun = "lda", 
 .     filtermod = "pvalue", firstcomfun = "kruskal_test", firstalpha = 0.05, 
 .     strictmod = TRUE, secondcomfun = "wilcox_test", subclmin = 3, 
 .     subclwilc = TRUE, secondalpha = 0.01, lda = 3)
2. diff_analysis.phyloseq(obj = rf_pseq_obj, classgroup = "Status", 
 .     mlfun = "lda", filtermod = "pvalue", firstcomfun = "kruskal_test", 
 .     firstalpha = 0.05, strictmod = TRUE, secondcomfun = "wilcox_test", 
 .     subclmin = 3, subclwilc = TRUE, secondalpha = 0.01, lda = 3)
3. diff_analysis.data.frame(obj = otuda, sampleda = sampleda, taxda = taxda, 
 .     ...)
4. diffclass(datasample = datameta, features = varsfirst, comclass = compareclass, 
 .     classgroup = classgroup, fcfun = fcfun, secondcomfun = secondcomfun, 
 .     classmin = clmin, clwilc = clwilc, pfold = secondalpha, ...)
5. get_gfc_wilc(datasample = datatmp, fun1 = fcfun, classlevelsnum = clsize, 
 .     vars = features, classname = classgroup, minnum = classmin, 
 .     fun2 = secondcomfun, wilc = clwilc, ...)
6. stop_wrap("The sample number of each groups is smaller than ", 
 .     minnum, ".")
7. stop(msg, call. = FALSE)

Thanks in advance

@jianlingfan
Copy link

I have the same probelm. Have you solved it?

@xiangpin
Copy link
Member

please check whether each group's sample number is smaller than the clmin argument. PS: We suggest using mp_diff_analysis to replace diff_analysis, you can refer to the vignettes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants