scib.metrics.hvg_overlap
- scib.metrics.hvg_overlap(adata_pre, adata_post, batch_key, n_hvg=500, verbose=False)
Highly variable gene overlap
Metric that computes the average percentage of overlapping highly variable genes per batch pre post integration.
- Parameters
adata_pre – Unintegrated anndata object
adata_post – Integrated anndata object
batch_key – Batch variable in
adata_post.obs
n_hvg – Number of hvgs to compute per batch
- Returns
Average percentage of overlapping highly variable genes
The score can only be computed on feature spaces. No preprocessing is needed, as the function will perform highly variable gene selection.
Example
# full feature output scib.me.hvg_overlap(adata_unintegrated, adata, batch_key="batch")