Hi! I am trying to plot a QQplot with results from a gwas runned with plink. I would like to know how can I add the tipical grey shadow showing confidence interval (95%CI). I can not find it. Does someone know?
My plot looks like that:
assoc<-read.table("all_SNPs_assoc.txt",header=TRUE,dec=".") png("QQplot.png") a<-assoc$SNP n<-length(a) the<-(-1*log(pchisq(rchisq(n,df=1),df=1,lower.tail=F),base=10)) # pchisq gives de distribution function # rchisq generates random deviates act<-(-1*log(assoc$P[a],base=10)) qqplot(the,act,main="QQplot assoc",xlab="Expected -log p",ylab="Observed -log p") qqline(probs=0.05) abline(0,1) dev.off()