observation_metadata | R Documentation |
biom-class
.Retrieve and organize meta data from biom-class
,
represented as a data.frame
(if possible)
or a list, with proper index names.
observation_metadata(x, rows, parallel = FALSE)
## S4 method for signature 'biom,missing'
observation_metadata(x, rows, parallel = FALSE)
## S4 method for signature 'biom,character'
observation_metadata(x, rows, parallel = FALSE)
## S4 method for signature 'biom,numeric'
observation_metadata(x, rows, parallel = FALSE)
x |
(Required). An instance of the |
rows |
(Optional). The subset of row indices described in the
returned object. For large datasets, specifying the row subset here,
– rather than first creating the complete data object –
can improve speed/efficiency.
This parameter can be vector of index numbers ( |
parallel |
(Optional). Logical. Whether to perform the accession parsing
using a parallel-computing backend supported by the |
A data.frame
or list
containing
the meta data, with index names. The precise form of the object returned
depends on the metadata stored in x
. A data.frame
is
created if possible.
min_dense_file = system.file("extdata", "min_dense_otu_table.biom", package = "biomformat")
min_sparse_file = system.file("extdata", "min_sparse_otu_table.biom", package = "biomformat")
rich_dense_file = system.file("extdata", "rich_dense_otu_table.biom", package = "biomformat")
rich_sparse_file = system.file("extdata", "rich_sparse_otu_table.biom", package = "biomformat")
min_dense_file = system.file("extdata", "min_dense_otu_table.biom", package = "biomformat")
rich_dense_char = system.file("extdata", "rich_dense_char.biom", package = "biomformat")
rich_sparse_char = system.file("extdata", "rich_sparse_char.biom", package = "biomformat")
# Read the biom-format files
x1 = read_biom(min_dense_file)
x2 = read_biom(min_sparse_file)
x3 = read_biom(rich_dense_file)
x4 = read_biom(rich_sparse_file)
x5 = read_biom(rich_dense_char)
x6 = read_biom(rich_sparse_char)
# Extract metadata
observation_metadata(x1)
observation_metadata(x2)
observation_metadata(x3)
observation_metadata(x3, 2:4)
observation_metadata(x3, 2)
observation_metadata(x3, c("GG_OTU_3", "GG_OTU_4", "whoops"))
observation_metadata(x4)
observation_metadata(x5)
observation_metadata(x6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.