Skip to content

The chr is not handled in callDMR #53

@mmahmoudian

Description

@mmahmoudian

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:

  1. The callDMR calls findBumps and pass chr in line 38:

DSS/R/DMR.R

Lines 38 to 40 in afdca98

dmrs <- findBumps(DMLresult$chr, DMLresult$pos, scores,
cutoff=p.threshold, sep=5000, dis.merge=dis.merge,
pct.sig=pct.sig, minCG=minCG)

  1. The findBumps then calls the findRegion and pass chr:

DSS/R/DMR.R

Line 108 in afdca98

regions <- findRegion(chr, pos, sep)

  1. But the findRegion function does not take into account the chromosomes:

DSS/R/DMR.R

Lines 90 to 95 in afdca98

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions