forked from satijalab/seurat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FetchResidualSCTModel.Rd
67 lines (56 loc) · 1.96 KB
/
FetchResidualSCTModel.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessing5.R
\name{FetchResidualSCTModel}
\alias{FetchResidualSCTModel}
\title{Calculate pearson residuals of features not in the scale.data
This function is the secondary function under FetchResiduals}
\usage{
FetchResidualSCTModel(
object,
assay = "SCT",
umi.assay = "RNA",
layer = "counts",
chunk_size = 2000,
layer.cells = NULL,
SCTModel = NULL,
reference.SCT.model = NULL,
new_features = NULL,
clip.range = NULL,
replace.value = FALSE,
verbose = FALSE
)
}
\arguments{
\item{object}{A seurat object}
\item{assay}{Name of the assay of the seurat object generated by
SCTransform. Default is "SCT"}
\item{umi.assay}{Name of the assay of the seurat object to fetch
UMIs from. Default is "RNA"}
\item{layer}{Name of the layer under `umi.assay` to fetch UMIs from.
Default is "counts"}
\item{chunk_size}{Number of cells to load in memory for calculating
residuals}
\item{layer.cells}{Vector of cells to calculate the residual for.
Default is NULL which uses all cells in the layer}
\item{SCTModel}{Which SCTmodel to use from the object for calculating
the residual. Will be ignored if reference.SCT.model is set}
\item{reference.SCT.model}{If a reference SCT model should be used
for calculating the residuals. When set to not NULL, ignores the `SCTModel`
paramater.}
\item{new_features}{A vector of features to calculate the residuals for}
\item{clip.range}{Numeric of length two specifying the min and max values
the Pearson residual will be clipped to. Useful if you want to change the
clip.range.}
\item{replace.value}{Whether to replace the value of residuals if it
already exists}
\item{verbose}{Whether to print messages and progress bars}
}
\value{
Returns a matrix containing centered pearson residuals of
added features
}
\description{
Calculate pearson residuals of features not in the scale.data
This function is the secondary function under FetchResiduals
}
\keyword{internal}