biocore / biom-format

The Biological Observation Matrix (BIOM) Format Project
http://biom-format.org
Other
89 stars 95 forks source link

Conversion from hdf5 to json fails on int64´s #886

Closed thomasstjerne closed 1 year ago

thomasstjerne commented 1 year ago

biom convert -i input_hdf5_data_biom.biom -o table_from_hdf5_json.biom --to-json Fails with TypeError: Object of type int64 is not JSON serializable

wasade commented 1 year ago

Hi @thomasstjerne, that's surprising -- how was the HDF5 biom table created?

thomasstjerne commented 1 year ago

Actually I don´t really know - but the file I was trying to convert is available here: https://doi.plutof.ut.ee/doi/10.15156/BIO/2263453

wasade commented 1 year ago

While we probably should do type casting for the conversion to capture this edge case, which I'm guessing was produced by some other implementation of the format, I do really recommend just using the 2.1 format spec. The HDF5 format is so much better than the JSON representation.