Closed fjmob closed 8 years ago
Hi Flora,
I recommend converting the BIOM files and adding metadata in QIIME 1.8 (if you use Macqiime on a laptop this is as simple as switching the root macqiime folders to change versions of QIIME). Conversion in QIIME 1.9 seems to be generally problematic for many people, although you might want to have a look through the BIOM documentation to see if there is a flag you're missing to retain the JSON format: http://biom-format.org/documentation/adding_metadata.html
Hope you can find a workaround!
Holly
Hi Holly,
Thanks for replying! I have tried with versions 1.8 and 1.6 but both are producing hdf5 files... will keep trying!
Using any new version of qiime or the biom-format
package, you can convert the HDF5 tables into the old JSON format. This works in qiime 1.9.1:
biom convert -i otu_table.biom -o otu_table_json.biom --table-type="OTU table" --to-json
Yeah I've done that, but it doesn't seem to work after the metadata has been added... is there a way of keeping the metadata when converting to json?
Strange. That command kept all my taxonomy and metadata. Are you sure that you have added the metadata to your input file when it was in the HDF5 format? Also, what version of biom-format are you using?
Actually I've just realised it must have been a problem with the metadata file - I'd been using a .txt file, but it worked when I used the tab-delim version of it. Sorry for the confusion!
Glad you found this! It's great to get stuff like this working.
I think this issue could be closed: the current version of biom-format
does keep the format while adding metadata. Issues with biom
could also be tracked in that repo with issues like biocore/biom-format#695
Cheers!
Agree - closing this issue!
Hi,
I have been trying to add metadata to my biom file in MacQIIME v1.9.1. I converted the biom file to json, then added the metadata- but the output file has been converted back to an hdf5 file. I tried converting this back to json, but it seems to have lost the metadata file/returns error messages :(
Here's my script:
biom convert -i otu_table_rarefied204864_Lachnospiraceae-Clostridium_removed.biom -o otu_rare_json.biom --table-type="OTU table" --to-json
biom add-metadata -i otu_rare_json.biom -o OTU_JSON_with_meta.biom --observation-metadata-fp qiime_metadata_new.txt --observation-header SampleID,BarcodeSequence,LinkerPrimerSequence,Treatment,Bulk_or_Rhizo,TimePoint,Description --sc-separated taxonomy
Any tips?
Thanks, Flora