# # # Diabetes Genetics Initiative of Ó³»­´«Ã½ of Harvard and MIT, Lund University and # Novartis Institutes of BioMedical Research # Whole-genome association analysis identifies novel loci for type 2 diabetes and triglyceride levels # Science 2007 Jun 1;316(5829):1331-6. Epub 2007 Apr 26 # # # pvals <- read.table("DGI_chr3_pvals.txt", header=T) observed <- sort(pvals$PVAL) lobs <- -(log10(observed)) expected <- c(1:length(observed)) lexp <- -(log10(expected / (length(expected)+1))) pdf("qqplot.pdf", width=6, height=6) plot(c(0,7), c(0,7), col="red", lwd=3, type="l", xlab="Expected (-logP)", ylab="Observed (-logP)", xlim=c(0,7), ylim=c(0,7), las=1, xaxs="i", yaxs="i", bty="l") points(lexp, lobs, pch=23, cex=.4, bg="black") dev.off()