External API

Import Scanpy’s wrappers to external tools as:

import scanpy.external as sce

Preprocessing: PP

Batch effect correction

pp.bbknn(adata[, batch_key, save_knn, 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].

Clustering and trajectory inference

tl.phenograph(data[, 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, **kwargs) Scatter plot in PHATE basis.


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.