This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How do I generate a Manhattan plot like this?

Hi all,

I'm trying to generate a Manhattan plot similar to this one I found online: https://plottie.art/plots/5372

It looks cleaner than the default ones I’ve seen — especially in terms of layout, significance threshold lines, and how the top SNPs are annotated.

I’m wondering:

  1. What R or Python packages can produce plots like this?

  2. Any tips on customizing axis ticks, colors by chromosome, or labeling top hits?

Would appreciate any guidance or example code. Thanks!

data-visualization manhattan-plot

That could easily be done with ggplot2. Essentially, it comes down to

x = chr
y = -log10(p)
color = locus_type
label = these_numbers

...and then use a combination of geom_point and ggrepel::geom_label_repel to assemble the plot. Without example data, cannot make an example though.

R-Graph-Gallery offers examples in R for both base and with the library ggplot2 for a lot of the more common graph types used in science. Including for Manhattan Plots.

Thanks, that's a good resource.

0 answers

No answers yet.

Log in to answer this question.