fix(rna_sc): harden load/visualize UMAP against missing embedding/leiden
#1
by anne-voigt - opened
decoupler_load_and_visualize_data called sc.pl.umap(color="leiden") unconditionally and crashed on any h5ad lacking X_umap/leiden β exactly the Loveless raw-count subsets (gse155698_steele, gse205013_werba, biodata-registry 0.1.8).
- _ensure_umap(): reuses precomputed embeddings (pbmc3k unchanged); else runs a bounded normalize+log1p -> pca -> neighbors -> leiden(igraph) -> umap pipeline. Never hard-fails: on failure the plot is skipped and the loaded AnnData + metadata are still returned with a note.
- Grouping detection covers R make.names atlas cols (Clusters, ...); leiden uses flavor="igraph" (no leidenalg dep on the Space).
- Sits on top of the existing _load_adata seam, so the Loveless subsets load AND visualize end-to-end.
- tests/test_rna_sc_load.py (4 green).
Opening as a PR only β not merged, no deploy. Folds into the pending 0.1.8 factory-rebuild.
anne-voigt changed pull request status to merged