R/preprocessing5.R
FetchResiduals.Rd
This function calls sctransform::get_residuals.
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
)
A seurat object
Name of features to add into the scale.data
Name of the assay of the seurat object generated by SCTransform
Name of the assay of the seurat object containing UMI matrix and the default is RNA
Name (prefix) of the layer to pull counts from
Numeric of length two specifying the min and max values the Pearson residual will be clipped to
reference.SCT.model If a reference SCT model should be used for calculating the residuals. When set to not NULL, ignores the `SCTModel` paramater.
Recalculate residuals for all features, even if they are already present. Useful if you want to change the clip.range.
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.
Whether to print messages and progress bars
Returns a Seurat object containing Pearson residuals of added features in its scale.data