predict.GammaMixt {MethylIT.utils}R Documentation

Predict function for the DMP's Mixtures of Gamma Distributions model

Description

This is an utility function to get the density, probailities, and posterior probability predictions based on a given DMP's Mixtures of Gamma Distributions (GMD) model, obtained with function gammaMixtCut.

Usage

## S3 method for class 'GammaMixt'
predict(gmd, pred = "quant", q = 0.95,
  div.col = NULL, interval = NULL)

Arguments

gmd

An object carrying the best nonlinear fit for a distribution model obtained with function nonlinearFitDist ('GammaMixt' class).

pred

Type of prediction resquested: *density* ("dens"),*quantiles* ("quant"), *random number* ("rnum"), *probabilities* ("prob"), or classification *posterior probability* ("postPrb").

q

numeric vector of quantiles, probabilities or an interger if pred = "rnum", or A "pDMP"or "InfDiv" object obtained with functions getPotentialDIMP or estimateDivergence. These are list of GRanges objects, where each GRanges object from the list must have at least two columns: a column containing the total variation of methylation level (TV, difference of methylation levels) and a column containing a divergence of methylation levels (it could be TV or Hellinger divergence).

div.col

An integer. If 'q' is "pDMP"or "InfDiv" object, then it is the column number for the divergence of methylation levels used in the estimation of model 'gmd'. Default: NULL.

interval

a vector containing the end-points of the interval to be searched for the quantile(s). An interval would be, e.g., 'interval = c(min(x), max(x))', where 'x' is the variable used to estimate model 'gmd'.

num.cores, tasks

Paramaters for parallele computation using package BiocParallel-package: the number of cores to use, i.e. at most how many child processes will be run simultaneously (see bplapply and the number of tasks per job (only for Linux OS).

Details

Predictions are based on the best model fit returned by function nonlinearFitDist. The possible prediction are: *density*, *quantiles*, *random number* or *probabilities*.


[Package MethylIT.utils version 0.3.1 ]