suppressPackageStartupMessages(library(qvalue))
suppressPackageStartupMessages(library(limma))
suppressPackageStartupMessages(library(edgeR))
suppressPackageStartupMessages(library(knitr))
suppressPackageStartupMessages(library(gridExtra))
suppressPackageStartupMessages(library(variancePartition))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(synapser))

options(xtable.type="html")

knitr::opts_chunk$set(
  echo=FALSE,
  warning=FALSE,
  message=TRUE,
  error = FALSE,
  tidy = FALSE,
  cache = TRUE,
  dev = c("png", "pdf"), 
  fig.width=7, fig.height=7)

options(markdown.HTML.stylesheet = 'css/custom.css')

Meta data is available from https://www.synapse.org/#!Synapse:syn7392158

## [1] TRUE

## Memory usage to store result: > 239.1 Mb 
## Dividing work into 100 chunks...
## iteration: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
## 
## Total: 104 s

## Dividing work into 100 chunks...
## iteration: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
## 
## Total: 232 s

Compare expression with Braak stage

## Coefficients not estimable: RunB82 RunE007 RunE3 RunK76 RunK77 RunK79 RunK85 RunP62 RunS114 RunS151 LIMSB648 LIMSC014 LIMSC189 LIMSC849
## Coefficients not estimable: RunB82 RunE007 RunE3 RunK76 RunK77 RunK79 RunK85 RunP62 RunS114 RunS151 LIMSB648 LIMSC014 LIMSC189 LIMSC849
## Dividing work into 100 chunks...
## 
## Total: 417 s

Compare -log10 p from dream and duplicateCorrelation

compare to eQTL

Top categories from each analysis

Plot for publication

Variance fractions of expression plots for two example genes

TUBB2B: p-values are very different between the two methods

##                     logFC  AveExpr         t      P.Value    adj.P.Val
## ENSG00000137285 -1.204081 6.735235 -7.067969 1.376803e-10 1.324026e-06
##                        B
## ENSG00000137285 13.76455
##                     logFC  AveExpr         t      P.Value adj.P.Val
## ENSG00000137285 -1.132975 6.691745 -3.821945 0.0007632604  0.349805
##                     z.std
## ENSG00000137285 -3.365785