Question: Handling manhattan plots in vector graphics editors
gravatar for yury.barbitoff
6 months ago by
yury.barbitoff20 wrote:

Hello all,

I'd like to manually adjust appearance of several manhattan plots generated using ggplot2 and combine them into one nice figure for our paper. The problem is when I try to handle the PDF plots with vector graphics editors, all operations take so much time it is impossible to make any changes in the plots.

Is there any way to simplify the plots so that they can be more easily edited in AI (e.g., merge points from each chromosome into one shape, or sth else)? How do people usually handle manhattan plots during figure editing?

Many thanks for your help :)

snp R • 327 views
ADD COMMENTlink modified 6 months ago by Pierre Lindenbaum118k • written 6 months ago by yury.barbitoff20

Groups are your friend, and masks can occasionally help as well. What edits are you trying to make? What software are you using? Illustrator handles large numbers of objects better than say, Inkscape, so it makes a difference.

ADD REPLYlink written 6 months ago by jared.andrews071.9k

The simple fact is that rendering a vector scatterplot is CPU-intensive work. Graphics cards do better with bitmaps (with the associated tradeoff in space and resolution.) So it might help to render vector points down to bitmaps within the PDF. By doing this, you get the benefits of vector graphics for the plot body, and the (significant) performance benefits of bitmap for the data in the plot. See the following for some discussion and code:

ADD REPLYlink modified 6 months ago • written 6 months ago by Alex Reynolds27k

Filter out SNPs with pvalue>0.05. This should get rid of about 90% of points. Or stay within R to do plot manipulation to get final merged plot, maybe look into cowplot?

ADD REPLYlink written 6 months ago by zx87546.8k
gravatar for Pierre Lindenbaum
6 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum118k wrote:

3years ago, I wrote a xslt to plot a manhattan plot, for fun.

ADD COMMENTlink written 6 months ago by Pierre Lindenbaum118k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1815 users visited in the last hour