pipeline understanding from assign_taxonomy.py to biom add-metadata

42 views
Skip to first unread message

Guerrino Macori

unread,
Mar 18, 2017, 8:16:06 AM3/18/17
to Qiime 1 Forum
Hello Qiime users,
I would like to ask you a clarification about the command and the output of the following stage of the pipeline.

In order to assign the taxonomy to each sequence I used this command:

assign_taxonomy.py -i FILE.fasta -r 97_otus.fasta -t 97_otu_taxonomy.txt 


That generates the following files:


FILE_tax_assignments.log

FILE_tax_assignments.txt


Now, I would like to generate the final.biom but, using the following command:


biom add-metadata -i FILE_tax_assignments.txt -o final.biom -m FILE_Map.txt 


I'm receiving an error:


ValueError: could not convert string to float: Unassigned


I converted the file in biom as well but with the same kind of error. Can somebody explain me better what's the error in the command please?

Thanks in advance!


Daniel McDonald

unread,
Mar 20, 2017, 12:29:58 PM3/20/17
to Qiime 1 Forum
Hi Guerrino,

The biom add-metadata command requires a few additional pieces of information. First, you need to specify your OTU table as "-i". Second, your taxonomy assignments need to be passed to "--observation-metadata-fp". Third, you need to indicate what columns within your taxonomy assignment file you'd like to load into the BIOM table, and this can be done with "--observation-header OTUID,taxonomy". Last, your taxonomy assignments are (likely) semicolon separated, so you need to specify "--sc-pipe-separated taxonomy". I believe that should resolve your issue.

$ biom add-metadata -i <your_otu_table.biom> -o final.biom --observation-metadata-fp FILE_tax_assignments.txt --observation-header OTUID,taxonomy --sc-pipe-separated taxonomy

Best,
Daniel

Guerrino Macori

unread,
Mar 20, 2017, 7:55:56 PM3/20/17
to Qiime 1 Forum
Dear Daniel,
Thanks a lot for your explanation. I proceed with the following command:

$ biom add-metadata -i ~/merged.biom -o ~/final.biom --observation-metadata-fp ~/FILE_tax_assignments.txt --observation-header OTUID,taxonomy --sc-pipe-separated


This generated the file final.biom. I am trying to understand if the file generated is correct and if I can proceed with it for the creation of the graphs and downstream analysis.

Thanks in advance again


Daniel McDonald

unread,
Mar 21, 2017, 7:50:29 PM3/21/17
to Qiime 1 Forum
Great!

Best,
Daniel
Reply all
Reply to author
Forward
0 new messages