revise.backend.runners.sp_svc_benchmark.SpSVC
- class revise.backend.runners.sp_svc_benchmark.SpSVC(st_adata, sc_ref_adata, config, real_st_adata, logger)[source]
Bases:
BenchmarkSVCsp-SVC class for benchmark CFs: segmentation/bin2cell.
This class reconstructs single-cell resolution expression profiles from spatial transcriptomics data, with special handling for segmentation errors (diminishing, expanding, unchanged cells).
- __init__(st_adata, sc_ref_adata, config, real_st_adata, logger)[source]
Initialize BaseSVCAnchor.
- Parameters:
st_adata – Spatial transcriptomics AnnData object
sc_ref_adata – Single-cell reference AnnData object
config – Configuration object containing method parameters
real_st_adata – Ground truth spatial data (for benchmarking, can be None)
logger – Logger instance for logging
Methods
__init__(st_adata, sc_ref_adata, config, ...)Initialize BaseSVCAnchor.
global_anchoring(*args, **kwargs)Annotate spatial spots using the configured annotation method.
Reconstruct expression profiles with segmentation-aware smoothing.
- local_refinement()[source]
Reconstruct expression profiles with segmentation-aware smoothing.
Evaluate segmentation errors and flag cells that need correction.
Split each cell type into
replaceandcandidategroups.Use optimal transport between the two groups to obtain smoothed expressions for the
replacecells.Merge corrected and unchanged cells to form
self.svc["sp_svc"].