Count the number of expressed genes per cell

Share:

Description

An efficient internal function that avoids the need to construct 'is_exprs_mat' by counting the number of expressed genes per cell on the fly.

Usage

1
nexprs(object, threshold = NULL, subset.row = NULL, byrow = FALSE)

Arguments

object

an SCESet object

threshold

numeric scalar providing the value above which observations are deemed to be expressed. Defaults to object@lowerDetectionLimit.

subset.row

logical or character vector indicating which rows (i.e. features/genes) to subset and calculate 'is_exprs_mat' for.

byrow

logical scalar indicating if TRUE to count expressing cells per feature (i.e. gene) and if FALSE to count expressing features (i.e. genes) per cell.

Value

a numeric vector of the same length as the number of features if byrow argument is TRUE and the same length as the number of cells if byrow is FALSE

Examples

1
2
3
4
5
6
7
data("sc_example_counts")
data("sc_example_cell_info")
pd <- new("AnnotatedDataFrame", data=sc_example_cell_info)
rownames(pd) <- pd$Cell
example_sceset <- newSCESet(countData=sc_example_counts, phenoData=pd)
nexprs(example_sceset)[1:10]
nexprs(example_sceset, byrow = TRUE)[1:10]

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.