ChiLiubio / microeco

An R package for data analysis in microbial community ecology
GNU General Public License v3.0
202 stars 58 forks source link

different differential abundance methods and core? #207

Closed marwa38 closed 7 months ago

marwa38 commented 1 year ago

it is really a great package that I am enjoying. Thanks for all of tutorials. I ran different differential abundance analyses and tried to compare those different methods. Any possibility to include deseq2 and ANCOMBC2 (more powerful than ANCOM as mentioned by creators)?

It would be probably helpful if there could be microeco code to find the core (shared) for all/some of the differential abundance methods? ANCOMBC2 have this in their tutorial but can't do this for a microtable.

Thanks Marwa

ChiLiubio commented 1 year ago

Hi. Actually, the 'ANCOMBC' in the method parameter of trans_diff$new is implemented based on the ancombc2 function as you can see in the help document. 图片 DEseq2 and edgeR have not been integrated. Thanks for letting me know again. I will add them in the to-do list. I get your point to find the core diff features and have thought about it before. But I donot find a good way. I will consider it again.

Chi

marwa38 commented 1 year ago

Thanks so much, Chi

ChiLiubio commented 1 year ago

Hi. I updated the package in github yesterday and integrated the DESeq2 method in trans_diff. If you are interested in it, please reinstall the package v0.15.0 from github and have a try. It can be used to get the deseq result for all paired groups as other methods show.


rm(list = ls())
library(microeco)
data(sample_info_16S)
data(otu_table_16S)
data(taxonomy_table_16S)
data(phylo_tree_16S)
data(env_data_16S)
# set.seed is used to fix the random number generation to make the results repeatable
set.seed(123)
dataset <- microtable$new(sample_table = sample_info_16S, otu_table = otu_table_16S, tax_table = taxonomy_table_16S, phylo_tree = phylo_tree_16S)
dataset$tidy_dataset()
t1 <- trans_diff$new(dataset = dataset, method = "DESeq2", group = "Group", taxa_level = "OTU", filter_thres = 0.001)
View(t1$res_diff)
``
The visualization functions will be available for DESeq2 in the next coming days.
ChiLiubio commented 1 year ago

One more thing is that in v0.15.0 I rename 'ANCOMBC' option to 'ancombc2' because I think it is more clear to convey which function is implemented.

marwa38 commented 1 year ago

Please keep me updated regarding the core/shared :) Thanks, Chi Might be helpful https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0157022 for DESeq2 and edgeR