Question: Handling manhattan plots in vector graphics editors
2
gravatar for yury.barbitoff
11 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 • 485 views
ADD COMMENTlink modified 11 months ago by Pierre Lindenbaum122k • written 11 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 11 months ago by jared.andrews072.8k

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: https://stackoverflow.com/questions/8048984/plot-as-bitmap-in-pdf

ADD REPLYlink modified 11 months ago • written 11 months ago by Alex Reynolds28k

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 11 months ago by zx87547.9k
0
gravatar for Pierre Lindenbaum
11 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum122k wrote:

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

https://github.com/lindenb/xslt-sandbox/wiki/ManhattanPlot

ADD COMMENTlink written 11 months ago by Pierre Lindenbaum122k
Please log in to add an answer.

Help
Access

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