R: Extract taxonomy info from a biom object.

biom_taxonomy {qiimer} | R Documentation

## Extract taxonomy info from a biom object.

### 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

    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

    data(relmbeta_biom)
    head(biom_taxonomy(relmbeta_biom))

[Package qiimer version 0.9.4 Index]