summaries | R Documentation |
To query a SummarizedExperiment
for interesting features, several
functions are available.
getTopFeatures(
x,
top = 5L,
method = c("mean", "sum", "median"),
assay.type = assay_name,
assay_name = "counts",
na.rm = TRUE,
...
)
## S4 method for signature 'SummarizedExperiment'
getTopFeatures(
x,
top = 5L,
method = c("mean", "sum", "median", "prevalence"),
assay.type = assay_name,
assay_name = "counts",
na.rm = TRUE,
...
)
getTopTaxa(x, ...)
## S4 method for signature 'SummarizedExperiment'
getTopTaxa(x, ...)
getUniqueFeatures(x, ...)
## S4 method for signature 'SummarizedExperiment'
getUniqueFeatures(x, rank = NULL, ...)
getUniqueTaxa(x, ...)
## S4 method for signature 'SummarizedExperiment'
getUniqueTaxa(x, ...)
countDominantFeatures(x, group = NULL, name = "dominant_taxa", ...)
## S4 method for signature 'SummarizedExperiment'
countDominantFeatures(x, group = NULL, name = "dominant_taxa", ...)
countDominantTaxa(x, ...)
## S4 method for signature 'SummarizedExperiment'
countDominantTaxa(x, ...)
## S4 method for signature 'SummarizedExperiment'
summary(object, assay.type = assay_name, assay_name = "counts")
x |
A
|
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'. |
assay.type |
a |
assay_name |
a single |
na.rm |
For |
... |
Additional arguments passed on to |
rank |
A single character defining a taxonomic rank. Must be a value of
the output of |
group |
With group, it is possible to group the observations in an
overview. Must be one of the column names of |
name |
The column name for the features. The default is 'dominant_taxa'. |
object |
A
|
The getTopFeatures
extracts the most top
abundant “FeatureID”s
in a SummarizedExperiment
object.
The getUniqueFeatures
is a basic function to access different taxa at a
particular taxonomic rank.
countDominantFeatures
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.
The getTopFeatures
returns a vector of the most top
abundant
“FeatureID”s
The getUniqueFeatures
returns a vector of unique taxa present at a
particular rank
The countDominantFeatures
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 tibble
s
Leo Lahti, Tuomas Borman and Sudarshan A. Shetty
getPrevalentFeatures
perCellQCMetrics
,
perFeatureQCMetrics
,
addPerCellQC
,
addPerFeatureQC
,
quickPerCellQC
data(GlobalPatterns)
top_taxa <- getTopFeatures(GlobalPatterns,
method = "mean",
top = 5,
assay.type = "counts")
top_taxa
# Use 'detection' to select detection threshold when using prevalence method
top_taxa <- getTopFeatures(GlobalPatterns,
method = "prevalence",
top = 5,
assay_name = "counts",
detection = 100)
top_taxa
# Top taxa os specific rank
getTopFeatures(agglomerateByRank(GlobalPatterns,
rank = "Genus",
na.rm = TRUE))
# Gets the overview of dominant taxa
dominant_taxa <- countDominantFeatures(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 <- countDominantFeatures(GlobalPatterns,
rank = "Genus",
group = "SampleType",
na.rm = TRUE)
dominant_taxa
# Get an overview of sample and taxa counts
summary(GlobalPatterns, assay_name= "counts")
# Get unique taxa at a particular taxonomic rank
# sort = TRUE means that output is sorted in alphabetical order
# With na.rm = TRUE, it is possible to remove NAs
# sort and na.rm can also be used in function getTopFeatures
getUniqueFeatures(GlobalPatterns, "Phylum", sort = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.