ComputekBET_ser | R Documentation |
This function calculates the kBET (k-nearest neighbor Batch Effect Test) rejection rate to assess the batch effect correction for a Seurat object, based on a specified dimensional reduction (e.g., PCA, UMAP).
ComputekBET_ser(SerObj, reduction = "pca", dims = 1:15, batch.label = "batch")
SerObj |
A Seurat object containing the single-cell RNA-seq data. |
reduction |
Character. The dimensional reduction method to use for kBET 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"'. |
The mean kBET rejection rate. A lower rejection rate indicates better batch mixing and less batch effect.
# Compute kBET for PCA reduction using batch labels
kbet_score <- ComputekBET_ser(SerObj, reduction = "pca", dims = 1:15, batch.label = "batch")
# Compute kBET for UMAP reduction using batch labels
kbet_score <- ComputekBET_ser(SerObj, reduction = "umap", dims = 1:10, batch.label = "batch")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.