Usage
DMRViterbi(mv, pars, L = rep(1, nrow(mv)), starting = NULL,
pd = NULL, region = TRUE,
orderBy = c("max", "mean", "median", "min"), VitP = NULL)Arguments
mv
The input M-values matrix, NA is not allowed.
pars
The list of model parameters. Getting by calling 'DMRMark'.
L
A vector to specify the distance between each probes in bp.
$L < 0$ represents
change of chromosome. Default is $L = 1$ for all probes.
starting
A vector to specify the position
to initial new chains. We suggest new chains
should be initiated at least at starting of new chromosome.
When it is null, new chains initiate at beginning and where $L > 100000
or $L < 0$.
pd
A design matrix, which can be generated by 'stats::model.matrix'.
If the M-values are totally paired or single paired, just leave it to be NULL.
region
If set to TRUE, this function returns the regions formed by
Viterbi posterior states. Otherwise, it returns posterior probabilities
and states for individual loci. Default is TRUE.
orderBy
Only enabled when 'region = TRUE'.
Order the regions by which statistics? Choice include 'max', 'mean', 'median' and 'min', which orders the regions by the maximum, geometric mean,
median or minimum of the posterior probabilities in each region respectively.
Default is 'max'.
VitP
Only enabled when 'region = FALSE'.
The minimum posterior probabilities required to be the DMC states.
A locus with DMC's posterior probability lower than 'VitP' will in the
non-DMC states with highest probabilities. When set to NULL, simply return
the MAP states. Default is NULL.