umerijaz / microbiomeSeq

An R package for microbial community analysis in an environmental context
66 stars 26 forks source link

Comparing more than two groups for differential abundance using DESeq #31

Open ADGM opened 5 years ago

ADGM commented 5 years ago

Hi,

The grouping column I specified for doing the differential abundance analysis consists of three groups. I've learned that by using DESeq2 directly I can change the parameters to use LRT and indicate the contrast, so that the output results file will show the log2FC between these two groups.

I wanted the output from microbiomeSeq because of the plots; however, the results file, although named with the three groups, appears to show only the contrast between the first two groups, based on the groups shown in the "Upregulated" column. I would like to confirm with you what the log2fold change and p values reported in the output file pertain to, in this case where I input three groups to compare?

Also, would it be possible to add a parameter to change the test parameter (e.g., for LRT rather than Wald) and add contrasts for results reporting?

Thank you!

javiercnav commented 5 years ago

Hi there, I am coming with the same question. I am comparing three environments, and although in the deseq_sig I can see the calculations for log2base for each of them, the output file only shows the comparison for the first 2. Also, even though the plot clearly shows that the third environment has a significantly higher abundance for some taxa, the output file table indicates this "significant taxa" as upregulated in a different environment (either first or second). Any comments? thanks a lot

javiercnav commented 5 years ago

Coming back to this. As it happens with Deseq2 with more than two comparisons, MicrobiomeSeq is only yielding the output for the last two abundance comparisons. Perhaps it would be a good idea to add this to the documentation and indicate that only two categories should be compared at once, i.e. subset phyloseq object to contain only the variables or conditions to be compared in pairs. Also, perhaps add a way to see in MicrobiomeSeq which of the two conditions is the one being used as calibrator.