Collapse all 7 taxonomic levels at once

Hi,
I’m a new QIIME2 user, I am trying to get the OTU table of relative abundances for all 7 levels at once but as I understood, the qiime taxa collapse script outputs a table for only one given level (passed into arguments), is there any other scripts that does the job for all taxonomic levels at once ?

Thanks for your reply.

Welcome @Gabriel_Pires!

There is no single command, but it would be relatively easy to use a loop, e.g., in bash to collapse at each level. Something like this:

for i in {1..7}
do
qiime taxa collapse \
    --i-table table.qza \
    --i-taxonomy taxonomy.qza \
    --p-level $i \
    --o-collapsed-table table-L$i.qza
done

If you really want all of them in one table, use “merge” to merge them.

Good luck!

Ok, thank you for your quick answer. Does this kind of analysis (per taxonomic level) is recommended ? Or should we just take into consideration the 7th level, i.e species level ?
If I recall well, QIIME1 did gave the OTU tables with all 7 taxonomic levels and their relative abundances at once !?

In my opinion, no, looking at each taxonomic level is not necessarily valuable.

But it depends entirely on your question, of course! In my opinion it is most informative to look at ASV and species levels, perhaps also genus/family (again depending on your question).

I would let this be guided by a specific hypothesis, e.g., are you actually interested in genus/family level differences? Looking at higher levels, e.g., phylum, may not be suitable unless if you have a focused question, as discussed here:

Times have changed I suppose — the analyses that developers deemed useful in the design of qiime 1 (a decade ago!) are not all state of the art in 2020. That is not to say that it is wrong per se, just that the field has evolved and it is recognized that, e.g., phylum-level information is often not revealing... and ASV-level analyses are now possible.

1 Like

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