Learn R Programming

MEAL (version 1.2.3)

DARegion: Detect regions differentially methylated

Description

This function is a wrapper of two known region differentially methylated detection methods: Bumphunter and DMRcate. blockFinder implementation present in minfi package is also available.

Usage

DARegion(set, model, proberes, methods = c("blockFinder", "bumphunter", "DMRcate"), coefficient = 2, num_permutations = 0, bumphunter_cutoff = 0.05, bumps_max = 30000, num_cores = 1, verbose = FALSE, ...)

Arguments

set
MethylationSet.
model
Model matrix representing a linear model.
proberes
Data.frame or list of data.frames with the results of DAProbe
methods
Character vector with the names of the methods used to estimate the regions. Valid names are: "blockFinder", "bumphunter" and "DMRcate".
coefficient
Numeric with the index of the model matrix used to perform the analysis.
num_permutations
Numeric with the number of permutations used to calculate p-values in bumphunter and blockFinder
bumphunter_cutoff
Numeric with the threshold to consider a probe significant. If one number is supplied, the lower limit is minus the upper one. If two values are given, they will be upper and lower limits.
bumps_max
Numeric with the maximum number of bumps allowed.
num_cores
Numeric with the number of cores used to perform the permutation.
verbose
Logical value. If TRUE, it writes out some messages indicating progress. If FALSE nothing should be printed.
...
Further arguments passsed to bumphunter function.

Value

List with the main results of the three methods. If a method is not chosen, NA is returned in this position.

Details

DARegion performs a methylation region analysis using bumphunter and DMRcate. Bumphunter allows the modification of several parameters that should be properly used. Cutoff will determine the number of bumps that will be detected. The smaller the cutoff, the higher the number of positions above the limits, so there will be more regions and they will be greater. Bumphunter can pick a cutoff using the null distribution, i.e. permutating the samples. There is no standard cutoff and it will depend on the features of the experiment. Permutations are used to estimate p-values and, if needed, can be used to pick a cutoff. The advised number of permutation is 1000. The number of permutations will define the maximum number of bumps that will be considered for analysing. The more bumps, the longer permutation time. As before, there is not an accepted limit but minfi tutorial recommends not to exceed 30000 bumps. Finally, if supported, it is very advisable to use parallelization to perform the permutations. Due to minfi design, BlockFinder can only be run using own minfi annotation. This annotation is based on hg19 and Illumina 450k chipset. Cpg sites not named like in this annotation package will not be included. As a result, the use of BlockFinder is not recommended.

DMRcate uses a first step where linear regression is performed in order to estimate coefficients of the variable of interest. This first step is equal to the calculation performed in DAProbe, but using in this situation linear regression and not robust linear regression. The results of DAProbe can be supplied in proberes argument, skipping this first step. DARegion supports multiple variable analyses. If coefficient is a vector, a list of lists will be returned. Each member will be named after the name of the column of the model matrix.

See Also

bumphunter, blockFinder, dmrcate

Examples

Run this code
if (require(minfiData)){
 set <- prepareMethylationSet(minfi::getBeta(MsetEx)[1:10, ], pheno = pData(MsetEx))
 model <- model.matrix(~Sample_Group, data = pData(MsetEx)) 
 res <- DARegion(set, model) 
 res
}

Run the code above in your browser using DataLab