# load the methylation data
data(methylationDataList)
#load the DMRs in CG context they were computed with minGap = 200
data(DMRsNoiseFilterCG)
#merge the DMRs
DMRsNoiseFilterCGLarger <- mergeDMRsIteratively(DMRsNoiseFilterCG[1:100],
minGap = 500, respectSigns = TRUE,
methylationDataList[["WT"]],
methylationDataList[["met1-3"]],
context = "CG", minProportionDifference=0.4,
minReadsPerCytosine = 1, pValueThreshold=0.01,
test="score",alternative = "two.sided")
## Not run:
# #set genomic coordinates where to compute DMRs
# regions <- GRanges(seqnames = Rle("Chr3"), ranges = IRanges(1,1E5))
#
# # compute DMRs and remove gaps smaller than 200 bp
# DMRsNoiseFilterCG200 <- computeDMRs(methylationDataList[["WT"]],
# methylationDataList[["met1-3"]], regions = regions,
# context = "CG", method = "noise_filter",
# windowSize = 100, kernelFunction = "triangular",
# test = "score", pValueThreshold = 0.01,
# minCytosinesCount = 1, minProportionDifference = 0.4,
# minGap = 200, minSize = 0, minReadsPerCytosine = 1,
# cores = 1)
#
# DMRsNoiseFilterCG0 <- computeDMRs(methylationDataList[["WT"]],
# methylationDataList[["met1-3"]], regions = regions,
# context = "CG", method = "noise_filter",
# windowSize = 100, kernelFunction = "triangular",
# test = "score", pValueThreshold = 0.01,
# minCytosinesCount = 1, minProportionDifference = 0.4,
# minGap = 0, minSize = 0, minReadsPerCytosine = 1,
# cores = 1)
# DMRsNoiseFilterCG0Merged200 <- mergeDMRsIteratively(DMRsNoiseFilterCG0,
# minGap = 200, respectSigns = TRUE,
# methylationDataList[["WT"]],
# methylationDataList[["met1-3"]],
# context = "CG", minProportionDifference=0.4,
# minReadsPerCytosine = 1, pValueThreshold=0.01,
# test="score",alternative = "two.sided")
#
# #check that all newley computed DMRs are identical
# print(all(DMRsNoiseFilterCG200 == DMRsNoiseFilterCG0Merged200))
#
# ## End(Not run)
Run the code above in your browser using DataLab