.biom to .tsv is losing per-sample data from FeatureTable[Frequency]

.biom to .tsv is losing per-sample data from FeatureTable[Frequency]

Hi! I'm trying to export my .qza files so that I can use some other analysis tools in R, and for some reason, it looks like I'm losing my per-sample frequency data at some point during the conversion. Can someone check my work and see where I might have gone wrong? For some reason, I can't find another forum post discussing this issue.

  • QIIME2 version 2025.7 (can't update because of HPC permissions)
  • biom version 2.1.16

Here's what my final "feature-table.tsv" looks like:

Here's my code:

# Export feature table from a .qza to .biom
qiime tools export \
  --input-path q2output_qzaformat/table-dada2-filtered3.qza \
  --output-path q2export/table

# Convert the feature table.biom to a .tsv
biom convert \
  -i q2export/table/feature-table.biom \
  -o q2export/table/feature-table.tsv \
  --to-tsv

As far as I can tell, my conversion steps are the same ones outlined by Converting between file formats — biom-format.org and this post from 2018.

Here are the troubleshooting steps I've done so far:

  1. Check to make sure my feature table is in the correct file type from QIIME2: :white_check_mark:
qiime tools peek q2output_qzaformat/table-dada2-filtered3.qza

  1. Turn my .qza into a .qzv to make sure the data looks like it does in the Moving Pictures tutorial: :white_check_mark:
qiime feature-table summarize \
  --i-table q2output_qzaformat/table-dada2-filtered3.qza \
  --o-visualization table.qzv \
  --m-sample-metadata-file meta/MM_meta_8.tsv

Check .biom contents to make sure all samples are accounted for: :white_check_mark:

biom summarize-table -i q2export/table/feature-table.biom

Check to see if the .biom format is correct: :double_exclamation_mark:

biom validate-table -i q2export/table/feature-table.biom

image

It seems to me like the .biom is in the wrong format. How do I put it into the correct format?

Thank you in advance!

Hi @Emma_Gardner, Your workflow seems fine to me - I tested it on a feature table I have locally, and it worked ok, so I'm not sure what's going on there.

Do you need the biom tsv format specifically, or just a tsv containing the data? If the latter, you should be able to run this in your QIIME 2 environment to get that (just change the filename to adapt for your input/output file names).

python -c "import qiime2; qiime2.Artifact.load('table.qza').view(qiime2.Metadata).save('table.tsv')"

The resulting file will have samples as rows and features as columns.

1 Like