makePhyloseqFromTreeSummarizedExperiment {mia}R Documentation

Create a phyloseq object from a TreeSummarizedExperiment object

Description

This function creates a phyloseq object from a TreeSummarizedExperiment object. By using abund_values, it is possible to specify which table from assay is added to the phyloseq object.

Usage

makePhyloseqFromTreeSummarizedExperiment(x, ...)

## S4 method for signature 'SummarizedExperiment'
makePhyloseqFromTreeSummarizedExperiment(x, abund_values = "counts")

## S4 method for signature 'TreeSummarizedExperiment'
makePhyloseqFromTreeSummarizedExperiment(x, ...)

Arguments

x

a TreeSummarizedExperiment object

...

additional arguments

abund_values

A single character value for selecting the assay to be included in the phyloseq object that is created. By default, it is counts table.

Details

makePhyloseqFromTreeSummarizedExperiment is used for creating a phyloseq object from TreeSummarizedExperiment object.

Value

An object of class Phyloseq object.

Author(s)

Leo Lahti and Tuomas Borman. Contact: microbiome.github.io

Examples

# Get tse object
data(GlobalPatterns)
tse <- GlobalPatterns

# Create a phyloseq object from it
phy <- makePhyloseqFromTreeSummarizedExperiment(tse)
phy

# By default the chosen table is counts, but if there are other tables,
# they can be chosen with abund_values.

# Counts relative abundances table
tse <- transformCounts(tse, method = "relabundance")
phy2 <- makePhyloseqFromTreeSummarizedExperiment(tse, abund_values = "relabundance")
phy2

[Package mia version 1.2.2 Index]