Usage
mrf(data, method=NULL, exp.label = NULL, Niterations=10000, Nburnin=5000, Poisprior=c(5, 1, 0.5, 1), NBprior=c(5, 1, 1, 1, 0.5, 1, 1, 1), PoisNBprior=c(5,1,1,1, 0.5,1), var.NB=c(0.1, 0.1, 0.1, 0.1), parallel=TRUE)
Arguments
data
A list, whose first argument is a n x 3 matrix with information on the bins. The three columns should contain "Chromosome", "Start" and "Stop" information.
The second argument contains the counts of a single ChIP-seq experiment. This is a n x 1 matrix, where n is the number of bins.
method
A character variable. Can be "Poisson", "PoisNB" or "NB" and it refers to the densities of the mixture distribution. "Poisson" means that a ZIP distribution is used for the background (with parameters pi and mean lambda_B) and a Poisson distribution for the signal (with parameter lambda_S);
"PoisNB" means that a ZIP distribution is used for the bacground (with parameter pi and lambda_B) and a NB distribution for the signal (with mean mu_S and overdispersion phi_S);
"NB" means that a ZINB distribution is used for the background (with parameters pi, mu_B and phi_B) and a NB distribution for the signal (with mean mu_S and overdispersion phi_S).
exp.label
A charater vector, giving a label for experiment.
Niterations
An integer value, giving the number of MCMC iteration steps. Default value is 10000.
Nburnin
An integer value, giving the number of burn-in steps. Default value is 5000.
Poisprior
The gamma priors for the parameter lambda in the Poisson-Poisson mixture: the first two elements are the priors for signal and the second two are priors for background. Default values are (5,1, 0.5, 1).
NBprior
The gamma priors for the mean mu and overdispersion parameter phi in the NB-NB mixture: the first two elements are the priors for mu_S for the signal; the third and fourth elements are priors for phi_S; the fifth and sixth elements are priors for mu_B for the background and the seventh and eighth are priors for phi_B. Default values are (5, 1, 1, 1, 0.5, 1, 1, 1).
PoisNBprior
The gamma priors for lambda_B and mu_S, phi_S in Poisson-NB mixture, the first two are priors for mu_S, the third and the fourth are priors for phi_S, the fifth and the sixth are priors for lambda_B. Default values are (5, 1,1,1, 0.5, 1).
var.NB
The variances used in the Metropolis-Hastling algorithm for estimating (mu_S, phi_S, mu_B, phi_B) for NB mixture or for estimating (mu_S, phi_S) for PoisNB mixture.
Default values are (0.1, 0.1, 0.1, 0.1) or (0.1, 0.1) for NB and PoisNB respectively.
parallel
A logical variable. If TRUE and the experiment has more than one chromosome, then the individual chromosomes will be processed in parallel, using the clusterApplyLB
function in package parallel
. Default value is TRUE.