iscc.data.VisiumBatchHyperParams
dataclass
¶
VisiumBatchHyperParams(protocol: str = 'visium', spot_pitch: float = 2.0, spot_radius: float = 1.0, mu_counts: float = 20000.0, sigma_counts: float = 0.45, field_lengthscale: float = 18.0, field_sigma: float = 0.7, edge_sigma: float = 0.3, diffusion_sigma: float = 0.0, sigma_batch: float = 0.1, ambient_frac: float = 0.05, count_model: str = 'dm', kappa: float = 50.0, nb_dispersion: float = 0.3)
The Visium assay's technical parameters — a defaults container.
Holds the protocol-typical magnitudes of the Visium spatial count model: the spot
geometry (pitch, radius), the per-spot library size, the spatially-correlated
capture-efficiency field (lengthscale, strength, tissue-edge falloff), lateral mRNA
diffusion, and the shared per-gene batch factor / ambient soup / pluggable count
model. The Visium assay builds one and lets you override any
field, and estimate_visium fits these same parameters
from real data.
Attributes:
| Name | Type | Description |
|---|---|---|
protocol |
str
|
Protocol preset the magnitudes come from (e.g. "visium"). |
spot_pitch |
float
|
Spot centre-to-centre spacing (sets spot density / spots-per-tissue). |
spot_radius |
float
|
Spot capture radius (sets spot->cell aggregation, ~1-10 cells/spot). |
mu_counts |
float
|
Mean per-spot library size (total UMIs / spot). |
sigma_counts |
float
|
Per-spot library-size LogNormal sd. |
field_lengthscale |
float
|
Capture-field spatial autocorrelation scale (the SE-GP length-scale); larger -> smoother field -> higher Moran's I. |
field_sigma |
float
|
Capture-field strength (log-space sd of the smooth field). |
edge_sigma |
float
|
Tissue-boundary capture-efficiency falloff (0 = none; <1 keeps it positive). |
diffusion_sigma |
float
|
Lateral mRNA bleed: Gaussian kernel sd spreading expression to neighbours. |
sigma_batch |
float
|
Per-gene batch-factor LogNormal sd. |
ambient_frac |
float
|
Fraction of the spot library that is ambient ("soup") contamination. |
count_model |
str
|
Count emission {"dm" (default, compositional capture), "nb"}. |
kappa |
float
|
Dirichlet-Multinomial concentration (only for count_model="dm"). |
nb_dispersion |
float
|
NB overdispersion phi (var = mu + phi*mu^2; only for count_model="nb"). |