revise.backend.runners.sc_svc_sr_benchmark.ScSVCSr

class revise.backend.runners.sc_svc_sr_benchmark.ScSVCSr(st_adata, sc_ref_adata, config, real_st_adata, logger)[source]

Bases: BenchmarkSVC

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

This class reconstructs single-cell resolution expression profiles from spatial transcriptomics data by redistributing spot-level expressions to virtual cells using cell type contributions.

__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.

local_refinement(*args, **kwargs)

Reconstruct single-cell expression profiles from spot-level data.

local_refinement(*args, **kwargs)[source]

Reconstruct single-cell expression profiles from spot-level data.

  1. Assigns cell types to each virtual cell using SpotSr

  2. Constructs cell type reference profiles

  3. Calculates gene expression for each cell based on spot contributions

  4. Normalizes expressions to 10,000 counts per cell

The reconstructed data is stored in self.svc[“sc_svc_dec”].

_apply_graph_aggregation(SVC_X)[source]

Apply optional OT-based graph aggregation to SR virtual cells.

The implementation mirrors the application-time SR graph smoothing but is kept optional in benchmark mode so raw vs. graph-aggregated metrics can be compared under the same noisy input.