BIOM Import and Export {KbaseKit}R Documentation

Import and Export BIOM Objects

Description

Easy import and export of objects in the JSON-based Biological Observation Matrix (BIOM) format. Imports lightly encapsulate the BIOM object's numerical data and metadata. Exports write a valid BIOM object.

Usage

fromBIOM(file, keepSparse = TRUE)
toBIOM(obj, type, ID = NULL, comment = "", asSparse = TRUE, toFile = NULL)

Arguments

obj

matrix, sparseMatrix, or data.frame

type

Character: one of "OTU table", "Pathway table", "Function table","Ortholog table","Gene table","Metabolite table","Taxon table"

ID

Optional, character

comment

Optional, character

asSparse

Logical: whether to create a \"sparse\" or \"dense\" BIOM object

toFile

Destination file

file

Character: JSON content, name of source file, or URL

keepSparse

Logical: if TRUE and the BIOM object is sparse, a sparseMatrix will be created, otherwise an ordinary matrix

Details

The object created by fromBIOM is of class kb, which encapsulates metadata but can be used as a matrix (or sparseMatrix, as the case may be). toBIOM writes a correct BIOM object and returns the filename, or if toFile is NULL, returns the object itself as text.

Author(s)

Daniel Braithwaite

References

http://www.biom-format.org/

See Also

kbGet


[Package KbaseKit version 0.9 Index]