API Map¶
RustScenic exposes the workflow as small Python calls. Each stage can be used
alone, or combined through rustscenic.pipeline.run.
RNA Regulatory Network¶
rustscenic.grn.infer(adata, tf_names, n_estimators=500, seed=777)
Returns a pandas.DataFrame with transcription factor, target and importance columns.
Use this when you need a GRNBoost2-style TF-target edge table without depending
on arboreto and dask at runtime.
For very high cell counts, target_block_size=None uses the adaptive
target-blocking default; pass a positive integer only when benchmarking a
specific cache/RSS tradeoff.
AUCell¶
rustscenic.aucell.score(adata, regulons, top_frac=0.05)
Returns a cells by regulons activity matrix.
Use this when you already have regulons and need per-cell TF programme activity.
cisTarget¶
rustscenic.cistarget.enrich(rankings, regulons, nes_threshold=3.0)
Returns motif enrichment rows with AUC and NES values.
Use this for motif support filtering of candidate regulons.
Topics¶
rustscenic.topics.fit(atac_adata, n_topics=30)
rustscenic.topics.fit_gibbs(atac_adata, n_topics=30, n_threads=8)
Use Online VB for smaller or faster exploratory runs. Use collapsed Gibbs for
higher topic diversity at larger K.
ATAC Preprocessing¶
rustscenic.preproc.fragments_to_matrix("fragments.tsv.gz", "peaks.bed")
Returns an AnnData peak matrix suitable for topic modelling.
Pipeline¶
rustscenic.pipeline.run(rna=adata, tfs=tfs, output_dir="out")
Use the orchestrator when you want the full staged workflow and a manifest.
When region_motif_rankings points to a parquet or feather file, the
orchestrator reads only the motif ID column plus the peak columns used by the
current run. This keeps large region-ranking databases from being loaded in
full. Peak IDs in the BED or ATAC matrix must match the ranking database
region IDs.