Per clone, a grid search over the depth contrast c (state mean c * log2(cn / base), base = the
profile's copy-number baseline: the reference ploidy for pool-relative profiles, else 2; haploid
windows (male chrX / chrY, ploidy 1) allow only nB = 0 states and their labels are relative to one
copy; c >= 0.6 because absolute ploidy is unidentifiable: states are relative to the clone baseline),
the orientation attenuation a (expected major fraction 0.5 + a * (f_state - 0.5)) and the
window-level overdispersion rho. Emissions: Student-t (df) on the window log2 with scale = the
window SE combined with the clone's systematic window noise and inflated for its autocorrelation
(see clone_noise), and a two-sided robust beta-binomial on (nA, n_hap) (a 5 % component with 10x the
overdispersion). The objective is the per-window mixture likelihood over the states with the grid
prior weights.
Arguments
- profile
output of
clone_profiles()- grid
state grid (
cn_grid())- contrast
grid of depth contrasts
- atten
grid of orientation attenuations
- rho
grid of window-level overdispersions
- df
degrees of freedom of the depth t
- eps
allele error floor
- refine
refine (c, a, rho) on the segment level: segment at the current fit (Viterbi,
p_switch,min_win), then maximise the sum over segments of the best state's segment likelihood (depth on the precision-weighted segment mean, alleles summed over its windows); two passes- p_switch, min_win
segmentation parameters of the refinement (as
segment_clone())