scvelo - stochastic single cell RNA velocity


Import scVelo as:

import scvelo as scv

Read / Load

read(filename[, backed, sheet, ext, …]) Read file and return AnnData object.
read_loom(filename[, sparse, cleanup, …]) Read .loom-formatted hdf5 file.

Preprocessing (pp)

pp.filter_genes(data[, min_counts, …]) Filter genes based on number of cells or counts.
pp.filter_genes_dispersion(data[, flavor, …]) Extract highly variable genes.
pp.normalize_per_cell(data[, …]) Normalize each cell by total counts over all genes.
pp.filter_and_normalize(data[, min_counts, …]) Filtering, normalization and log transform
pp.moments(data[, n_neighbors, n_pcs, mode, …]) Computes moments for velocity estimation.

Tools (tl)

tl.velocity(data[, vkey, mode, fit_offset, …]) Estimates velocities in a gene-specific manner
tl.velocity_graph(data[, vkey, xkey, tkey, …]) Computes velocity graph based on cosine similarities.
tl.velocity_embedding(data[, basis, vkey, …]) Computes the single cell velocities in the embedding
tl.transition_matrix(adata[, vkey, basis, …]) Computes transition probabilities from velocity graph
tl.cell_fate(data[, groupby, …]) Computes individual cell endpoints
tl.terminal_states(data[, vkey, groupby, …]) Computes terminal states (root and end points).
tl.rank_velocity_genes(data[, vkey, …]) Rank genes for velocity characterizing groups.
tl.velocity_confidence(data[, vkey, copy]) Computes confidences of velocities.

Plotting (pl)

pl.scatter([adata, x, y, basis, vkey, …]) Scatter plot along observations or variables axes.
pl.velocity(adata[, var_names, basis, …]) Phase and velocity plot for set of genes.
pl.velocity_graph(adata[, basis, vkey, …]) Plot of the velocity graph.
pl.velocity_embedding(adata[, basis, vkey, …]) Scatter plot of velocities on the embedding.
pl.velocity_embedding_grid(adata[, basis, …]) Scatter plot of velocities on a grid.
pl.velocity_embedding_stream(adata[, basis, …]) Stream plot of velocities on the embedding.


datasets.toy_data(n_obs) Randomly samples from the Dentate Gyrus dataset.
datasets.dentategyrus([adjusted]) Dentate Gyrus dataset from Hochgerner et al.
datasets.forebrain() Developing human forebrain.


utils.show_proportions(adata) Fraction of spliced/unspliced/ambiguous abundances
utils.cleanup(data[, clean, keep, copy]) Deletes attributes not needed.
utils.clean_obs_names(data[, base, …]) Cleans up the obs_names and identifies sample names.
utils.merge(adata, ldata[, copy]) Merges two annotated data matrices.


settings.set_figure_params([style, figsize, …]) Set resolution/size, styling and format of figures.