Converting .biom files and replacing metadata

There’s no “remove metadata” command for the .biom files, so what I’ve been doing is converting to Classic OTU tables (and pulling down taxonomy information in this conversion), and then converting *back* to .biom to add the new set of metadata: -i /Users/hollybik/Dropbox/Projects/Visualization/Test\ data\ from\ Greg/biom_for_holly/global-gut/study_850_closed_reference_otu_table_w_sample_md.biom -o /Users/hollybik/Dropbox/Projects/Visualization/Test\ data\ from\ Greg/biom_for_holly/global-gut/study_850_closed_reference_otu_table_classic.txt --biom_to_classic_table --header_key taxonomy

Then I went in and edited the sample mapping file (to condense the metadata to only relevant columns for visualization). Then re-convert the classic OTU table to .biom using the new condensed metadata mapping file: -i /Users/hollybik/Dropbox/Projects/Visualization/Test\ data\ from\ Greg/biom_for_holly/global-gut/study_850
_closed_reference_otu_table_classic.txt -o /Users/hollybik/Dropbox/Projects/Visualization/Test\ data\ from\ Greg/biom_for_holly/global-gut/study_850_closed_reference_otu_table_condensed_metadata.biom -m /Users/hollybik/Dropbox/Projects/Visualization/Test\ data\ from\ Greg/biom_for_holly/global-gut/study_850_mapping_file_condensed_metadata.txt --biom_table_type="otu table"

Also converting my published Deepsea data and GOM data into new .biom files

First, Rename “Consensus Lineage” final column to “taxonomy” – Next, run command: -i /Users/hollybik/Dropbox/Projects/Visualization/my_test_data/Deepsea_OTUtable_uclust99_F04NF1.txt -o /Users/hollybik/Dropbox/Projects/Visualization/my_test_data/Deepsea_OTUtable_uclust99_F04NF1.biom --process_obs_metadata taxonomy -m /Users/hollybik/Dropbox/Projects/Visualization/my_test_data/QIIMEmappingfile_Deepsea_MASTER.txt --biom_table_type="otu table"

However, there are a few problems with this conversion:

  1. Taxonomy strings are the old comma-delimited version. They aren’t separated by the new k__;p__;c__;o__;f__;g__;s__ delimiters
  2. I can’t figure out if the sample names (OTU table column headers got pulled through). It doesn’t look like they did, only the ¬†QIIME mapping file info got pasted in at the bottom. Maybe I’m wrong about this, it was just based on a quick glance through the .biom table

So what I think I’ll do for these data:

  1. Re-run taxonomy assignment using new SILVA database and RDP classifier. This will put the taxonomy strings in the correct format
  2. Just construct a new .biom table from the OTU mapping file and taxonomy assignments, instead of trying to convert old classic OTU tables into .biom files.

Adding metadata to .biom files

You can do this within QIIME (e.g. after initializing macqiime). The documentation has been changing on the website, but QIIME 1.7 should use the following command structure: -i /Users/hollybik/Downloads/otu_table_mc2_w_tax_no_pynast_failures.biom.txt  -o /Users/hollybik/Downloads/otu_table_mc2_w_tax_no_pynast_failures.biom_metadataMiXScompliant.txt -m /Users/hollybik/Dropbox/Visualization/AquariumSampleMap8_MiXScompliant.txt