Usage
Clomial.iterate(Dt, Dc, Mu, P, maxIt=100, U = NULL, PTrue = NULL,
llCutoff = 10^(-3), computePFunction = compute.P.reparam,
doSilentOptim = TRUE, doTalk = TRUE, doLog = TRUE, debug = FALSE,
noiseReductionRate = 0.01, fliProb=0.05,conservative=TRUE)
Arguments
maxIt
The maximum number of EM iterations.
Dt
A matrix which contains the counts of the alternative allele
where rows correspond to the genomic loci, and columns
correspond to the samples.
Dc
A matrix which contains the counts of the total number of mapped
reads where rows correspond to the genomic loci, and columns
correspond to the samples.
Mu
The initial value for the Mu matrix which models the genotypes,
where rows and columns correspond to genomic loci and clones, accordingly.
P
The initial matrix of clonal frequency where rows and columns
correspond to clones and samples, accordingly.
U
The true value for Mu
, used for debugging purposes only.
PTrue
The true value for P
, used for debugging purposes only.
llCutoff
EM iterations stops if the relative improvement in the
log-likelihood is not more than this threshold.
computePFunction
The function used for updating P
.
For advanced development use only.
doSilentOptim
If TRUE, the optimization massages will not be reported.
doTalk
If FALSE, the function will be run in silent mode.
doLog
Highly recommended to set to TRUE. Then, the computations will
be done in log space to avoid numerical issues.
debug
If TRUE, the debug mode will be turned on.
noiseReductionRate
The noise will be reduce by this rate after each EM iteration.
fliProb
A "flipping probability" used for noise injection which can be
disabled when fliProb=0
. After the first EM iteration,
each entry of the matrix Mu
such as m
may change
to 1-m
with this probability. This probability decreases
on subsequent iterations.
conservative
Boolean where TRUE means noise will be injected only if
likelihood is improved after an EM iteration, otherwise the
original Mu matrix will be used for the next iteration.
For expert use only.