calcExprFreqs: calcExprFreqs

Description Usage Arguments Details Value Author(s) Examples

View source: R/calcExprFreqs.R

Description

Calculates gene expression frequencies

Usage

1
calcExprFreqs(x, assay = "counts", th = 0)

Arguments

x

a SingleCellExperiment.

assay

a character string specifying which assay to use.

th

numeric threshold value above which a gene should be considered to be expressed.

Details

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).

Value

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.

Author(s)

Helena L Crowell & Mark D Robinson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(sce)
library(SingleCellExperiment)

frq <- calcExprFreqs(sce)

# one assay per cluster
assayNames(frq)  

# expression frequencies by
# sample & group; 1st cluster:
head(assay(frq))

muscat documentation built on Nov. 8, 2020, 7:47 p.m.