netmap.downstream.clustering

Dimensionality reduction, clustering, and label-matching utilities for GRN AnnData.

The main pipeline entry process() runs PCA → kNN → Leiden → UMAP then adds spectral clustering labels. unify_group_labelling() remaps GRN cluster labels to match a reference expression object’s clusters.

Functions

downstream_recipe

Run the standard Scanpy dimensionality-reduction and clustering pipeline.

process

Prepare GRN AnnData and run the full clustering pipeline.

spectral_clustering

Run scikit-learn spectral clustering on the neighbour graph of an AnnData object.

unify_group_labelling

Match overclustered GRN labels to a reference clustering using argmax assignment.