Closed renaschweizer closed 9 years ago
Please upload some example data on https://gist.github.com/. Thanks.
Here you go: https://gist.github.com/renaschweizer/25c23efa7d1e438b9d62
My command was manhattan(tryThis,col=c("pink","purple"),chrlabs=c(1:38),suggestiveline=neutral99,genomewideline=neutral95,logp=FALSE)
1: You've got problems with your P-values. Some are zero, others greater than 1. I was able to make a manhattan plot just fine. If you save the plot in a wider aspect ratio than I did you should be able to see all the labels.
2: logp=FALSE
works just fine. Make sure you're using the dev version.
3: chrlabs
must be a character vector and equal in length to the number of chromosomes. You get a convenient warning message when this isn't the case. Your terminal should have told you: You're trying to specify chromosome labels but the number of labels != number of chromosomes.
Looks to me like you have no data for chromosome 29.
Here's the code I used:
library(qqman)
d <- read.table("~/Desktop/plink.txt", T)
# fix your data
d <- subset(d, P>0 & P<=1)
# regular plot
manhattan(d)
# logp=FALSE works fine
manhattan(d, logp=FALSE)
# chrlabs must be character vector
manhattan(d, chrlabs=as.character(c(1:38)))
# Warning produced:
# You're trying to specify chromosome labels but the number of labels != number of chromosomes.
#whoops, you've got a problem. Look, no chromosome 29 data.
unique(d$CHR)
Thank you for taking the time to work through my problem. I may have only mentioned this on your website, but the data I'm trying to plot consists of likelihood values that can be larger than 1. My understanding with the logp=FALSE options was that one could override the requirements of p being between 0 and 1. Is that not the case?
Oh, right, yes, that should work. But I did remove p-values of exactly zero.
library(qqman)
d <- read.table("untitled.txt", T)
d <- subset(d, P>0)
manhattan(d, logp=FALSE)
The chrlabs option for more chromosomes than 23 does not seem to be supported, e.g. chrlabs=c(1:38) still plots only 1:23.
Also, logp=FALSE or logp=TRUE both still produce plots of log10P value, rather than likelihood.