as_phyloseq {metacoder} | R Documentation |
Convert taxmap to phyloseq
Description
Convert a taxmap object to a phyloseq object.
Usage
as_phyloseq(
obj,
otu_table = NULL,
otu_id_col = "otu_id",
sample_data = NULL,
sample_id_col = "sample_id",
phy_tree = NULL
)
Arguments
obj |
The taxmap object. |
otu_table |
The table in 'obj$data' with OTU counts. Must be one of the following:
|
otu_id_col |
The name of the column storing OTU IDs in the otu table. |
sample_data |
A table containing sample data with sample IDs matching column names in the OTU table. Must be one of the following:
|
sample_id_col |
The name of the column storing sample IDs in the sample data table. |
phy_tree |
A phylogenetic tree of class
|
Examples
## Not run:
# Install phyloseq to get example data
# if (!require("BiocManager", quietly = TRUE))
# install.packages("BiocManager")
#
# BiocManager::install("phyloseq")
# Parse example dataset
library(phyloseq)
data(GlobalPatterns)
x <- parse_phyloseq(GlobalPatterns)
# Convert back to a phylseq object
as_phyloseq(x)
## End(Not run)