Calculates a metric that describes how well the local structure of each group prior to integration is preserved after integration. This procedure works as follows: For each group, compute a PCA, compute the top num.neighbors in pca space, compute the top num.neighbors in corrected pca space, compute the size of the intersection of those two sets of neighbors. Return the average over all groups.
LocalStruct(
object,
grouping.var,
idents = NULL,
neighbors = 100,
reduction = "pca",
reduced.dims = 1:10,
orig.dims = 1:10,
verbose = TRUE
)
Seurat object
Grouping variable
Optionally specify a set of idents to compute metric for
Number of neighbors to compute in pca/corrected pca space
Dimensional reduction to use for corrected space
Number of reduced dimensions to use
Number of PCs to use in original space
Display progress bar
Returns the average preservation metric