source: trunk/brs2010p35/src/jag/global_functions.R @ 2

Last change on this file since 2 was 2, checked in by tim.te.beek@…, 8 years ago

Add revision 338 snapshot of previous SVN instance, omitting PLINK binaries

File size: 522 bytes
Line 
1plot_qq<- function(pvalues,group){
2        #       par(mfrow = c(5,4))
3        obs <- as.numeric(pvalues)
4        #remove NA (from last line etc.)
5        obs<-obs[!is.na(obs)]
6        sort.pval.obs <- sort(obs, decreasing=FALSE)
7        log10.pval.obs <- -log10(sort.pval.obs)
8     
9        y = log10.pval.obs
10       
11        # EXPECTED #
12        L <- length(obs)
13        j <- c(1:L)
14        x <- -log10(j/(L+1))   
15               
16        plot(x, y, xlim= c(0,8), ylim=c(0,8) , xlab = "Expected -log10(P)", ylab = "Observed -log10(P)", pch=20, main=group, cex.main=1, cex.lab=1, col = "black")
17        abline(0,1, col = "red", lwd=1.5)
18}
Note: See TracBrowser for help on using the repository browser.