Biom add-metadata

547 views
Skip to first unread message

Liam Shaw

unread,
Apr 6, 2016, 9:05:46 AM4/6/16
to Qiime 1 Forum
Hi,

I'm not able to replicate the biom add-metadata tutorial here (http://biom-format.org/documentation/adding_metadata.html). 

The command 

biom add-metadata -i min_sparse_otu_table.biom -o table.w_omd.biom --observation-metadata-fp obs_md.txt

doesn't return an error. However, the table generated apparently contains no metadata. The output of biom summarize-table -i table.w_omd.biom is

Num samples: 6

Num observations: 5

Total count: 27

Table density (fraction of non-zero values): 0.500


Counts/sample summary:

 Min: 3.0

 Max: 7.0

 Median: 4.000

 Mean: 4.500

 Std. dev.: 1.500

 Sample Metadata Categories: None provided

 Observation Metadata Categories: None provided


Counts/sample detail:

Sample5: 3.0

Sample2: 3.0

Sample6: 4.0

Sample3: 4.0

Sample4: 6.0

Sample1: 7.0


i.e. no metadata seems to have been added. I've tried a number of combinations of converting between json/hdf5/tsv and nothing seems to work.  


What's gone wrong?


System information below.

Thanks,
Liam


System information

==================

         Platform: darwin

   Python version: 2.7.10 |Anaconda 2.2.0 (x86_64)| (default, May 28 2015, 17:04:42)  [GCC 4.2.1 (Apple Inc. build 5577)]

Python executable: /macqiime/anaconda/bin/python


QIIME default reference information

===================================

For details on what files are used as QIIME's default references, see here:

 https://github.com/biocore/qiime-default-reference/releases/tag/0.1.2


Dependency versions

===================

          QIIME library version: 1.9.1

           QIIME script version: 1.9.1

qiime-default-reference version: 0.1.2

                  NumPy version: 1.11.0

                  SciPy version: 0.17.0

                 pandas version: 0.16.1

             matplotlib version: 1.4.3

            biom-format version: 2.1.5

                   h5py version: 2.4.0 (HDF5 version: 1.8.14)

                   qcli version: 0.1.1

                   pyqi version: 0.3.2

             scikit-bio version: 0.2.3

                 PyNAST version: 1.2.2

                Emperor version: 0.9.51

                burrito version: 0.9.1

       burrito-fillings version: 0.1.1

              sortmerna version: SortMeRNA version 2.0, 29/11/2014

              sumaclust version: SUMACLUST Version 1.0.00

                  swarm version: Swarm 1.2.19 [Jun  2 2015 14:40:16]

                          gdata: Installed.


QIIME config values

===================

For definitions of these settings and to learn how to configure QIIME, see here:

 http://qiime.org/install/qiime_config.html

 http://qiime.org/tutorials/parallel_qiime.html


                     blastmat_dir: None

      pick_otus_reference_seqs_fp: /macqiime/anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta

                         sc_queue: all.q

      topiaryexplorer_project_dir: None

     pynast_template_alignment_fp: /macqiime/anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set_aligned/85_otus.pynast.fasta

                  cluster_jobs_fp: start_parallel_jobs.py

pynast_template_alignment_blastdb: None

assign_taxonomy_reference_seqs_fp: /macqiime/anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta

                     torque_queue: friendlyq

                    jobs_to_start: 1

                       slurm_time: None

            denoiser_min_per_core: 50

assign_taxonomy_id_to_taxonomy_fp: /macqiime/anaconda/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt

                         temp_dir: /tmp/

                     slurm_memory: None

                      slurm_queue: None

                      blastall_fp: blastall

                 seconds_to_sleep: 60



min_sparse_otu_table.biom
obs_md.txt

jonsan

unread,
Apr 6, 2016, 11:10:17 AM4/6/16
to Qiime 1 Forum
Hi Liam, 

The problem lies in the field separation in the metadata file. It's got spaces between fields, but it needs to be tab separated. Try it with the attached. 

Cheers,
-jon
obs_md_tab.txt

Liam Shaw

unread,
Apr 6, 2016, 11:19:18 AM4/6/16
to Qiime 1 Forum
Hi Jon,

Works perfectly, thanks very much!

Cheers,
Liam
Reply all
Reply to author
Forward
0 new messages