biom_taxonomy: Extract taxonomy info from a biom object.

Description Usage Arguments Details Value Examples

Description

For BIOM objects representing OTU tables, this function will extract the taxonomy for each OTU. The taxonomy info is typically stored in an attribute of the row metadata named "taxonomy".

Usage

1
biom_taxonomy(b, attr = "taxonomy")

Arguments

b

A BIOM object.

attr

The metadata attribute under which the taxonomy information can be found for each row item in the biom file.

Details

This function may be used more generally to extract metadata from rows in a BIOM object. The attr argument may be adjusted to match the desired attribute name. If the metadata has a nested structure, a character vector may be supplied to the attr argument.

The BIOM object can be any list-like representation of the JSON source code in a BIOM-format file produced by QIIME. There are several options for creating BIOM objects from QIIME output files. The official library for BIOM files, biom, can create compatible objects via the read_biom function. Alternately, the fromJSON function from either RJSONIO or rjson may be used.

Value

A list of character vectors, one per row.

Examples

1
2

Example output

$denovo0
[1] "Bacteria"      "Firmicutes"    "Clostridia"    "Clostridiales"

$denovo1
[1] "Bacteria"      "Firmicutes"    "Clostridia"    "Clostridiales"

$denovo2
[1] "Bacteria"   "Firmicutes" "Clostridia"

$denovo6
[1] "Bacteria"      "Bacteroidetes"

$denovo9
[1] "Bacteria"        "Firmicutes"      "Clostridia"      "Clostridiales"  
[5] "Lachnospiraceae"

$denovo16
[1] "Bacteria"   "Firmicutes"

qiimer documentation built on May 2, 2019, 6 a.m.