abundances-methods: Extract taxa abundances

abundancesR Documentation

Extract taxa abundances

Description

Extract taxa abundances from phyloseq objects.

Usage

abundances(
  object,
  transform = c("identity", "log10", "log10p", "log2", "log2p", "SquareRoot",
    "CubicRoot", "logit"),
  norm = FALSE
)

## S4 method for signature 'otu_table'
abundances(
  object,
  transform = c("identity", "log10", "log10p", "log2", "log2p", "SquareRoot",
    "CubicRoot", "logit"),
  norm = FALSE
)

## S4 method for signature 'phyloseq'
abundances(
  object,
  transform = c("identity", "log10", "log10p", "log2", "log2p", "SquareRoot",
    "CubicRoot", "logit"),
  norm = FALSE
)

## S4 method for signature 'microbiomeMarker'
abundances(
  object,
  transform = c("identity", "log10", "log10p", "log2", "log2p", "SquareRoot",
    "CubicRoot", "logit")
)

## S4 method for signature 'assay'
abundances(
  object,
  transform = c("identity", "log10", "log10p", "log2", "log2p", "SquareRoot",
    "CubicRoot", "logit"),
  norm = FALSE
)

## S4 method for signature 'SummarizedExperiment'
abundances(
  object,
  transform = c("identity", "log10", "log10p", "log2", "log2p", "SquareRoot",
    "CubicRoot", "logit"),
  norm = FALSE
)

Arguments

object

otu_table, phyloseq, or microbiomeMarker.

transform

transformation to apply, the options inclulde:

  • "identity", return the original data without any transformation.

  • "log10", the transformation is log10(object), and if the data contains zeros the transformation is log10(1 + object).

  • "log10p", the transformation is log10(1 + object).

  • "log2", the transformation is log2(object), and if the data contains zeros the transformation is log2(1 + object).

  • "log2p", the transformation is log2(1 + object).

  • "SquareRoot", the transformation is ⁠Square Root⁠.

  • "CubicRoot", the transformation is ⁠Cubic Root⁠.

  • "logit", the transformation is ⁠Zero-inflated Logit Transformation⁠ (Does not work well for microbiome data).

norm

logical, indicating whether or not to return the normalized taxa abundances.

Value

abundance matrix with taxa in rows and samples in columns.

See Also

otu_table, phyloseq, microbiomeMarker,transform_abundances

Examples

data(caporaso)
abd <- abundances(caporaso)

HuaZou/MicrobiomeAnalysis documentation built on Dec. 12, 2023, 10:37 a.m.