numDetectedAcrossFeatures {scater} | R Documentation |
Computes the number of detected expression values (default defined as non-zero counts) for each cell in each group of features.
numDetectedAcrossFeatures(x, ...) ## S4 method for signature 'ANY' numDetectedAcrossFeatures( x, ids, detection_limit = 0, subset_row = NULL, subset_col = NULL, average = FALSE, BPPARAM = SerialParam() ) ## S4 method for signature 'SummarizedExperiment' numDetectedAcrossFeatures(x, ..., exprs_values = "counts")
x |
A numeric matrix of counts containing features in rows and cells in columns. Alternatively, a SummarizedExperiment object containing such a count matrix. |
... |
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 |
ids |
A factor of length Alternatively, a list of integer or character vectors, where each vector specifies the indices or names of features in a set. |
detection_limit |
Numeric scalar providing the value above which observations are deemed to be expressed. |
subset_row |
An integer, logical or character vector specifying the features to use. Defaults to all features. |
subset_col |
An integer, logical or character vector specifying the cells to use.
Defaults to all cells with non- |
average |
Logical scalar indicating whether the proportion of non-zero counts in each group should be computed instead. |
BPPARAM |
A BiocParallelParam object specifying whether summation should be parallelized. |
exprs_values |
A string or integer scalar specifying the assay of |
An integer or numeric matrix containing the number of detected expression values in each group of features (row) and cell (column).
Aaron Lun
nexprs
, on which this function is based.
example_sce <- mockSCE() ids <- sample(paste0("GENE_", 1:100), nrow(example_sce), replace=TRUE) byrow <- numDetectedAcrossFeatures(example_sce, ids) head(byrow[,1:10])