numDetectedAcrossCells {scater}R Documentation

Number of detected expression values per group of cells

Description

Computes the number of detected expression values (default defined as non-zero counts) for each feature in each group of cells.

Usage

numDetectedAcrossCells(x, ...)

## S4 method for signature 'ANY'
numDetectedAcrossCells(x, ids, average = FALSE,
  subset_row = NULL, subset_col = NULL, ..., BPPARAM = SerialParam())

## S4 method for signature 'SummarizedExperiment'
numDetectedAcrossCells(x, ...,
  exprs_values = "counts")

Arguments

x

A numeric matrix of counts where features are rows and cells are columns.

Alternatively, a SummarizedExperiment containing such counts.

...

For the generic, further arguments to pass to specific methods.

For the SummarizedExperiment method, further arguments to pass to the ANY method.

For the ANY method, further arguments to pass to the nexprs function.

ids

A vector of length ncol(x), specifying the group assignment for each cell.

average

Logical scalar indicating whether the proportion of non-zero counts in each group should be computed instead.

subset_row

A vector specifying the rows to use. Defaults to all rows.

subset_col

A vector specifying the columns to use. Defaults to all cells with non-NA entries of ids.

BPPARAM

A BiocParallelParam object specifying whether the calculations should be parallelized.

exprs_values

String or integer specifying the assay of x to obtain the count matrix from.

Value

An integer or numeric matrix containing the number or proportion of detected expression values for each feature (row) in each group of cells (column).

Author(s)

Aaron Lun

See Also

nexprs, on which this function is based.

Examples

example_sce <- mockSCE()

ids <- sample(LETTERS[1:5], ncol(example_sce), replace=TRUE)
bycol <- numDetectedAcrossCells(example_sce, ids)
head(bycol)


[Package scater version 1.14.0 Index]