For a fixed-mean emission (the default, reproducing the Python count caller)
this resolves theta and the transition and is otherwise a no-op. For a
fittable-mean emission (fit_means = TRUE; required for RNA / reference-biased
data per S10) it Baum-Welch EM-fits the emission means. Viterbi/EM hot loops
are in Rcpp.
Usage
fit(obs, emission, duration, priors, control = list())Arguments
- obs
A per-(sample, chromosome) observation table from an emission's reader (for
count: columnsn,a).- emission
Emission spec (
emission_count()/emission_gt()).- duration
Duration spec (
duration_geometric()/duration_rigidity()/duration_hsmm()).- priors
Single-locus genotype-frequency priors
list(f_1, f_2).- control
EM control (
max_iter,tol).
Examples
# Per-(sample, chromosome) count obs: n = depth, a = alt count.
obs <- data.frame(n = c(10, 9, 11, 8, 12), a = c(0, 0, 1, 4, 6))
model <- fit(obs, emission_count(), duration_geometric(1e-4),
priors = list(f_1 = 0.0625, f_2 = 0.0938))