DADA2 taxonomy change ids

In the DADA2 table file, instead of the feature id we would like to have the taxon_id as shown in the visual taxonomy file. Is there a Qiime command to do so?

For example we would like to change the following
000d25c40a3a59722cc6a38cb32908b7

to
d__Bacteria; p__Firmicutes; c__Clostridia; o__Lachnospirales; f__Lachnospiraceae; g__Howardella

The result would be a DADA2 table or .qza object with the taxononmy information instead of the ID
Thanks Shuan.

1 Like

Hi @shuanqiime, welcome to :qiime2:!

The best way to do this would be to run:

qiime taxa collapse \
    --i-table feature-table.qza \
    --i-taxonomy taxonomy.qza \
    --p-level 7 \
     --o-collapsed-table feature-table-L7.qza

:warning: Keep in mind that you can have many features with identical taxonomy assignments. So, this command will essentially merge together all features sharing the same taxonomy together as one unit. The values in the table will be the sum of all those individual features that were combined under that taxonomy.

4 Likes

That was great! Thanks so much. Your solution worked.

1 Like

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