BIOMexamples: BIOM examples and related utilities

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Example objects for getting started, and related utilities.

Usage

1
2
3
4
jtxt; smat; dmat; li1; li2; li3; li4
exampleBiomFile()
applyBiomMethods(x)
buildBiomExamples(rdafile="examples.rda", jsonfile="example-json.txt")

Arguments

rdafile

filename for .rda saves of example objects (string)

jsonfile

filename for saved example JSON text (string)

x

object (biom)

Details

BIOM (Biological Observation Matrix) is a simple prescription for storing an annotated table of data. It may be described as a format, standard, or data structure.

The JSON (JavaScript Object Notation) standard for expressing general data objects as text is employed to define BIOM. Therefore the native form of BIOM data is structured text, conforming to the JSON specification in general and the BIOM specification in particular. Familiarity with BIOM is assumed here.

The S3 class biom and its methods facilitate analyses by expressing BIOM data as objects in the R environment. Simple data objects of several kinds are provided to experiment with handling BIOM in R. See the examples below.

buildBiomExamples() draws from MG-RAST (see below) to construct these objects and saves them in designated files. (This utility is used to build the package.)

exampleBiomFile() returns the path to a file of JSON text correctly structured as BIOM.

applyBiomMethods() is a utility for testing that simply applies all biom methods to a given object.

Value

Only exampleBiomFile() has a useful return value, as described above.

Author(s)

Daniel T. Braithwaite

References

BIOM format
MG-RAST metagenome annotation server
JSON

See Also

biom

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
str(jtxt)
str(smat)
str(dmat)
str(li1)
str(li2)
str(li3)
exampleBiomFile()

xx <- biom (file=exampleBiomFile())
yy <- biom (dmat, quiet=TRUE)
zz <- biom (li4)

## Not run: 
##  this prints a large volume of text:
applyBiomMethods(xx)
applyBiomMethods (yy)

##  this requires package MGRASTer:
tt1 <- tempfile()
tt2 <- tempfile()
buildBiomExamples (tt1, tt2)
unlink (tt1)
unlink (tt2)

## End(Not run)

BIOM.utils documentation built on May 1, 2019, 7:32 p.m.