I was going through the code to understand how the DMRs are calculated, and to me it seems that the chromosome information is not taken into account while calculating DMRs. The following is my understanding of the situation:
- The
callDMR calls findBumps and pass chr in line 38:
|
dmrs <- findBumps(DMLresult$chr, DMLresult$pos, scores, |
|
cutoff=p.threshold, sep=5000, dis.merge=dis.merge, |
|
pct.sig=pct.sig, minCG=minCG) |
- The
findBumps then calls the findRegion and pass chr:
|
regions <- findRegion(chr, pos, sep) |
- But the
findRegion function does not take into account the chromosomes:
|
findRegion <- function(chr, pos, sep=1000) { |
|
pos.diff <- abs(c(as.integer(0), diff(pos))) |
|
idx.jump <- which(pos.diff>sep) |
|
regions <- rbind(c(1, idx.jump), c(idx.jump-1, length(pos))) |
|
regions |
|
} |
I wonder if I'm missing something or the chromosome information is not handled in findRegion.
I was going through the code to understand how the DMRs are calculated, and to me it seems that the chromosome information is not taken into account while calculating DMRs. The following is my understanding of the situation:
callDMRcallsfindBumpsand passchrin line 38:DSS/R/DMR.R
Lines 38 to 40 in afdca98
findBumpsthen calls thefindRegionand passchr:DSS/R/DMR.R
Line 108 in afdca98
findRegionfunction does not take into account the chromosomes:DSS/R/DMR.R
Lines 90 to 95 in afdca98
I wonder if I'm missing something or the chromosome information is not handled in
findRegion.