Ancom differential analysis

I do have 5 columns in metadata file: SampleID, Tissue (soil, root, shoot), Treatment (T1, T2, T3), Village and Region for all sample.

there are 3 tissue: soil, root and leaf.

I wanted to see differential abundance in all soil sample. I think I am making error in giving --P-where parameter, could you please suggest How should I correct it.

I used below command to filter and further process:

[qiime2_16s_analysis]$ qiime feature-table filter-samples --i-table table.qza --m-metadata-file metadata3.tsv --p-where “Tissue=‘Soil’” --o-filtered-table Soil-table.qza

Saved FeatureTable[Frequency] to: Soil-table.qza

qiime2_16s_analysis]$ qiime composition add-pseudocount --i-table Soil-table.qza --o-composition-table com-Soil-table.qza
Saved FeatureTable[Composition] to: com-Soil-table.qza

[qiime2_16s_analysis]$ qiime composition ancom --i-table com-Soil-table.qza --m-metadata-file metadata3.tsv --m-metadata-column Tissue --o-visualization ancom-Soil.qzv
Plugin error from composition:

All values the grouping are the same. This method cannot operate on a grouping vector with only a single group of samples(e.g., there are no ‘between’ variance because there is only a single group).

Debug info has been saved to /tmp/qiime2-q2cli-err-hvbdjtm7.log

Thanks

This error means you don’t have multiple values in the Tissue column. This makes sense, since in an earlier step, you filtered your table to only include Tissue='Soil' samples. How can you compare tissue types when you only have one type? Options include filtering your table on some other column, or computing ancom on another column.

Hi @thermokarst,

I have given three different treatment to soil sample, so I wanted to see how T1, T2 and T3 treatment affect the microbial diversity in soil. Like this I want to repeat for root and leaf.

should I use OR to add it like this:

“Tissue=‘Soil’ OR Treatment=‘Yes’”

Thanks

No.

If you want to see how the treatment impacted differential abundance across the samples in the filtered table, specify the Treatment column when running ancom, not the Tissue column.

So:

qiime composition ancom \
  --i-table com-Soil-table.qza \
  --m-metadata-file metadata3.tsv \
  --m-metadata-column Treatment \
  --o-visualization ancom-Soil.qzv

Thank you very much @thermokarst.
Now I understand it.

1 Like

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