Per state (vs neutral): depth term = ll_depth_shift() with
mu = shift / pmax(ifelse(is.na(sd_null), 1, sd_null), sd_floor) under the
Student-t null of the row's class x stratum (match_depth_null()) or
N(0, 1); allelic term = best of the state's rows of ll_allelic()
(two-sided, or one-sided with sided = "one"); combined = sum (missing channels contribute 0). A state whose
rows have different shifts (tumour amp) takes the best row of depth +
alleles and reports that row's two terms.
Usage
score_cells(
d,
states = caller_states("normal"),
tpar = NULL,
rho,
eps = params$eps,
depth_model = c("t", "gauss"),
params = caller_defaults(),
keep_rows = FALSE,
sided = c("two", "one")
)Arguments
- d
table with
z,sd_null,nA,n_hap(ornB), andclass,stratumfor the t model- states
caller_states()table- tpar
fit_depth_null()output (t model)- rho
beta-binomial overdispersion of the null allele votes (
fit_allelic_null()): one value, or one per row (e.g. per chromosome,rho_by_chrom()); rows are then scored in groups of equal rho- eps
allele error floor
- depth_model
"t" or "gauss"
- params
caller_defaults()(sd_floor,eps)- keep_rows
also return per-row allelic LLRs
ar_<row_id>(and per-row depth LLRsdr_<row_id>of multi-shift states); needed bypool_scores()- sided
allelic term:
"two"(default) = the better offand1 - fper allelic row (votes in an arbitrary orientation);"one"=fon haplotype A only (votes already oriented to the state's major haplotype, e.g. by a clone pseudobulk in the tumour-mode confirmation), so imbalance of the opposite homologue scores negative. Applies to every allelic row, including the per-row columns ofkeep_rows