Compute per-cell Local Inverse Simpson's Index (LISI) scores from a
dimensional reduction and store them in the meta.data and tools slots
of a Seurat object.
Usage
RunLISI(
srt,
reductions = NULL,
reduction = NULL,
dims = NULL,
label_colnames = NULL,
prefix = NULL,
tool_name = NULL,
perplexity = 30,
tol = 1e-05,
max_iter = 50,
overwrite = TRUE,
verbose = TRUE
)Arguments
- srt
A
Seuratobject.- reductions
Character vector of dimensional reductions used to compute LISI. If
NULL,DefaultReduction()is used.- reduction
Deprecated alias of
reductions.- dims
Dimensions to use from the reduction. Default is
NULL, which uses all available dimensions.- label_colnames
Character vector of metadata columns used for LISI. If
NULL,RunLISI()will try to usesrt@misc[["integration_batch"]].- prefix
Prefix used for the stored LISI metadata columns. If
NULL, the reduction names are used.- tool_name
Name used to store detailed results in
srt@tools. Default is"LISI"when multiple reductions are provided, otherwisepaste0(prefix, "_LISI").- perplexity
Effective neighborhood size. Default is
30.- tol
Tolerance used in the binary search for the target perplexity. Default is
1e-5.- max_iter
Maximum number of binary-search iterations. Default is
50.- overwrite
Whether to overwrite existing metadata columns. Default is
TRUE.- verbose
Whether to print the message. Default is
TRUE.
Examples
data(panc8_sub)
panc8_sub <- integration_scop(
panc8_sub,
batch = "tech",
integration_method = "Harmony5"
)
names(panc8_sub@reductions)
panc8_sub <- RunLISI(
panc8_sub,
reductions = c("pcaUMAP2D", "Harmony5UMAP2D")
)
LISIPlot(
panc8_sub,
combine = TRUE
)