CalckBET | R Documentation |
Wrapper function of kBET for Seurat SerObjs.
CalckBET(
SerObj,
ident,
k0 = NULL,
knn = NULL,
assay = "RNA",
layer = "scale.data",
...
)
SerObj |
A Seurat SerObj. |
k0 |
Neighborhood size. By default k0 = mean batch size. To prevent kBET rejection rate from saturating to 1, lower this value. |
assay |
Assay used for sketching. "RNA" by default. |
... |
Arguments passed to kBET. |
sketch.size |
Number of cells to sketch. By default sketch 1000 cells. |
slot |
By default slot = "data". |
General principles behind kBET:
When batch effect exists in a dataset, the dataset contains disproportional amounts of samples from each batch within neiborhoods surrounding each point. Using Chi-squared statistics, test whether the proportion of each batch within a neighborhood is disproportional. If it's not proportional (i.e. p < critical value), reject null hypothesis (proportional distribution). kBET aggregates the test results computed from multiple neighborhoods, and reports a "rejection rate" as a metric for batch effect. High rejection rate indicates strong batch effect, whereas low "rejection rate" indicates mild batch effect. For "acceptance rate", it is simply a rescaled value of "rejection rate", computed as 'acceptance rate = 1 - rejection rate'.
Publication: Büttner, M., Miao, Z., Wolf, F.A., Teichmann, S.A., and Theis, F.J. (2019). A test metric for assessing single-cell RNA-seq batch correction. Nat Methods.
Github repo: https://github.com/theislab/kBET
A list containing detailed results calculated by kBET.
res <- CalckBET(pbmc_small, "groups")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.