makePhyloseqFromTreeSE: Create a phyloseq object from a TreeSummarizedExperiment...

makePhyloseqFromTreeSER Documentation

Create a phyloseq object from a TreeSummarizedExperiment object

Description

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

Usage

makePhyloseqFromTreeSE(x, ...)

## S4 method for signature 'SummarizedExperiment'
makePhyloseqFromTreeSE(x, assay.type = "counts", assay_name = NULL, ...)

## S4 method for signature 'TreeSummarizedExperiment'
makePhyloseqFromTreeSE(x, tree_name = "phylo", ...)

makePhyloseqFromTreeSummarizedExperiment(x, ...)

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

Arguments

x

a TreeSummarizedExperiment object

...

additional arguments

assay.type

A single character value for selecting the assay to be included in the phyloseq object that is created. (By default: assay.type = "counts")

assay_name

a single character value for specifying which assay to use for calculation. (Please use assay.type instead. At some point assay_name will be disabled.)

tree_name

a single character value for specifying which tree will be included in the phyloseq object that is created, (By default: tree_name = "phylo")

Details

makePhyloseqFromTreeSE 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 <- makePhyloseqFromTreeSE(tse)
phy

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

# Counts relative abundances table
tse <- transformAssay(tse, method = "relabundance")
phy2 <- makePhyloseqFromTreeSE(tse, assay.type = "relabundance")
phy2

microbiome/mia documentation built on April 27, 2024, 4:04 a.m.