I created a heatmap of methylation data using plotHeatmap (Deeptools), but I'm having problems with scaling. The attached figure/file shows (A-left) when scale is auto, binsize 2kb, --missingDataAsZero
, and --skipZeros
. I am receiving an excellent plot, however the scaling should be from 0 to 1. When I tried to alter the scale from 0 to 1 (A-middle), I got a blank plot. When I deleted the --missingDataAsZero
parameter, it appears that the scale issue has been corrected, but I can not see the anti correlation as in the leftmost the panel.
I also used Easeq https://easeq.net/ to generate a similar plot (B), and it appears that there is no scale issue, and it too exhibits good anti correlation, as expected. I'm also sharing the header for the methylation data (C).
Could you please explain me what the probable issue is when creating a plot using deeptools?!
How many lines are in the input file? I wonder if this is one of those weird things that happens when there are a LOT of lines and matplotlib does antialiasing.
Hi Devon, Thanks a lot for the reply. DNA methylation file has 19466838 lines while domains has 92409 lines.
I suspect this is due to the number of domains. Basically you have ~92k lines of data that are put into an image with fewer lines of pixels. The image generation library we (and others) use does a bunch of interpolation in such cases since otherwise there's no way to make such an image. In this case that's probably driving down the mean signal. What happens if you use a random sample of just a few thousand domains? My guess is that the interpolation will be less and the scale more along the lines of what you expect.
Oh, also you might play around with the "--interpolationMethod" option, maybe one of the other methods is better for your dataset.
Thanks a lot, using "--interpolationMethod nearest" has really improved the plot:)