This function computes the differentially methylated regions between two conditions.
1 2 3 4 5 6  computeDMRs(methylationData1, methylationData2, regions = NULL,
context = "CG", method = "noise_filter", windowSize = 100,
kernelFunction = "triangular", lambda = 0.5, binSize = 100,
test = "fisher", pValueThreshold = 0.01, minCytosinesCount = 4,
minProportionDifference = 0.4, minGap = 200, minSize = 50,
minReadsPerCytosine = 4, cores = 1)

methylationData1 
the methylation data in condition 1
(see 
methylationData2 
the methylation data in condition 2
(see 
regions 
a 
context 
the context in which the DMRs are computed ( 
method 
the method used to compute the DMRs ( 
windowSize 
the size of the triangle base measured in nucleotides.
This parameter is required only if the selected method is

kernelFunction 
a 
lambda 
numeric value required for the Gaussian filter
( 
binSize 
the size of the tiling bins in nucleotides. This parameter is
required only if the selected method is 
test 
the statistical test used to call DMRs ( 
pValueThreshold 
DMRs with pvalues (when performing the statistical
test; see 
minCytosinesCount 
DMRs with less cytosines in the specified context
than 
minProportionDifference 
DMRs where the difference in methylation
proportion between the two conditions is lower than

minGap 
DMRs separated by a gap of at least 
minSize 
DMRs with a size smaller than 
minReadsPerCytosine 
DMRs with the average number of reads lower than

cores 
the number of cores used to compute the DMRs. 
the DMRs stored as a GRanges
object with the following
metadata columns:
a number indicating whether the region lost (1) or gain (+1) methylation in condition 2 compared to condition 1.
the context in which the DMRs was computed ("CG"
,
"CHG"
or "CHH"
).
the number of methylated reads in condition 1.
the total number of reads in condition 1.
the proportion methylated reads in condition 1.
the number of methylated reads in condition 2.
the total number reads in condition 2.
the proportion methylated reads in condition 2.
the number of cytosines in the DMR.
a string indicating whether the region lost ("loss"
)
or gained ("gain"
) methylation in condition 2 compared to condition 1.
the pvalue (adjusted to control the false discovery rate with the Benjamini and Hochberg's method) of the statistical test when the DMR was called.
Nicolae Radu Zabet and Jonathan Michael Foonlan Tsang
filterDMRs
, mergeDMRsIteratively
,
analyseReadsInsideRegionsForCondition
and
DMRsNoiseFilterCG
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36  # load the methylation data
data(methylationDataList)
# the regions where to compute the DMRs
regions < GRanges(seqnames = Rle("Chr3"), ranges = IRanges(1,1E5))
# compute the DMRs in CG context with noise_filter method
DMRsNoiseFilterCG < computeDMRs(methylationDataList[["WT"]],
methylationDataList[["met13"]], regions = regions,
context = "CG", method = "noise_filter",
windowSize = 100, kernelFunction = "triangular",
test = "score", pValueThreshold = 0.01,
minCytosinesCount = 4, minProportionDifference = 0.4,
minGap = 200, minSize = 50, minReadsPerCytosine = 4,
cores = 1)
## Not run:
# compute the DMRs in CG context with neighbourhood method
DMRsNeighbourhoodCG < computeDMRs(methylationDataList[["WT"]],
methylationDataList[["met13"]], regions = regions,
context = "CG", method = "neighbourhood",
test = "score", pValueThreshold = 0.01,
minCytosinesCount = 4, minProportionDifference = 0.4,
minGap = 200, minSize = 50, minReadsPerCytosine = 4,
cores = 1)
# compute the DMRs in CG context with bins method
DMRsBinsCG < computeDMRs(methylationDataList[["WT"]],
methylationDataList[["met13"]], regions = regions,
context = "CG", method = "bins", binSize = 100,
test = "score", pValueThreshold = 0.01, minCytosinesCount = 4,
minProportionDifference = 0.4, minGap = 200, minSize = 50,
minReadsPerCytosine = 4, cores = 1)
## End(Not run)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.