read_biom | R Documentation |
Parse counts, metadata, taxonomy, and phylogeny from a BIOM file.
read_biom(src, ...)
src |
Input data as either a file path, URL, or JSON string.
BIOM files can be formatted according to
version 1.0 (JSON) or 2.1 (HDF5)
specifications, or as
classical tabular format. URLs must begin with |
... |
Properties to set in the new rbiom object, for example,
|
An rbiom object.
as_rbiom()
library(rbiom)
infile <- system.file("extdata", "hmp50.bz2", package = "rbiom")
biom <- read_biom(infile)
print(biom)
# Taxa Abundances
biom$counts[1:4,1:10] %>% as.matrix()
biom$taxonomy %>% head()
# Metadata
biom$metadata %>% head()
table(biom$metadata$Sex, biom$metadata$`Body Site`)
sprintf("Mean age: %.1f", mean(biom$metadata$Age))
# Phylogenetic tree
biom$tree %>%
tree_subset(1:10) %>%
plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.