ANCOM Analysis with Filtered FeatureTable

I have a file genus-table.qza which is of type FeatureTable[Frequency]. I want to investigate differentially abundant OTUs using ANCOM. So first I convert to a frequency and add a pseudo count of 1:

qiime composition add-pseudocount
  --i-table taxonomy/genus-table.qza
  --o-composition-table comp-gut-table-level6.qza

I can now check for differentially abundant OTUs like this, for example I can compare male vs female study participants:

qiime composition ancom \
  --i-table comp-gut-table-level6.qza \
  --m-metadata-file manifest.tsv \
  --m-metadata-column sex \
  --o-visualization ancom-subject-level6.qzv

Now I want to compare users vs non-users only among female study participants. So first I subset by sex:

qiime feature-table filter-samples \
  --i-table comp-gut-table-level6.qza \
  --m-metadata-file manifest.tsv \
  --p-where "sex='F'" \
  --o-filtered-table fltrd_composition_genus_table_female.qza

But now I have a problem. fltrd_composition_genus_table_female.qza contains only the female study participants as desired, but the manifest.tsv with the metadata does not reflect this!

  • Am I supposed to manually filter the manifest.tsv?
  • Or does qiime2 understand how to match manifest.tsv onto the filtered fltrd_composition_genus_table_female.qza?

Hi @neocat,
qiime2 understands how to match your metadata to the filtered table. You should be good to run ancom!

Hope that helps!

1 Like

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