library(beeswarm)
library(RColorBrewer)

a <-read.csv("~/Dropbox/MTNR1B_rs10830963.eQTL.Mccarthy.20140908.csv",sep=";")

summary(lm(MTNR1B_logCPM~rs10830963,a))
## 
## Call:
## lm(formula = MTNR1B_logCPM ~ rs10830963, data = a)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.19981 -0.09957 -0.02941  0.06739  0.43847 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  0.30004    0.02714  11.055  < 2e-16 ***
## rs10830963  -0.10024    0.01785  -5.614 1.35e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1284 on 117 degrees of freedom
## Multiple R-squared:  0.2122, Adjusted R-squared:  0.2055 
## F-statistic: 31.52 on 1 and 117 DF,  p-value: 1.349e-07
boxplot(MTNR1B_logCPM~rs10830963,a,ylab="log2 CPM MTNR1B",xlab="rs10830963",col=brewer.pal(3,"Accent"),
        main="p: 1.35e-07")
beeswarm(MTNR1B_logCPM~rs10830963,a,add=T)

plot of chunk unnamed-chunk-1