View source: R/calcExprFreqs.R
calcExprFreqs | R Documentation |
Calculates gene expression frequencies
calcExprFreqs(x, assay = "counts", th = 0)
x |
a |
assay |
a character string specifying which assay to use. |
th |
numeric threshold value above which a gene should be considered to be expressed. |
calcExprFreq
computes, for each sample and group (in each cluster),
the fraction of cells that express a given gene. Here, a gene is considered
to be expressed when the specified measurement value (assay
)
lies above the specified threshold value (th
).
a SingleCellExperiment
containing, for each cluster, an assay of dimensions #genes x #samples
giving the fraction of cells that express each gene in each sample.
If colData(x)
contains a "group_id"
column, the fraction
of expressing cells in each each group will be included as well.
Helena L Crowell & Mark D Robinson
data(example_sce)
library(SingleCellExperiment)
frq <- calcExprFreqs(example_sce)
# one assay per cluster
assayNames(frq)
# expression frequencies by
# sample & group; 1st cluster:
head(assay(frq))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.