| SCTAssay-class {Seurat} | R Documentation |
The SCTModel Class
Description
The SCTModel object is a model and parameters storage from SCTransform. It can be used to calculate Pearson residuals for new genes.
The SCTAssay object contains all the information found in an Assay
object, with extra information from the results of SCTransform
Usage
## S3 method for class 'SCTAssay'
levels(x)
## S3 replacement method for class 'SCTAssay'
levels(x) <- value
Arguments
x |
An |
value |
New levels, must be in the same order as the levels present |
Value
levels: SCT model names
levels<-: x with updated SCT model names
Slots
feature.attributesA data.frame with feature attributes in SCTransform
cell.attributesA data.frame with cell attributes in SCTransform
clipsA list of two numeric of length two specifying the min and max values the Pearson residual will be clipped to. One for vst and one for SCTransform
umi.assayName of the assay of the seurat object containing UMI matrix and the default is RNA
modelA formula used in SCTransform
argumentsother information used in SCTransform
median_umiMedian UMI (or scale factor) used to calculate corrected counts
SCTModel.listA list containing SCT models
Get and set SCT model names
SCT results are named by initial run of SCTransform in order
to keep SCT parameters straight between runs. When working with merged
SCTAssay objects, these model names are important. levels
allows querying the models present. levels<- allows the changing of
the names of the models present, useful when merging SCTAssay objects.
Note: unlike normal levels<-, levels<-.SCTAssay
allows complete changing of model names, not reordering.
Creating an SCTAssay from an Assay
Conversion from an Assay object to an SCTAssay object by
is done by adding the additional slots to the object. If from has
results generated by SCTransform from Seurat v3.0.0 to v3.1.1,
the conversion will automagically fill the new slots with the data
See Also
Examples
## Not run:
# SCTAssay objects are generated from SCTransform
pbmc_small <- SCTransform(pbmc_small)
## End(Not run)
## Not run:
# SCTAssay objects are generated from SCTransform
pbmc_small <- SCTransform(pbmc_small)
pbmc_small[["SCT"]]
## End(Not run)
## Not run:
# Query and change SCT model names
levels(pbmc_small[['SCT']])
levels(pbmc_small[['SCT']]) <- '3'
levels(pbmc_small[['SCT']])
## End(Not run)