RPCAIntegration | R Documentation |
Seurat-RPCA Integration
RPCAIntegration(
object = NULL,
assay = NULL,
layers = NULL,
orig = NULL,
new.reduction = "integrated.dr",
reference = NULL,
features = NULL,
normalization.method = c("LogNormalize", "SCT"),
dims = 1:30,
k.filter = NA,
scale.layer = "scale.data",
dims.to.integrate = NULL,
k.weight = 100,
weight.reduction = NULL,
sd.weight = 1,
sample.tree = NULL,
preserve.order = FALSE,
verbose = TRUE,
...
)
object |
A |
assay |
Name of |
layers |
Names of layers in |
orig |
A dimensional reduction to correct |
new.reduction |
Name of new integrated dimensional reduction |
reference |
A reference |
features |
A vector of features to use for integration |
normalization.method |
Name of normalization method used: LogNormalize or SCT |
dims |
Dimensions of dimensional reduction to use for integration |
k.filter |
Number of anchors to filter |
scale.layer |
Name of scaled layer in |
dims.to.integrate |
Number of dimensions to return integrated values for |
k.weight |
Number of neighbors to consider when weighting anchors |
weight.reduction |
Dimension reduction to use when calculating anchor weights. This can be one of:
|
sd.weight |
Controls the bandwidth of the Gaussian kernel for weighting |
sample.tree |
Specify the order of integration. Order of integration
should be encoded in a matrix, where each row represents one of the pairwise
integration steps. Negative numbers specify a dataset, positive numbers
specify the integration results from a given row (the format of the merge
matrix included in the [,1] [,2] [1,] -2 -3 [2,] 1 -1 Which would cause dataset 2 and 3 to be integrated first, then the resulting object integrated with dataset 1. If NULL, the sample tree will be computed automatically. |
preserve.order |
Do not reorder objects based on size for each pairwise integration. |
verbose |
Print progress |
... |
Arguments passed on to |
## Not run:
# Preprocessing
obj <- SeuratData::LoadData("pbmcsca")
obj[["RNA"]] <- split(obj[["RNA"]], f = obj$Method)
obj <- NormalizeData(obj)
obj <- FindVariableFeatures(obj)
obj <- ScaleData(obj)
obj <- RunPCA(obj)
# After preprocessing, we run integration
obj <- IntegrateLayers(object = obj, method = RPCAIntegration,
orig.reduction = "pca", new.reduction = 'integrated.rpca',
verbose = FALSE)
# Reference-based Integration
# Here, we use the first layer as a reference for integraion
# Thus, we only identify anchors between the reference and the rest of the datasets,
# saving computational resources
obj <- IntegrateLayers(object = obj, method = RPCAIntegration,
orig.reduction = "pca", new.reduction = 'integrated.rpca',
reference = 1, verbose = FALSE)
# Modifying parameters
# We can also specify parameters such as `k.anchor` to increase the strength of
# integration
obj <- IntegrateLayers(object = obj, method = RPCAIntegration,
orig.reduction = "pca", new.reduction = 'integrated.rpca',
k.anchor = 20, verbose = FALSE)
# Integrating SCTransformed data
obj <- SCTransform(object = obj)
obj <- IntegrateLayers(object = obj, method = RPCAIntegration,
orig.reduction = "pca", new.reduction = 'integrated.rpca',
assay = "SCT", verbose = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.