getDominant | R Documentation |
These functions return information about the most dominant taxa in a
SummarizedExperiment
object.
getDominant(
x,
assay.type = assay_name,
assay_name = "counts",
group = rank,
rank = NULL,
other.name = "Other",
n = NULL,
complete = TRUE,
...
)
## S4 method for signature 'SummarizedExperiment'
getDominant(
x,
assay.type = assay_name,
assay_name = "counts",
group = rank,
rank = NULL,
other.name = "Other",
n = NULL,
complete = TRUE,
...
)
addDominant(x, name = "dominant_taxa", other.name = "Other", n = NULL, ...)
## S4 method for signature 'SummarizedExperiment'
addDominant(
x,
name = "dominant_taxa",
other.name = "Other",
n = NULL,
complete = FALSE,
...
)
x |
|
assay.type |
|
assay_name |
Deprecated. Use |
group |
|
rank |
Deprecated. Use |
other.name |
|
n |
|
complete |
|
... |
Additional arguments passed on to |
name |
|
addDominant
extracts the most abundant taxa in a
SummarizedExperiment
object, and stores the information in the colData
. It is a wrapper for
getDominant
.
With group
parameter, it is possible to agglomerate rows based on
groups. If the value is one of the columns in taxonomyRanks()
,
agglomerateByRank()
is applied. Otherwise,
agglomerateByVariable()
is utilized.
E.g. if 'Genus' rank is used, all abundances of same Genus
are added together, and agglomerated features are returned.
See corresponding functions for additional arguments to deal with
missing values or special characters.
getDominant
returns a named character vector x
while addDominant
returns
SummarizedExperiment
with additional column in colData
named *name*
.
data(GlobalPatterns)
x <- GlobalPatterns
# Finds the dominant taxa.
sim.dom <- getDominant(x, group = "Genus")
# Add information to colData
x <- addDominant(x, group = "Genus", name ="dominant_genera")
colData(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.