Learn R Programming

qiimer (version 0.9.4)

biom_raw_data: Extract raw data from a BIOM object.

Description

This function extracts the raw data from a BIOM object, using the correct row and column names in the result.

Usage

biom_raw_data(b)

Arguments

b
A BIOM object.

Value

For sparse biom objects, returns a 3-column data frame of row names, column names, and the data value. The first column is named using the first word in the BIOM object's type attribute (e.g. "OTU" for OTU tables). The second and third columns are named "SampleID" and "value", respectively. For dense biom objects, returns a matrix.

Details

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.

Examples

Run this code
data(relmbeta_biom)
head(biom_raw_data(relmbeta_biom))

Run the code above in your browser using DataLab