perSampleDominantTaxa | R Documentation |
These functions return information about the most dominant taxa in a
SummarizedExperiment
object.
perSampleDominantFeatures(
x,
assay.type = assay_name,
assay_name = "counts",
rank = NULL,
other.name = "Other",
n = NULL,
complete = TRUE,
...
)
## S4 method for signature 'SummarizedExperiment'
perSampleDominantFeatures(
x,
assay.type = assay_name,
assay_name = "counts",
rank = NULL,
other.name = "Other",
n = NULL,
complete = TRUE,
...
)
perSampleDominantTaxa(x, ...)
## S4 method for signature 'SummarizedExperiment'
perSampleDominantTaxa(x, ...)
addPerSampleDominantFeatures(
x,
name = "dominant_taxa",
other.name = "Other",
n = NULL,
...
)
## S4 method for signature 'SummarizedExperiment'
addPerSampleDominantFeatures(
x,
name = "dominant_taxa",
other.name = "Other",
n = NULL,
complete = FALSE,
...
)
addPerSampleDominantTaxa(x, ...)
## S4 method for signature 'SummarizedExperiment'
addPerSampleDominantTaxa(x, ...)
x |
A
|
assay.type |
A single character value for selecting the
|
assay_name |
a single |
rank |
A single character defining a taxonomic rank. Must be a value of
the output of |
other.name |
A name for features that are not included in n the most frequent dominant features in the data. Default is "Other". |
n |
The number of features that are the most frequent dominant features. Default is NULL, which defaults that each sample is assigned a dominant taxon. |
complete |
A boolean value to manage multiple dominant taxa for a sample. Default for perSampleDominantTaxa is TRUE to include all equally dominant taxa for each sample. complete = FALSE samples one taxa for the samples that have multiple. Default for addPerSampleDominantTaxa is FALSE to add a column with only one dominant taxon assigned for each sample into colData. complete = TRUE adds a list that includes all dominant taxa for each sample into colData. |
... |
Additional arguments passed on to |
name |
A name for the column of the |
addPerSampleDominantFeatures
extracts the most abundant taxa in a
SummarizedExperiment
object, and stores the information in the colData
. It is a wrapper for
perSampleDominantFeatures
.
With rank
parameter, it is possible to agglomerate taxa based on taxonomic
ranks. E.g. if 'Genus' rank is used, all abundances of same Genus are added
together, and those families are returned. See agglomerateByRank()
for
additional arguments to deal with missing values or special characters.
perSampleDominantFeatures
returns a named character vector x
while addPerSampleDominantFeatures
returns
SummarizedExperiment
with additional column in colData
named *name*
.
Leo Lahti, Tuomas Borman and Sudarshan A. Shetty.
data(GlobalPatterns)
x <- GlobalPatterns
# Finds the dominant taxa.
sim.dom <- perSampleDominantFeatures(x, rank="Genus")
# Add information to colData
x <- addPerSampleDominantFeatures(x, rank = "Genus", name="dominant_genera")
colData(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.