Open TYRANISTAR opened 3 years ago
The mode = 2 means you are using the CpGs with methylation change in the same direction to call DMRs, which take the last column “meth.diff” value into account.
The reason you see fewer CpGs in the DMRs output is because:
I updated edmr code to pass the fuzzypval value to the eDMR.sub() so that your analysis will not filter CpGs by pvalue < 0.1. Could you give a try again? Thanks!
Hello,
I updated the edmr package and confirmed that both hyper.myDMR() and hypo.myDMR() variables have the fuzzypval = fuzzypval
extra argument. Nevertheless the problem remains. For example when I run:
dmp_rrbs <- calculateDiffMeth(methobj) #plus some extra arguments
myDiff <- getData(dmp_rrbs)
dmrs <- edmr(myDiff, mode=2)
dmrs_data <- data.frame(dmrs)
head(dmrs_data)
I get the following:
seqnames start end width strand mean.meth.diff num.CpGs num.DMCs
1 chr1 1117516 1117655 140 * 33.60520 14 8
2 chr1 1736319 1736620 302 * 26.74212 11 7
3 chr1 1831467 1831497 31 * 32.87444 5 3
4 chr1 1901833 1902126 294 * 20.58521 8 4
5 chr1 2138975 2139281 307 * 26.95013 8 4
6 chr1 2488928 2488985 58 * 27.96966 6 4
Then if I search for the 3rd dmr:
keep <- which(dmp_rrbs$chr=="chr1" & dmp_rrbs$start>=1831467 & dmp_rrbs$end<=1831497)
data.frame(dmp_rrbs[keep,])
I get the following:
--------------
chr start end strand pvalue qvalue meth.diff
20484 chr1 1831468 1831468 + 3.861869e-03 3.173452e-02 0.502854
20485 chr1 1831485 1831485 + 9.891393e-06 1.303714e-04 -36.076610
20486 chr1 1831486 1831486 - 1.015186e-24 8.679493e-23 57.931034
20487 chr1 1831490 1831490 + 2.930524e-22 2.024816e-20 15.770796
20488 chr1 1831491 1831491 - 1.412065e-04 1.559009e-03 25.378788
20489 chr1 1831496 1831496 + 1.242588e-13 3.871686e-12 -28.672427
20490 chr1 1831497 1831497 - 4.253546e-26 4.080455e-24 64.788732
As you see I still get more CpGs and they are still not the same type of differentially methylated (hyper or hypo) as I had requested with the "mode=2" argument.
What am I missing here?
Thank you in advance.
Hello, I am using edmr right after MethylKit but the DMRs I get, correspond to a region where there are more CpGs than displayed in "num.CpGs" column. The code I run is the following:
From the first few row of the table I get this:
but when I check the original dmp_rrbs object for the region in chromosome 11 I get more CpGs:
and they are not the same type of differentially methylated (hyper or hypo) as I had requested with the "type=2" argument. Shouldn't there be only 4 CpGs one of which being differentially methylated in that region (i.e. the meth.diff should be either negative or positive for all)?
Can you help me out please? Am I missing something or is it a bug of the tool? I am using R 3.6.0 and hg38 genome for RRBS samples.
Thank you in advance