Computes the marginal likelihood for a segment given copy number, MAF, purity, and model parameters.
Arguments
- C_i
Numeric. Integer copy number for the segment.
- B_i
Numeric. Observed B-allele frequency (MAF) for the segment.
- mu
Numeric. Diploid coverage scale factor (e.g. A value of 1 indicates that the segment mean from GATK does not require adjustment. Additionally, the pseudo-diploid coverage is set to 100.).
- rho
Numeric. Tumor purity (fraction between 0 and 1).
- sigma_C
Numeric. Not directly used in this function, but included for compatibility.
- k
Numeric. Beta distribution concentration parameter.
- lambda
Numeric. Exponential decay parameter for the prior.
- gamma
Numeric. Weight for the prior in the likelihood calculation.
- epsilon
Numeric. Small value to avoid log(0) and zero parameters in beta.
Value
A data frame with columns: major, minor, CN, ccf, Bio_diff, prior, expected_MAF, MAF_ll, weighted_prior, exp_MAF_ll, exp_prior, MAF_likelihood, Segcov, MAF, mu, rho.
Details
The returned data frame contains the following columns:
major: Major allele count
minor: Minor allele count
CN: Total copy number
ccf: Cancer cell fraction
Bio_diff: Biological difference
prior: Prior probability
expected_MAF: Expected MAF
MAF_ll: MAF log-likelihood
weighted_prior: Weighted prior
exp_MAF_ll: Expected MAF log-likelihood
exp_prior: Expected prior
MAF_likelihood: MAF likelihood
Segcov: Segment coverage
MAF: Observed MAF
mu: Mutation multiplicity
rho: Tumor purity
