al2na / methylKit

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

Interpreting the CpG pearson correlation plot #303

Closed bioinfo23 closed 7 months ago

bioinfo23 commented 11 months ago

I have performed DMR analysis using Methylkit and have generated the correlation plot but i am not able to interpret it completely. Apart from the correlation % what do the bar plots, color and x and y axis signify?

Thanks

alexg9010 commented 11 months ago

Hi @bioinfo23 ,

I guess you are asking about the correlation plot generated by getCorrelation(). This function will produce scatter plots of %-methylation values for each pair of samples, with the axis indicating %-methylation and the color representing the level of correlation (yellow-high, green-medium, blue-low). The "bar plots" on the diagonal are the %-methylation histograms as generated by getMethylationStats() for each sample.

Best, Alex

Hannah1746 commented 7 months ago

I was hoping you could do into the red and black lines that are plotted and what they are

alexg9010 commented 7 months ago

The lines are pairwise regression lines between the %-methylation distributions. The red line shows linear regression, while the darkgreen line represents the lowess smoothed regression line.

https://github.com/al2na/methylKit/blob/0a5581c33accb8493f00658325fc1d8c4a6370c8/R/backbone.R#L1597-L1609

Best Alex