SeuratMap2Ref¶
Map the seurat object to reference
See: https://satijalab.org/seurat/articles/integration_mapping.html and https://satijalab.org/seurat/articles/multimodal_reference_mapping.html
Environment Variables¶
ncores
(type=int;order=-100
): Default:1
.
Number of cores to use.
Whensplit_by
is used, this will be the number of cores for each object to map to the reference.
Whensplit_by
is not used, this is used infuture::plan(strategy = "multicore", workers = <ncores>)
to parallelize some Seurat procedures.
See also: https://satijalab.org/seurat/archive/v3.0/future_vignette.htmlmutaters
(type=json
): Default:{}
.
The mutaters to mutate the metadata.
This is helpful when we want to create new columns forsplit_by
.use
: A column name of metadata from the reference (e.g.celltype.l1
,celltype.l2
) to transfer to the query as the cell types (ident) for downstream analysis. This field is required.
If you want to transfer multiple columns, you can useenvs.MapQuery.refdata
.ident
: Default:seurat_clusters
.
The name of the ident for query transferred fromenvs.use
of the reference.ref
: The reference seurat object file.
Either an RDS file or a h5seurat file that can be loaded bySeurat::LoadH5Seurat()
.
The file type is determined by the extension..rds
or.RDS
for RDS file,.h5seurat
or.h5
for h5seurat file.refnorm
(choice
): Default:auto
.
Normalization method the reference used. The same method will be used for the query.NormalizeData
: UsingNormalizeData
.SCTransform
: UsingSCTransform
.auto
: Automatically detect the normalization method.
If the default assay of reference isSCT
, thenSCTransform
will be used.
split_by
: The column name in metadata to split the query into multiple objects.
This helps when the original query is too large to process.skip_if_normalized
: Default:True
.
Skip normalization if the query is already normalized.
Since the object is supposed to be generated bySeuratPreparing
, it is already normalized.
However, a different normalization method may be used.
If the reference is normalized by the same method as the query, the normalization can be skipped.
Otherwise, the normalization cannot be skipped.
The normalization method used for the query set is determined by the default assay.
IfSCT
, thenSCTransform
is used; otherwise,NormalizeData
is used.
You can set this toFalse
to force re-normalization (with or without the arguments previously used).SCTransform
(ns
): Arguments forSCTransform()
do-correct-umi
(flag
): Default:False
.
Place corrected UMI matrix in assay counts layer?do-scale
(flag
): Default:False
.
Whether to scale residuals to have unit variance?do-center
(flag
): Default:True
.
Whether to center residuals to have mean zero?<more>
: See https://satijalab.org/seurat/reference/sctransform.
Note that the hyphen (-
) will be transformed into.
for the keys.
NormalizeData
(ns
): Arguments forNormalizeData()
normalization-method
: Default:LogNormalize
.
Normalization method.<more>
: See https://satijalab.org/seurat/reference/normalizedata.
Note that the hyphen (-
) will be transformed into.
for the keys.
FindTransferAnchors
(ns
): Arguments forFindTransferAnchors()
normalization-method
(choice
): Name of normalization method used.LogNormalize
: Log-normalize the data matrixSCT
: Scale data using the SCTransform methodauto
: Automatically detect the normalization method.
Seeenvs.refnorm
.
reference-reduction
: Default:spca
.
Name of dimensional reduction to use from the reference if running the pcaproject workflow.
Optionally enables reuse of precomputed reference dimensional reduction.<more>
: See https://satijalab.org/seurat/reference/findtransferanchors.
Note that the hyphen (-
) will be transformed into.
for the keys.
MapQuery
(ns
): Arguments forMapQuery()
reference-reduction
: Default:spca
.
Name of reduction to use from the reference for neighbor findingreduction-model
: Default:wnn.umap
.
DimReduc
object that contains the umap model.refdata
(type=json
): Default:{}
.
Extra data to transfer from the reference to the query.<more>
: See https://satijalab.org/seurat/reference/mapquery.
Note that the hyphen (-
) will be transformed into.
for the keys.
MappingScore
(ns
): Arguments forMappingScore()
<more>
: See https://satijalab.org/seurat/reference/mappingscore.
Note that the hyphen (-
) will be transformed into.
for the keys.ndim
: Default:30
.
Metadata¶
The metadata of the Seurat
object will be updated with the cluster
assignments (column name determined by envs.name
):