Output counts and taxonomy to biom

Hello,
I want to convert te biom to tsv and output the confidence info and I try:
biom add-metadata -i ./feature-table.biom -o table-with-taxonomy.biom \
–observation-metadata-fp biom-taxonomy.tsv --sc-separated taxonomy,confidence
biom convert -i table-with-taxonomy.biom -o table-with-taxonomy.tsv --to-tsv --header-key taxonomy,confidence

But it did not work.

And only outputing the taxonomy did work well:
biom add-metadata -i ./feature-table.biom -o table-with-taxonomy.biom \
–observation-metadata-fp biom-taxonomy.tsv --sc-separated taxonomy
biom convert -i table-with-taxonomy.biom -o table-with-taxonomy.tsv --to-tsv --header-key taxonomy

Thanks!

1 Like

Good morning!

You are very close!

Take a look at this line from the biom conversion documentation:

Because the BIOM format can support an arbitrary number of observation (or sample) metadata entries, and the classic format can support only a single observation metadata entry, you must specify which of the observation metadata entries you want to include in the output table:

You can’t output two at a time. :crying_cat_face:
--to-tsv --header-key taxonomy,confidence

But you can run that second command with the other metadata:
--header-key confidence

Colin

1 Like