Please, to see a description of the problem with the code highlighted and files to reproduce it go
here, although I paste it below and attach the files for completeness in this message. I forgot to mention that the file was generated with the PiCRUST script
predict_metagenomes.py:
I'm trying to use **filter_otus_from_otu_table.py** and **filter_samples_from_otu_table.py** with no success. The three files needed to reproduce the issues are [test2git.zip](
https://github.com/biocore/qiime/files/1419249/test2git.zip).
If I start trying to filter with a file containing just one observation (contained in prueba.txt) it works:
`$ filter_otus_from_otu_table.py -i otu.2test.metagenomes.biom -o otu.metagenomes.prueba.biom -e prueba.txt --negate_ids_to_exclude`
But if want to get two observations (file prueba2.txt):
`$ filter_otus_from_otu_table.py -i otu.2test.metagenomes.biom -o otu.metagenomes.prueba.biom -e prueba2.txt --negate_ids_to_exclude`
It doesn't work, and it returns: `TypeError: Object dtype dtype('O') has no native HDF5 equivalent`
The same happens if I use again the list with one observation (first example) but I do not include the option `--negate_ids_to_exclude`, so it has problems when multiple observations/samples should be filtered but not with one. The error is also reproduced if I use directly biom:
`$ biom subset-table -i otu.2test.metagenomes.biom -a observation -s prueba2.txt -o otu.2test.metagenomes.prueba.biom`
Following this issue in [biom-format (#513)](
https://github.com/biocore/biom-format/issues/513), it suggests that it may be a problem with the metadata. If try to convert to json:
`$ biom convert -i otu.2test.metagenomes.biom -o otu.2test.metagenomes.json.biom --table-type="OTU table" --to-json`
I get this error `TypeError: array([u'["cathepsin L [EC:3.4.22.15]"]'], dtype=object) is not JSON serializable`. And if I try to convert it to hdf5 with the suggested option `--collapsed-samples`:
`$ biom convert -i otu.2test.metagenomes.biom -o otu.2test.metagenomes.hdf5.biom --table-type="OTU table" --to-hdf5 --collapsed-samples`
I get `TypeError: Object dtype dtype('O') has no native HDF5 equivalent`. Please note that I controlled that the solutions to this bug ([#759](
https://github.com/biocore/biom-format/pull/759)) were incorporated in my code. If it helps, I found a similar issue in the project [CellProfiler (#995)](
https://github.com/CellProfiler/CellProfiler/issues/995)