ComputeLISI_Ser | R Documentation |
This function calculates the LISI (Local Inverse Simpson's Index) scores for batch mixing and biological signal preservation based on a specified dimensional reduction (e.g., PCA, UMAP) for a Seurat object.
ComputeLISI_Ser(
SerObj,
reduction = "pca",
dims = 1:15,
batch.label = "batch",
biological.label = "cell_type"
)
SerObj |
A Seurat object containing the single-cell RNA-seq data. |
reduction |
Character. The dimensional reduction method to use for LISI computation (e.g., "pca", "umap"). Default is '"pca"'. |
dims |
Numeric vector. The dimensions of the reduced embedding to use. Default is '1:15'. |
batch.label |
Character. The metadata label representing batch information in 'SerObj@meta.data'. Default is '"batch"'. |
biological.label |
Character. The metadata label representing biological information (e.g., cell type) in 'SerObj@meta.data'. Default is '"cell_type"'. |
A list containing the average batch LISI score ('batch_LISI') and the average biological LISI score ('biological_LISI'). A higher batch LISI score indicates better mixing, and a higher biological LISI score indicates better preservation of biological signal.
# Compute LISI scores for PCA reduction with batch and cell type labels
lisi_scores <- ComputeLISI_Ser(SerObj, reduction = "pca", dims = 1:15, batch.label = "batch", biological.label = "cell_type")
# Compute LISI scores for UMAP reduction
lisi_scores <- ComputeLISI_Ser(SerObj, reduction = "umap", dims = 1:10, batch.label = "batch", biological.label = "cell_type")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.