API Reference#

Core workflow#

multi_sample_nmf

Run NMF independently for each sample and collect gene loadings.

derive_nmf_metaprograms

Derive consensus meta-programs (MPs) across all NMF programs.

get_metaprogram_metrics

Compute per-meta-program quality metrics.

compute_mp_scores

Compute module scores for each meta-program.

find_optimal_n_mp

Determine the optimal number of meta-programs via silhouette score.

Filtering and editing#

filter_by_scores

Identify meta-programs that fall below quality-metric thresholds.

filter_for_significant_obs

Keep only MPs whose scores differ significantly between one condition and the rest.

drop_meta_programs

Remove one or more meta-programs from result_dict in-place.

merge_meta_programs

Merge two or more meta-programs into a single consensus program.

propose_mp_actions

Suggest DROP or MERGE actions for low-quality meta-programs.

apply_mp_actions

Apply DROP and MERGE actions proposed by propose_mp_actions().

GSEA#

run_gsea_pipeline

Run the full GSEA workflow for all meta-programs.

plot_gsea_results

Bar plots of enriched terms per meta-program.

Visualisation#

plot_heatmap

Plot a cosine-similarity heatmap with optional cluster boundaries.

plot_convergence_plots

Plot NMF convergence curves for one or multiple samples.

plot_mp_scores_on_umap

Overlay MP module scores on a UMAP embedding.

show_distribution_over_obs

Violin plots of MP module scores across obs categories.

recompute_pca_umap

Recompute PCA and UMAP on adata in-place.

Report#

get_html

Generate a self-contained tabbed HTML report of kaleidocell results.

Bundled files#

files

Registry of data files bundled with kaleidocell.