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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/BIOM-class.R
\docType{methods}
\name{biom}
\alias{biom}
\alias{biom,list-method}
\title{Build and return an instance of the biom-class.}
\usage{
biom(x)
\S4method{biom}{list}(x)
}
\arguments{
\item{x}{(REQUIRED). A named list conforming to conventions arising from
the \code{\link{fromJSON}} function reading a biom-format file with
default settings. See \code{\link{read_biom}} for more details about
data import and
\code{\link{biom-class}} for more details about accessor functions
that extract R-friendly
subsets of the data and metadata stored in \code{x}.}
}
\value{
An instance of the \code{\link{biom-class}}.
}
\description{
This is for instantiating a biom object within R (\code{\link{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 \code{\link{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
\code{\link{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.
}
\details{
\code{biom()} is a constructor method. This is the main method
suggested for constructing an experiment-level (\code{\link{biom-class}})
object from its component data.
}
\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)
}
\seealso{
Function to create a biom object from R data,
\code{\link{make_biom}}.
Definition of the
\code{\link{biom-class}}.
The \code{\link{read_biom}} import function.
Function to write a biom format file from a biom object,
\code{\link{write_biom}}
Accessor functions like \code{\link{header}}.
}
|