ggcoverage icon indicating copy to clipboard operation
ggcoverage copied to clipboard

plot showing broken peak, not continuous

Open wangxu1990 opened this issue 11 months ago • 1 comments

Hi, thank you for this wonderful package that helped me a lot to visualize my chip-seq data. Now I have no idea why the plot shows the broken peak as shown in the figure. My bigwig file was produced by deeptools bamcoverage with binsize 10 and smooth 30. Does it result from the big binsize? I guess not, because previously, I tried with another peak visualizing package, BioSeqUtils, https://github.com/junjunlab/BioSeqUtils, which gave me the non-broken plot. Thank you! Image

wangxu1990 avatar Jan 31 '25 20:01 wangxu1990

Dear @wangxu1990, this is a known bug/phenomenon of plotting many small "bars" (essentially lines) next to each other. The geom_coverage functions do not plot a continuous horizon like graph, but each bar separately. If you have many tiny bars, the png plotting device tries to interpolate the observed thousands of bars to fewer dominant ones, and the interlacing (merging points together) produces these stripes as an artifact.

Needs to be handled somehow in nex releases. You can try to bin your data und reduce the number of vertical bars until a fix is out.

m-jahn avatar Feb 03 '25 13:02 m-jahn