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

Data integration

pp.bbknn(adata[, batch_key, approx, metric, …])

Batch balanced kNN [Polanski19].

pp.harmony_integrate(adata, key[, basis, …])

Use harmonypy [Korunsky19] to integrate different experiments.

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, knn, decay, …])

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

pp.scvi(adata[, n_hidden, n_latent, …])

SCVI [Lopez18].

Tools: TL


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

PHATE [Moon17].

tl.palantir(adata[, normalize, …])

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

tl.trimap(adata[, n_components, n_inliers, …])

TriMap: Large-scale Dimensionality Reduction Using Triplets [Amid19].

tl.sam(adata[, max_iter, num_norm_avg, k, …])

Self-Assembling Manifolds single-cell RNA sequencing analysis tool [Tarashansky19].

Clustering and trajectory inference

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

PhenoGraph clustering [Levine15].

tl.harmony_timeseries(adata, tp[, …])

Harmony time series for data visualization with augmented affinity matrix at discrete time points [Nowotschin18i].

tl.wishbone(adata, start_cell[, branch, k, …])

Wishbone identifies bifurcating developmental trajectories from single-cell data [Setty16].

Gene scores, Cell cycle

tl.sandbag(adata[, annotation, fraction, …])

Calculate marker pairs of genes.

tl.cyclone(adata[, marker_pairs, …])

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

Plotting: PL

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

Scatter plot in PHATE basis.

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

Scatter plot in TriMap basis.

tl.palantir(adata[, normalize, …])

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

pl.sam(adata[, projection, c, cmap, …])

Scatter plot using the SAM projection or another input projection.

pl.wishbone_marker_trajectory(adata, markers)

Plot marker trends along trajectory, and return trajectory branches for further analysis and visualization (heatmap, etc..)


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.