Skip to content

iscc.data.RNABatchHyperParams dataclass

RNABatchHyperParams(protocol: str = '10x', sigma_batch: float = 0.1, mu_lib: float = 2400.0, sigma_lib: float = 0.43, dispersion: float = 0.3, ambient_frac: float = 0.05, doublet_rate: float = 0.05, dropout_mid: float = 0.0, dropout_shape: float = 1.0, well_sigma: float = 0.0, n_wells: int = 0, n_plates: int = 0, plate_sigma: float = 0.0, depth_batch_sigma: float = 0.05, kappa: float = 50.0)

The scRNA assay's technical parameters — a defaults container.

Holds the protocol-typical magnitudes of the scRNA count model: the batch and library-size scales, the NB overdispersion and logistic dropout curve, and the ambient / doublet contamination rates. The scRNA assay builds one from its protocol preset and lets you override any field, and estimate_rna fits these same parameters from real data.

Attributes:

Name Type Description
protocol str

Protocol preset the magnitudes come from (e.g. "10x", "smartseq3").

sigma_batch float

Per-gene batch-factor LogNormal sd; beta_gb ~ LogNormal(0, sigma_batch^2), shared across every cell of the batch.

mu_lib float

Mean library size (counts / cell) — the sequencing depth.

sigma_lib float

Per-cell library-size LogNormal sd.

dispersion float

NB overdispersion phi (var = mu + phi*mu^2); used only by the "nb" count model (phi <= 0 collapses to Poisson).

ambient_frac float

Fraction of the library that is ambient ("soup") contamination.

doublet_rate float

Fraction of barcodes that are doublets (two cells merged).

dropout_mid float

Logistic dropout midpoint in expected-count space (0 disables dropout).

dropout_shape float

Logistic dropout steepness (active only when dropout_mid > 0).

well_sigma float

Per-well library-size LogNormal sd. Plate protocols (Smart-seq3) sort one cell per well, so this is both the per-well and the per-cell term; 0 disables it.

n_wells int

Wells per plate (384 for Smart-seq3). 0 marks a protocol with no plates (droplet), which turns the whole plate layer off.

n_plates int

How many plates the assayed cells are spread over; 0 means "as many as they need". Grown automatically if the cells do not fit (one cell per well).

plate_sigma float

Per-PLATE library-size LogNormal sd: every cell on a plate shares one depth offset, so depth is plate-nested (plate effect x well effect). 0 disables the plate effect and leaves the layout as pure bookkeeping.

depth_batch_sigma float

Per-batch depth-shift LogNormal sd (so batches differ in depth).

kappa float

Dirichlet concentration for the "dm" count model only (large kappa -> multinomial/Poisson-like, small kappa -> lumpy over-dispersed proportions).