nhanhocu / metamicrobiomeR

An R package for analysis of microbiome relative abundance data using zero inflated beta GAMLSS and meta-analysis across microbiome studies using random effects models
https://github.com/nhanhocu/metamicrobiomeR
33 stars 11 forks source link

Format of input data for alpha.compare and pathway.compare #6

Open AliceDXYu opened 4 years ago

AliceDXYu commented 4 years ago

I am able to run taxa.compare after formatting our dataset like your input data "taxtab.rm7". Thank you! But I can't find the input data for alpha.compare (alpha.rm) and pathway.compare (kegg.rm). Could you please upload them as our examples for learning purposes? Thank you.

nhanhocu commented 4 years ago

Hi, Thank you for trying out our package. If you use github version of the package, you can follow the examples for alpha.compare in readme. If you use R cran version of the package, there is some minor modification to example data and corresponding code. You can follow the examples for alpha.compare for R cran version:

data(alphadat) data(covar.rm) covar.rm$sampleid<-tolower(covar.rm$sampleid) alphacom <- alpha.compare(datlist=alphadat, depth=3, mapfile=covar.rm, mapsampleid="sampleid", comvar="gender", adjustvar=c("age.sample","bf"), longitudinal="yes", age.limit=6, standardize=TRUE)

Please feel free to let me know if there is further issue or if you have more question. Thanks, Nhan

AliceDXYu commented 4 years ago

When I tried the pathway.compare, pathway.compare(pathtab=kegg, mapfile=metadata, sampleid="sampleid", pathsum="rel", stat.med="gamlss", comvar="x", adjustvar=c("age.sample"), personid = "personid", percent.filter=0.05,relabund.filter=0.00005, p.adjust.method="fdr") I got: Error in lm.wfit(X, wv, wt * w, method = "qr") : 0 (non-NA) cases Error in model fit, NA introduced. Based on your experience, what may be wrong? The kegg file is a list of datasets with abundance of KEGG modules and pathways. Thanks!

nhanhocu commented 4 years ago

Dear Alice, Thanks for trying the package and for your email. You can take a look at the example dataset and code in examples and vignettes of the r cran version. If you have a small sample size and do longitudinal=yes, it may return errors. If that is the case you can try longitudinal=no and do analysis like non-longitudinal data. Please feel free to let me know if you have further question. Thanks. Nhan

On Thursday, February 27, 2020, AliceDXYu notifications@github.com wrote:

When I tried the pathway.compare, pathway.compare(pathtab=kegg, mapfile=metadata, sampleid="sampleid", pathsum="rel", stat.med="gamlss", comvar="x", adjustvar=c("age.sample"), personid = "personid", percent.filter=0.05,relabund.filter=0.00005, p.adjust.method="fdr") I got: Error in lm.wfit(X, wv, wt * w, method = "qr") : 0 (non-NA) cases Error in model fit, NA introduced. Based on your experience, what may be wrong? The kegg file is a list of datasets with abundance of KEGG modules and pathways. Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nhanhocu/metamicrobiomeR/issues/6?email_source=notifications&email_token=AIGB6KU6SEGPBGYRT6NPIVDRE3WZ3A5CNFSM4IYD5RM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENCGKHQ#issuecomment-591684894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIGB6KQXCPVJXHFWNBVMSLTRE3WZ3ANCNFSM4IYD5RMQ .