sampledoc
News and Announcements »

add_taxa.py – Add taxa to OTU table

Description:

This script adds taxa to a biom-formatted OTU table.

Usage: add_taxa.py [options]

Input Arguments:

Note

[REQUIRED]

-i, --input_fp
Path to input otu table file in biom format
-o, --output_fp
Path to output file in biom format
-t, --taxonomy_fp
Path to input taxonomy file (e.g., as generated by assign_taxonomy.py)

[OPTIONAL]

-l, --labels
Labels to be assigned to metadata in taxonomy_fp
--all_strings
Treat all metadata as strings, rather than casting to lists/floats (useful with –labels for adding arbitrary observation metadata) [default:False]

Output:

An OTU table in biom format is written to the file specified as -o.

Example:

Given an input otu table with no metadata (otu_table_no_tax.biom) and a tab-separated text file mapping OTU ids to taxonomic assignments and scores associated with those assignments (tax.txt), generate a new otu table that includes taxonomic assignments (otu_table_w_tax.biom).

add_taxa.py -i otu_table_no_tax.biom -o otu_table_w_tax.biom -t tax.txt

Example:

Given an input otu table with no metadata (otu_table_no_tax.biom) and a tab-separated text file mapping OTU ids to taxonomic assignments and scores associated with those assignments (tax.txt), generate a new otu table that includes taxonomic assignments (otu_table_w_tax.biom) with alternate metadata identifiers.

add_taxa.py -i otu_table_no_tax.biom -o otu_table_w_alt_labeled_tax.biom -t tax.txt -l "Consensus Lineage,Score"

Example:

Given an input otu table with no metadata (otu_table_no_tax.biom) and a tab-separated text file mapping OTU ids to some value, generate a new otu table that includes that metadata category labeled as “Score” (otu_table_w_score.biom).

add_taxa.py -i otu_table_no_tax.biom -o otu_table_w_score.biom -t score_only.txt -l "Score" --all_strings

Site index


sampledoc