BIOM file Validation, QIIME1 vs QIIME2

My biom files were validated using http://biom-format.org package.

With QIIME1, I have a valid biom file but with (same data) QIIME2 exported (qiime tools export) invalid biom file!

A) otu_table.biom obtained with QIIME1.9

$biom validate-table -i otu_table.biom

The input file is a valid BIOM-formatted file.

B) feature-table.biom obtained with QIIME2-2017.4

$biom validate-table -i feature-table.biom

Unknown BIOM type:
The input file is not a valid BIOM-formatted file.

Why this difference?

Sincerely,
Ashok

Hey @adinasarapu,

That does seem strange, but itā€™s possible you have an older BIOM package that isnā€™t aware of BIOM file-format 2.1.

What environment are you running these commands in? QIIME 1 or QIIME 2?

For both environments, could you provide the following:

  • What does which biom say?
  • What does python -c "import biom; print(biom.__version__)" say?

Additionally:

  • Can you also run file otu_table.biom and file feature-table.biom to see what the underlying formats are (e.g. JSON or HDF5), what does it say?

Thanks!

2 Likes

I have the following output

$which biom
~/anaconda2/envs/qiime2-2017.4/bin/biom

$python -c "import biom; print(biom.__version__)"
2.1.5

QIIME2

$file feature-table.biom
feature-table.biom: Hierarchical Data Format (version 5) data

$biom validate-table -i feature-table.biom
Unknown BIOM type:
The input file is not a valid BIOM-formatted file.

QIIME1

$file otu_table.biom
otu_table.biom: Hierarchical Data Format (version 5) data

$biom validate-table -i otu_table.biom
The input file is a valid BIOM-formatted file.

1 Like

Thanks @adinasarapu!

Would you be able to share feature-table.biom? Everything looks fine from the outside. QIIME 2 uses the biom API directly so Iā€™m very uncertain how we would have ended up with an ā€œinvalidā€ file. (I wonder if the file became corrupted on disk during write somehow.)

@wasade, have you seen anything like this before?

@ebolyen, I havenā€™t, sorry. Iā€™d be very curious to see the feature-table.biom file though. Note that --detailed-report can be passed to biom validate-table to get more specific information about what is invalid

3 Likes

$biom validate-table --detailed-report -i feature-table.biom
Validating BIOM tableā€¦
Validating ā€˜format-urlā€™ā€¦
Validating ā€˜format-versionā€™ā€¦
Validating ā€˜typeā€™ā€¦
Unknown BIOM type:
Validating ā€˜shapeā€™ā€¦
Validating ā€˜nnzā€™ā€¦
Validating ā€˜generated-byā€™ā€¦
Validating ā€˜idā€™ā€¦
Validating ā€˜creation-dateā€™ā€¦
Validating ā€˜shapeā€™ versus number of samples and observationsā€¦
The input file is not a valid BIOM-formatted file.

1 Like

Thanks! What is the provenance of the QIIME2 feature_table.biom? That is technically out of spec ā€“ thank you for catching it ā€“ but Iā€™m not aware of any downstream tool which actually leverages that format attribute.

@ebolyen, my guess is type is not being passed to biom.Table somewhere.

2 Likes

It looks like we donā€™t set it at all. In later releases of BIOM it looks like there is a special codepath for "" which will give you:

Unknown table type, however that is likely okay.

Which seems fine for now since there isnā€™t really a good table type for QIIME 2 here.

1 Like

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