stephenturner / qqman

An R package for creating Q-Q and manhattan plots from GWAS results
http://cran.r-project.org/web/packages/qqman/
GNU General Public License v3.0
154 stars 92 forks source link

Lines #23

Closed bthada closed 9 years ago

bthada commented 9 years ago

Stephen, qqman has been great help in making Manhattan plots of my results. I would like to add vertical lines for things like candidate genes and horizontal lines for a comparison with a QTL analysis. Currently I am able to do it when using a subset of just one chromosome but it gives me "Error: unexpected input..." when trying to use it for the whole genome wide analysis. Any help would be much appreciated. My current code for the single chromosome is:

manhattan(subset(ratioresults, CHR==1), highlight=snpsofinterest) lines(c(122,145),c(6,6),col="green",lwd=2) lines(c(32.9,56.62),c(6,6),col="green",lwd=2) abline(v=50,col="green")

An image of the single chromosome and they types of lines I am talking about:

image

Thanks, Brad

stephenturner commented 9 years ago

Works fine for me. Using built-in data:

library(qqman)
head(gwasResults)
head(snpsOfInterest)
manhattan(gwasResults, highlight=snpsOfInterest)
lines(c(1500,2500),c(4,4),col="hotpink",lwd=3)
lines(c(5500,6500),c(2,2),col="darkorchid",lwd=5)
abline(v=2000,col="hotpink", lwd=3)

rplot

bthada commented 9 years ago

Stephen,

That ended up working for me. For some reason, numbers I used when looking at the single chromosome where taken as Mb, but for the whole genome it was in bp. The numbers I was using were too small to the point of not showing up on the graph. Once I switched my code to numbers 1,000,000x those I used before, it worked just fine when looking at the whole genome. Once I ran your code, I was able to see that. Thanks for the help.

Brad Thada

Graduate Research Assistant Purdue University Agronomy Department Plant Breeding and Genetics https://ag.purdue.edu/agry/directory/Pages/bthada.aspx

On Mon, Mar 2, 2015 at 4:44 PM, Stephen Turner notifications@github.com wrote:

Closed #23 https://github.com/stephenturner/qqman/issues/23.

— Reply to this email directly or view it on GitHub https://github.com/stephenturner/qqman/issues/23#event-244755152.