al2na / methylKit

R package for DNA methylation analysis
https://bioconductor.org/packages/release/bioc/html/methylKit.html
203 stars 96 forks source link

percMethylation does not reach 100% #313

Closed SophieValk closed 7 months ago

SophieValk commented 7 months ago

Hi there,

Thankyou for providing the Methylkit package, I have really enjoyed using it so far.

I am trying to use MethylKit for identifying differences in DNA Methylation between two groups. After having imported all the sample files independently, I have checked their methylation profiles using the get MethylationStats function. All histograms show varying methylation ranging from 0% - 100%: 100pMethylation

$meth <- unite(myobj, destrand=TRUE) $head(meth)

headMeth

When I then try to unite my samples, methylkit returns a methylBase object where the methylation percentage of all samples only reach until 50%. Regardless if I set the destrand option at TRUE or FALSE.

$PercMethylation <- percMethylation(meth) $View(PercMethylation) Screenshot_percMethylation

Am I doing something wrong or am I overseeing something? It seems that somehow in the unite function, the data gets divided by 2. I thought this may have something to do with the destrand option in unite but that did not seem to make a difference.

When I use destrand=FALSE, I get the following results with the following code: $meth <- unite(myobj, destrand=FALSE $PercMethylation <- percMethylation(meth) $View(PercMethylation)

percMethylation_destrandFALSE

I hope someone can explain what I might be doing wrong. Thanks, Sophie

alexg9010 commented 7 months ago

Hi Sophie,

Thanks for using methylKit!

Unfortunately I was not able to inspect the plots that you uploaded, it seems that the files are empty.

Best,

Alex

SophieValk commented 7 months ago

Hi @alexg9010 ,

Thankyou for taking the time to look at my issue. I figured out what was the problem. I did not correctly transform my CpG called .bed files into the required format for methylKit. The freqC and freqT did not add up together. Now that I fixed that the %methylation reaches 100%, also after uniting multiple documents.

Thanks again for providing methylKit, I will happily continue using it. This issue can be closed.

Best, Sophie

alexg9010 commented 7 months ago

Hi Sophie, Thanks for letting us know.