CN: per-probe LRR noise from the batch reference (CYTO-042), --probe-lrr-sd/--no-probe-lrr-sd

This commit is contained in:
kemal committed 2026-09-29 12:00:04 +01:00
1 parent a04091a701
commit c9aacf7d51
6 files changed
+67 -7

No files matched your search

+3 -2
View File
@@ -8,7 +8,8 @@ weights, switch model]
* Diploid regions: CN0, CN1, CN2, CN2-LOH, CN3, CN3-LOH, CN4 and mosaic loss / gain / CN-LOH at cell fractions
0.2, 0.4, 0.6, 0.8. Haploid regions (male X outside PAR, male Y): CN0, CN1, CN2 and mosaic gain/loss relative to
the region's median LRR.
* LRR ~ (1−ε)·N(µ_state, σ) + ε·U(−5, 3); σ = 1.4826·MAD of the sample's autosomal LRR (floor 0.08); CN0 σ = 2.
* LRR ~ (1−ε)·N(µ_state, σ) + ε·U(−5, 3); σ = 1.4826·MAD of the sample's autosomal LRR (floor 0.08), scaled per
probe by the reference's LRR spread (CYTO-042); CN0 σ = 2.
Mosaic means interpolate linearly between the constitutional means by the cell fraction.
* BAF ~ (1−ε)·Σ_g w_g N(b_g, σ_b) + ε·U(0, 1); genotype weights from the probe's PFB p (binomial in the copy
number; LOH: {0: 1−p, 1: p}); mosaic heterozygotes split into the two bands 0.5 ± d(f).
@@ -106,7 +107,7 @@ def _norm(x: F64, mu: float, sd: float | F64) -> F64:
@dataclass
class Params:
lrr_sd: float
lrr_sd: float | F64 # scalar or per probe (CYTO-042)
baf_sd: float
lrr_offset: float = 0.0 # added to every state mean (haploid regions: the region's median LRR)
switch_d: float = SWITCH_D