API#

Preprocessing#

pp.bin_data(adata[, n_bins, layer])

Discretize expression values into n_bins per-cell quantile bins.

pp.slice_and_bin(adata, species[, binning, ...])

Subset to species-specific manual genes and bin the chosen layer.

pp.get_genes(species)

Return the manually curated gene list for a species.

pp.align_to_genes(adata, genes, *[, ...])

Subset/reindex an AnnData to a fixed gene panel and order.

Tools#

tl.extend_atlas(query, atlas, species, *[, ...])

Map a query dataset onto the reference atlas via scArches surgery.

tl.embed_and_predict(adata, species, *[, ...])

Embed a query dataset with a packaged SCANVI model and predict cell types.

tl.predict_labels(adata, species, *[, ...])

Predict hierarchical Level-4 cell-type labels for a query dataset.

tl.HierarchicalClassifier(root, malignant, ...)

Wraps the three MLPs of the hierarchical classifier for one species.

tl.MLP(n_genes, n_classes[, hidden, dropout])

A simple feed-forward classifier with BatchNorm + dropout hidden blocks.

tl.derive_malignant_mask(level4)

Derive a boolean malignant mask from Level-4 labels.

Plotting#

pl.plot_label_distribution(adata[, key, ax])

Plot a horizontal bar chart of the value counts of an obs column.

pl.basic_plot(adata)

Placeholder plotting function kept for template/back-compat purposes.

Models#

models.list_models()

List the directory names of packaged ScanVI models.

models.available_models()

Return a mapping {alias -> directory name} for packaged ScanVI models.

models.load_scanvi_model(alias, *, adata[, ...])

Load a packaged ScanVI model by alias using scvi-tools' SCANVI.load.

models.load_classifier_checkpoints(species)

Load the three hierarchical-classifier checkpoints for a species.