PearsonResidualVar: Compute analytic Pearson residual variance

View source: R/generics.R

PearsonResidualVarR Documentation

Compute analytic Pearson residual variance

Description

Find the top features for a given assay based on analytic Pearson residual variance. This function computes the Pearson residual variance for each feature without constructing the entire dense matrix of Pearson residuals to reduce the memory required.

Usage

PearsonResidualVar(object, ...)

## Default S3 method:
PearsonResidualVar(
  object,
  assay = NULL,
  nfeatures = 20000,
  min.counts = 100,
  ncell.batch = 100,
  theta = 10,
  verbose = TRUE,
  ...
)

## S3 method for class 'Assay'
PearsonResidualVar(
  object,
  assay = NULL,
  nfeatures = 20000,
  theta = 10,
  min.counts = 100,
  weight.mean = 0,
  ncell.batch = 100,
  verbose = TRUE,
  ...
)

## S3 method for class 'StdAssay'
PearsonResidualVar(
  object,
  assay = NULL,
  min.counts = 100,
  weight.mean = 0,
  theta = 10,
  ncell.batch = 100,
  verbose = TRUE,
  ...
)

## S3 method for class 'Seurat'
PearsonResidualVar(
  object,
  assay = NULL,
  min.counts = 100,
  weight.mean = 0,
  theta = 10,
  ncell.batch = 100,
  verbose = TRUE,
  ...
)

Arguments

object

A Seurat object

...

Arguments passed to other methods

assay

Name of assay to use

nfeatures

Number of top features to set as the variable features

min.counts

Minimum number of counts for feature to be eligible for variable features

ncell.batch

Number of cells to process in each batch. Higher number increases speed but uses more memory.

theta

Theta value for analytic Pearson residual calculation

verbose

Display messages

weight.mean

Weighting to apply to the feature mean relative to the Pearson residual variance for ranking features. weight.mean=0 will rank features based on the Pearson residual variance only.

Value

Returns a SeuratObject::Seurat() object

References

Lause, J., Berens, P. & Kobak, D. Analytic Pearson residuals for normalization of single-cell RNA-seq UMI data. Genome Biol 22, 258 (2021). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/s13059-021-02451-7")}

Examples

PearsonResidualVar(object = atac_small[["peaks"]]["counts"])
PearsonResidualVar(object = atac_small[["peaks"]])
PearsonResidualVar(object = atac_small[["peaks"]])
PearsonResidualVar(atac_small)

Signac documentation built on April 1, 2026, 5:06 p.m.