Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

biom-methods

Build and return an instance of the biom-class.


Description

This is for instantiating a biom object within R (biom-class), and assumes relevant data is already available in R. This is different than reading a biom file into R. If you are instead interested in importing a biom file into R, you should use the read_biom function. This function is made available (exported) so that advanced-users/developers can easily represent analogous data in this structure if needed. However, most users are expected to instead rely on the read_biom function for data import, followed by accessor functions that extract R-friendly subsets of the data stored in the biom-format derived list.

Usage

biom(x)

## S4 method for signature 'list'
biom(x)

Arguments

x

(REQUIRED). A named list conforming to conventions arising from the fromJSON function reading a biom-format file with default settings. See read_biom for more details about data import and biom-class for more details about accessor functions that extract R-friendly subsets of the data and metadata stored in x.

Details

biom() is a constructor method. This is the main method suggested for constructing an experiment-level (biom-class) object from its component data.

Value

An instance of the biom-class.

See Also

Function to create a biom object from R data, make_biom.

Definition of the biom-class.

The read_biom import function.

Function to write a biom format file from a biom object, write_biom

Accessor functions like header.

Examples

#
# import with default parameters, specify a file
biom_file = system.file("extdata", "rich_sparse_otu_table.biom", package = "biomformat")
x = read_biom(biom_file)
show(x)
print(x)
header(x)
biom_data(x)
biom_shape(x)
nrow(x)
ncol(x)
observation_metadata(x)
sample_metadata(x)

biomformat

An interface package for the BIOM file format

v1.18.0
GPL-2
Authors
Paul J. McMurdie <mcmurdie@stanford.edu> and Joseph N Paulson <jpaulson@jimmy.harvard.edu>
Initial release
2016-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.