Is it normal for a column filtered by q-value in ANCOMBC have all the same number? How does ANCOMBC deals with NA values?

Hey guys,

I have just run ANCOMBC through conda in qiime2-2023.5

qiime taxa collapse
--i-table table-dada2.qza
--i-taxonomy taxonomy.qza
--p-level 6
--o-collapsed-table genus.qza

#Generate ancombc:

qiime composition ancombc
--i-table genus.qza
--m-metadata-file sample-metadata.tsv
--p-formula SampleName
--p-p-adj-method fdr
--o-differentials ancombc-fdr-adjusted.qza

qiime composition tabulate
--i-data ancombc-fdr-adjusted.qza
--o-visualization ancombc-fdr-adjusted.qzv

But then when I checked the qzv file in the q_val column ALL values in the column SampleNameMD look exactly the same, while the intercept varies. Is it normal or is it something wrong? As for the other columns (lfc, p_val etc) are all ok.

I wonder if there is anything to do with the fact that I used "NA" on empty lines of the column I am using. Does ANCOMBC deals well with this or is it necessary to filter the empty values out from both the feature table and metadata files and run them again?

EDIT: I filtered the feature table/metadata instead of just putting NAs in empty values with another dataset in which the same was happening and the q-values weren't all the same anymore. It solved the problem.

image

Thank you in advance.

Hey @Liviacmg,

Good job on working things out. You're right that the NA was being treated as a "reasonable" value. So filtering on them would work.

As far as why Q-values often look like they are the same value, it's because of the 3rd step of the FDR-correction procedure:

which keeps the original ranks of the adjusted p-values. You can end up with whole segments which "inherit" the last-ranked q-value wherever the rank of q-values start decreasing despite the rank of p-values increasing.

It just tends to look especially odd when every test is failing to reject the null by about the same amount.

3 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.