External API

Import Scanpy’s wrappers to external tools as:

import scanpy.external as sce

If you’d like to see your tool included here, please open a pull request!

Preprocessing: PP

Batch effect correction

pp.bbknn(adata[, batch_key, copy])

Batch balanced kNN [Park18].

pp.mnn_correct(*datas[, var_index, …])

Correct batch effects by matching mutual nearest neighbors [Haghverdi18] [Kang18].


Note that the fundamental limitations of imputation are still under debate.

pp.dca(adata[, mode, ae_type, …])

Deep count autoencoder [Eraslan18].

pp.magic(adata[, name_list, k, a, t, n_pca, …])

Markov Affinity-based Graph Imputation of Cells (MAGIC) API [vanDijk18].

Tools: TL


tl.phate(adata[, n_components, k, a, …])

PHATE [Moon17].


Run Diffusion maps using the adaptive anisotropic kernel [Setty18].

Clustering and trajectory inference

tl.phenograph(adata[, k, directed, prune, …])

PhenoGraph clustering [Levine15].

Gene scores, Cell cycle

tl.sandbag(adata, annotation, gene_names, …)

Generate pairs of genes [Scialdone15] [Fechtner18].

tl.cyclone(adata, marker_pairs, gene_names, …)

Assigns scores and predicted class to observations [Scialdone15] [Fechtner18].

Plotting: PL

pl.phate(adata, basis, *[, color, …])

Scatter plot in PHATE basis.


Run Diffusion maps using the adaptive anisotropic kernel [Setty18].


exporting.spring_project(adata, project_dir, …)

Exports to a SPRING project directory [Weinreb17].

exporting.cellbrowser(adata, data_dir, data_name)

Export adata to a UCSC Cell Browser project directory.