Exporting feature table with taxonomy added not working

Hello!

I am a newbie on the qiime2 world and I am having isues exporting the feature table with the taxonomy annotations added for my data. I have followed the Exporting and modifying BIOM tables (e.g. adding taxonomy annotations) tutorial, and have tried some other codes/ suggestions made on the forum, but nothing has worked. If anyone can point out what I could be doing wrong, or if there is any other way to export the OTU table with its taxonomy, it will be appreciated!

For reference I am using (Qiime 2022.2) on Jupyter notebook.

The resulting table looks like this:

Following the tutorial I changed the biom-taxonomy header to look like:

Latest code used:

%%bash
qiime tools export \
--input-path taxonomy-250.qza \
--output-path export_Run5_250_dir/tax 

%%bash
qiime tools export \
--input-path table-250-dada2.qza \
--output-path export_Run5_250_dir/tables

cp tax/taxonomy.tsv biom-taxonomy.tsv

%%bash
biom add-metadata \
--input-fp tables/feature-table.biom \
-o table-with-taxonomy-250-2.biom \
--observation-metadata-fp biom-taxonomy.tsv \
--observation-header "taxonomy" \
--sc-separated taxonomy

%%bash
biom convert \
-i table-with-taxonomy-250-2.biom \
-o otu-table.250-from_biom-2.tsv \
--to-tsv

You are so close! Your final command is just missing one argument.

See this example from the biom docs.

biom convert -i table.biom -o table.from_biom_w_taxonomy.txt --to-tsv --header-key taxonomy

That should add the taxonomy info as a final column to your output tsv file.

P.S. Welcome to the forums! :qiime2:

1 Like

Hello Colin!

Thank you so much for your suggestion!! It worked!

1 Like