summaries {mia}R Documentation

Summarizing microbiome data

Description

To query a SummarizedExperiment for interesting features, several functions are available.

Usage

getTopTaxa(
  x,
  top = 5L,
  method = c("mean", "sum", "median"),
  abund_values = "counts"
)

## S4 method for signature 'SummarizedExperiment'
getTopTaxa(
  x,
  top = 5L,
  method = c("mean", "sum", "median", "prevalence"),
  abund_values = "counts"
)

getUniqueTaxa(x, ...)

## S4 method for signature 'SummarizedExperiment'
getUniqueTaxa(x, rank = NULL)

countDominantTaxa(x, group = NULL, ...)

## S4 method for signature 'SummarizedExperiment'
countDominantTaxa(x, group = NULL, ...)

## S4 method for signature 'SummarizedExperiment'
summary(object, abund_values = "counts")

Arguments

x

A SummarizedExperiment object.

top

Numeric value, how many top taxa to return. Default return top five taxa.

method

Specify the method to determine top taxa. Either sum, mean, median or prevalence. Default is 'mean'.

abund_values

a character value to select an assayNames By default it expects count data.

...

Additional arguments passed on to agglomerateByRank() when rank is specified for countDominantTaxa.

rank

A single character defining a taxonomic rank. Must be a value of the output of taxonomicRanks().

group

With group, it is possible to group the observations in an overview. Must be one of the column names of colData.

object

A SummarizedExperiment object.

Details

The getTopTaxa extracts the most top abundant “FeatureID”s in a SummarizedExperiment object.

The getUniqueTaxa is a basic function to access different taxa at a particular taxonomic rank.

countDominantTaxa returns information about most dominant taxa in a tibble. Information includes their absolute and relative abundances in whole data set.

The summary will return a summary of counts for all samples and features in SummarizedExperiment object.

Value

The getTopTaxa returns a vector of the most top abundant “FeatureID”s

The getUniqueTaxa returns a vector of unique taxa present at a particular rank

The countDominantTaxa returns an overview in a tibble. It contains dominant taxa in a column named *name* and its abundance in the data set.

The summary returns a list with two tibbles

Author(s)

Leo Lahti, Tuomas Borman and Sudarshan A. Shetty

See Also

getPrevalentTaxa

perCellQCMetrics, perFeatureQCMetrics, addPerCellQC, addPerFeatureQC, quickPerCellQC

Examples

data(GlobalPatterns)
top_taxa <- getTopTaxa(GlobalPatterns,
                       method = "mean",
                       top = 5,
                       abund_values = "counts")
top_taxa

# Gets the overview of dominant taxa
dominant_taxa <- countDominantTaxa(GlobalPatterns,
                                   rank = "Genus")
dominant_taxa

# With group, it is possible to group observations based on specified groups
# Gets the overview of dominant taxa
dominant_taxa <- countDominantTaxa(GlobalPatterns,
                                   rank = "Genus",
                                   group = "SampleType",
                                   na.rm= TRUE)

dominant_taxa

# Get an overview of sample and taxa counts
summary(GlobalPatterns)

# Get unique taxa at a particular taxonomic rank
getUniqueTaxa(GlobalPatterns, "Phylum")


[Package mia version 1.2.2 Index]