FetchResiduals: Get the Pearson residuals from an sctransform-normalized...

View source: R/generics.R

FetchResidualsR Documentation

Get the Pearson residuals from an sctransform-normalized dataset.

Description

This function calls sctransform::get_residuals.

Usage

FetchResiduals(object, ...)

## S3 method for class 'Seurat'
FetchResiduals(
  object,
  features,
  assay = NULL,
  umi.assay = "RNA",
  layer = "counts",
  clip.range = NULL,
  reference.SCT.model = NULL,
  replace.value = FALSE,
  na.rm = TRUE,
  verbose = TRUE,
  ...
)

## S3 method for class 'SCTAssay'
FetchResiduals(
  object,
  umi.object,
  features,
  layer = "counts",
  clip.range = NULL,
  reference.SCT.model = NULL,
  replace.value = FALSE,
  na.rm = TRUE,
  verbose = TRUE,
  ...
)

Arguments

object

An SCTAssay object.

...

Arguments passed to other methods (not used)

features

Name of features to fetch residuals for.

assay

Name of the assay to fetch residuals for.

umi.assay

Name of the assay of the seurat object containing counts matrix to use when recalculating any missing residuals.

layer

The name of the layer(s) in 'umi.assay' to use when recalculating any missing residuals.

clip.range

Numeric of length two specifying the min and max values the Pearson residual will be clipped to.

reference.SCT.model

If provided, the reference model will be used to recalculate missing residuals instead of the

replace.value

Recalculate residuals for all features, even if they are already present. Useful if you want to change the clip.range.

na.rm

For features where there is no feature model stored, return NA for residual value in scale.data when na.rm = FALSE. When na.rm is TRUE, only return residuals for features with a model stored for all cells.

verbose

Whether to print messages and progress bars

umi.object

TK.

Value

A matrix containing the requested pearson residuals.

See Also

get_residuals


Seurat documentation built on June 8, 2025, 12:24 p.m.