Skip to contents

convert to microbiome_dataset class object.

Usage

convert2microbiome_dataset(object, ...)

as.microbiome_dataset(object, ...)

# S3 method for class 'phyloseq'
convert2microbiome_dataset(object, ...)

# S3 method for class 'mass_dataset'
convert2microbiome_dataset(object, ...)

# S3 method for class 'TreeSummarizedExperiment'
convert2microbiome_dataset(object, assay_name = NULL, ...)

# S3 method for class 'MPSE'
convert2microbiome_dataset(object, ...)

Arguments

object

phylosep or other class

...

other params

assay_name

Assay name used when object is a TreeSummarizedExperiment.

Value

microbiome_dataset class object.

Examples

data("global_patterns", package = "microbiomedataset")

x0 <- prune_taxa(global_patterns, variable_id = global_patterns@variable_info$variable_id[1:80])
phyloseq_object <- convert2phyloseq(x0)
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
#> Found more than one class "phylo" in cache; using the first, from namespace 'phyloseq'
#> Also defined by ‘tidytree’
x <- convert2microbiome_dataset(phyloseq_object)
class(x)
#> [1] "microbiome_dataset"
#> attr(,"package")
#> [1] "microbiomedataset"