API

The stable public entry point is REVISEPipeline. It resolves revise/revise.yaml profiles, applies runtime and IO overrides, and routes each run to the appropriate backend strategy.

Start with Quick Start for runnable examples and Architecture for the full lifecycle. This page is the reference surface for classes and extension points.

REVISE API architecture

Current API architecture.

from revise.framework import REVISEPipeline

pipeline = REVISEPipeline()
svc = pipeline.run(
    profile="application_sc",
    runtime_overrides={"platform": "iST", "confounding": "segmentation"},
    io_overrides={
        "data_root": "raw_data/Real_application",
        "output_root": "output/sc_SVC_case",
        "sample_name": "P2CRC",
        "st_file": "Xenium.h5ad",
        "sc_ref_file": "adata_sc_all_reanno.h5ad",
    },
    set_overrides=["sc.select_ct=T"],
)

Pipeline

revise.framework.REVISEPipeline

Unified orchestration API for all REVISE tasks and modes.

revise.recon.context.PipelineContext

revise.recon.pipeline.UnifiedReconstructionPipeline

revise.svc.SVC

Canonical result carrier for all unified REVISE runs.

Facade Helpers

The facade helpers are thin wrappers around REVISEPipeline.run for callers that want named sp-SVC or sc-SVC functions while still using the unified config surface.

revise.recon.facade.sp_svc

revise.recon.facade.sc_svc

Configuration

revise/revise.yaml is the external configuration and routing surface. revise.config.runner_conf contains internal runner contracts used by backend adapters and compatibility notebooks.

revise.config.runner_conf.ApplicationSpConf

revise.config.runner_conf.ApplicationScConf

revise.config.runner_conf.ApplicationScSrConf

revise.config.runner_conf.BenchmarkSrConf

revise.config.runner_conf.BenchmarkSegConf

revise.config.runner_conf.BenchmarkImputeConf

Analysis Services

Analysis services consume the unified SVC result carrier and provide notebook-compatible downstream helpers.

revise.analysis.ScSVCAnalysisService

Downstream sc-SVC analysis that consumes unified SVC only.

revise.analysis.SpSVCAnalysisService

Basic downstream metrics for sp-SVC outputs.

revise.analysis.compute_metric

Compute per-gene expression reconstruction metrics.

revise.analysis.compute_clustering_metrics

Compute ARI/NMI from predicted and reference labels in adata.obs.

Registries and Plugins

These classes are the extension points used by the unified backend.

revise.backend.registry.StrategyRegistry

revise.backend.registry.PluginRegistry

revise.backend.contracts.LocalRefinementStrategy

Task-level reconstruction strategy contract.

revise.backend.contracts.PlatformAdapter

revise.backend.contracts.CFStrategy

revise.backend.contracts.OTSolver

Backend Compatibility Runners

These classes are kept for notebooks, parity checks, and low-level debugging. New application and benchmark code should prefer REVISEPipeline or the root wrapper scripts.

revise.backend.runners.sp_svc_application.SpSVC

sp-SVC class for application usage.

revise.backend.runners.sc_svc_application.ScSVC

sc-SVC class for application usage.

revise.backend.runners.sc_svc_sr_application.ScSVCSr

sc-SVC super-resolution for application usage.

revise.backend.runners.sp_svc_benchmark.SpSVC

sp-SVC class for benchmark CFs: segmentation/bin2cell.

revise.backend.runners.sc_svc_sr_benchmark.ScSVCSr

sc-SVC super-resolution for benchmark CFs: spot size/ batch effect.

revise.backend.runners.sc_svc_impute_benchmark.ScSVCImpute

Single-cell SVC imputation for benchmark CFs: gene panel/gene dropout.