Differential Expression Analysis - GitHub...

16
Differential Expression Analysis using limma COMBINE RNA-seq Workshop

Transcript of Differential Expression Analysis - GitHub...

Page 1: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Differential Expression Analysis using limma

COMBINE RNA-seq Workshop

Page 2: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

limma package: Linear Models for Microarrays & RNA-seq

Data Import

Preprocessing &

Quality Assessment

Linear Modeling

& Differential Expression

Gene Set Testing

Professor Gordon Smyth

limma is celebrating its 15th

birthday this year!

2

Page 3: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Many plotting options available…

6 8 10 12 14 16

0.0

0.1

0.2

0.3

0.4

A

Intensity

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

● ●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

● ●

●●

● ●

●●

●●

● ●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

● ●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

● ● ●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

● ●

●●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●●

●●

● ●

●●

●●●

●●

● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

● ● ●

●●

●●

●●

●● ●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

● ●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

● ●

● ●●

●●

●●

●●

●●

●●

● ●

●●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●●

●●

●● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

● ●

● ●

●●

● ●

●●

● ●

●●

●●

●●

●●

● ●

● ●

●●

●●

● ●

●●

●●

● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●● ●

● ●

●●

●●

●●

●●

● ●

●●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●●

●●

●●●

●●

●●●

● ●

●●

●● ●

● ●

●●

●●

● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

● ●

● ●

● ●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●●

●●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

● ●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●● ●

●● ●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

● ●

●●

●●

● ●

● ●

●●

●●

●●

●●

● ●

●●

●●

● ●

● ●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

● ●

● ●

● ●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●

●●

● ●

●●

●●

● ●

●●●

● ●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

● ●

●●●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

● ●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

5 10 15

0.5

1.0

1.5

B

log2( count size + 0.5 )

Sqrt(

sta

ndar

d de

viat

ion

)

8 10 12 14

−4−2

02

46

C

●●

●●

● ●

●●

●●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●● ●

●●

● ●

● ●

●●●

●●

●●

●●

●●

●●

● ●

● ●

● ●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ● ●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●●

●● ●

●●

●●

●● ●

●●

● ●

● ●

●●

●●

●●

● ●

●●

●●●

●●

●●●

●●

●●

●●

● ●

●●

●●●●

●● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●● ●●

●●

●●

● ● ●

●●

●●

● ●

●●

●● ●

●●

●●●

●●

● ●

●●

● ●

●●

●●

● ●

●●

●● ●

●●

●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

● ●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●● ●

●●

●●

●● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

● ●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●●

●● ●

●●

●●

●●

● ●

●●

● ●

●●

●● ●

●●

●●

●● ●

●●

● ●

●●

●●●

●●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

● ●

●●

●●

● ●●

●●

● ●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

● ●●

● ●

●●

● ●

●●

●●

● ●●

● ●

● ●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

● ●

●●

●●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

● ●●

●●

●● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

● ●

● ●●

●●

● ●●

●●

●●

●●

●●

●●

●● ●●

●●

● ●●

●● ●●

●● ●

●●

● ●

● ●

● ●

●●

●●

● ●

●●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

● ●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●● ●

●●

● ●●

● ●

●●

● ●

●●

●●

● ●●

● ●

●●

●●

●●

● ●

●●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●● ●

●●

● ●●

●●

●●

● ●

●●

●●●●

● ●

●●

●●

●●

●●

●● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

●●

● ●

●● ●

● ●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●●

●●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

● ●●

●●

●●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

● ●●

● ●

●●

● ●

●●

●●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

● ●

●● ●

●●

●●

● ●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

●●

●●

●● ●

●●

●●

●●●

●●●

●●

● ●

● ●

●●

● ●●

●●

●●

●●

●● ●

●●

●●

● ●

● ●

●●

●●

● ●

● ●

●●

●●

●●

●●

● ●

● ●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

● ●

●●

● ●

●●

● ●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●●

●●

● ●

● ●

● ●

●●

●●

●●

● ●

●●

●●

●● ●

● ●

●●

●●

● ●

●●

●●

●●

● ●

●●

●●

●● ●

●●

●●

●● ●

●●

●●

● ●

●●

● ●

●●

●●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●● ●

●●

● ●●

● ●

●●

●●

●●●

●●●

●●

●●

●●

● ●

●●

●●

● ●

●●

●●

● ●

●●

●●● ●

● ●●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ● ●

● ●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●● ●

●●

● ●●

●●

● ●

● ●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●●

● ●

●●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●●●

●●

●●

●●

●●●●

● ●

●●

●●

●●●

●●

●●

● ●

●●

●●●●

●●

●●

● ●

●●

●●

●●●

●●●

●●

●●

● ●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●● ●

●●

●● ●

●●

●●

●●

●●

● ●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●●

● ●●

●●

●●

●●●

●●

● ●

●●

●●

● ●

●●●

●●

● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●●

●●

●●●

●●●

● ●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●

●●

●●

● ●

●●

● ●

●●●

●●

●●

●●

●●

●● ●

●●

●●

●●

●●

● ●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●

●●

● ●

● ●

● ●

●●

● ●●

● ●

●●●

●●

●●

●●

●●●

●●

● ●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

● ●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●

●●

●● ●●

●●

●●

● ●

●●

●●

● ●

●●● ●

●●

● ●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

● ●

●●

●●●

●●

●●

●● ●

●●

● ●

●●

●●

●●

●●

●●

●●●

● ●

●●

● ●

● ●

● ●

●●

●●

●●

●●●

● ●

● ●●

●●

●●

● ●●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●●

●●

●●

●●

●●

●●

● ●

●●

● ●● ●●●

●●

●● ●

● ●

●●

●●

●●

●●

● ●●

●●

●●

● ●

●●

●●

●●

● ●

● ●

● ●

●●

●●

●●

●●

●●

●●

● ●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●●

●●● ●

●●

●●

●●

●●

● ●

● ●

●●

● ●

●●

● ●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

● ●

●●

● ●

●●

●●

●●

●●

●●

● ●

●●

●●

● ●

● ●●

●●

●●

●●●

●●

●●

●●

●●

● ●

●●

●●

●●

●● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

● ●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●● ●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

● ●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

● ●

●●

●●

●●

●●

●●●

●●

●●●

● ●

●● ●

●●

●●

●●●

●●

●●

● ●

●●

●●

●●

●●●

● ●

● ●

●●

●●

●●

● ●

●●

●●

●●

●●●●

●●●●●●●●

●●●●

●●●●●●

●●●●●●

●●●●

●●

●●

●●●●

●●●●●●●●

●●● ●

●●●

●●●●

●●●●

●●●● ●●●●

●●●

●●

● ●

●●●●●

●●

●●●●●

●● ●

●●●●

●●

●●

●●●●

●●●●

●●

● ●

●●

●●

●● ●●●● ●●●●●●

● ●● ●●●●● ●●●●

●● ●●●●●● ●●●●

●●●●● ●●●●●●●

GeneDRNCD03D10U03U10

−0.5 0.0 0.5 1.0 1.5

−0.5

0.0

0.5

D

Dim

ensi

on 2

HC15HC30HC45HC60HC75

HE15HE31HE45 HE60HE75

HR15

HR30

HR45

HR60HR75

HT15HT30HT45HT65HT75HX15HX30HX45HX60

HX75HY15HY30HY45HY60HY69

JanFebMarJunJulDec

3

Page 4: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Linear models for differential expression

E(yg ) = X g

Matrix of expression values(from RNA-seq / microarray)

Gene-wiselinear

models

Estimated gene-specificparameters used for gene prioritization and gene set

testing

Advanced statistical algorithms in limma

that allow...

var(ygj ) = g2 wgj

limma deliverspowerful inference

for differentialexpression analysis

InformationBorrowing

VarianceModelling

QuantitativeWeighting

^

g, sg2 *}

Gene ID LSK_1 LSK_2 CMP_1 CMP_211303 478 619 4830 716511305 27 20 48 5511306 132 200 560 40811307 42 60 131 99

… … tens of thousands more …

DataPre-processing

Page 5: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

limma package:Linear Models for Microarrays & RNA-seq

• arbitrarily complex experiments: linear models, contrasts

• empirical Bayes methods for differential expression: t-tests, F-tests, posterior odds

• analyse log-ratios, log-intensities, log-CPM values• accommodate quality weights in analysis• control of FDR across genes and contrasts• many plotting functions to help visualize raw data and

final results from statistical analysis• gene set testing at various levels• fast, numerically efficient methods

Analysis of differential expression studies

5

Page 6: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

RNA-seq of Mouse mammary gland

Basal cells

Luminal cells

Virgin

Pregnant

Lactating

Virgin

Pregnant

Lactating

n=2

n=2

n=2

n=2

n=2

n=2

Fu et al. (2015) ‘EGF-mediated induction of Mcl-1 at the switch to lactation is essential for alveolar cell survival’ Nat Cell Biol

Page 7: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

(some) questions we can ask• Which genes are differentially expressed

between basal and luminal cells?• … between basal and luminal in virgin

mice?• … between pregnant and lactating mice?• … between pregnant and lactating mice in

basal cells?

Page 8: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

What do we need to perform a statistical test?

• Measure of average expression• Measure of variability

Mea

sure

of

expr

essi

on

Log2 fold-change: difference between the two means

Page 9: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

One of the most useful statistics: t-test

• We want to test the null hypothesis:H0: mean(GroupA) = mean(GroupB)

against the alternative hypothesis:H1: mean(GroupA) ≠ mean(GroupB)

• An important assumption of the t-test is that the data is roughly normally distributed

• A statistician’s best trick is to transform data that isn’t normally distributed into something that looks more normally distributed

Page 10: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Log-counts vs counts for one gene

Log-counts

Count data is right-skewed

*A quick check to see how normal your data is: compare the mean and the median

mean

Page 11: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

We can perform t-tests on log-counts

• Take into account different sequencing depths

• Take into account normalisation factors• Take into account we can’t log a zero• The cpm(y, log=TRUE) function

does this for you

Page 12: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Now we have log-counts

Log-counts

Page 13: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

RNA-seq data is more complicated

• Mean-variance relationship. Use voom

lowess fit

mean (log2 cpm)

sqrt

resi

dual

std

dev

(log

2cp

m)

Page 14: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Although we test one gene at a time, we can share information about all

the genes to help with testingBefore sharing After sharing

Page 15: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Multiple testing burden

• Problem: We are performing tens of thousands of tests, which increases our chances of getting false discoveries

• Solution: Calculate false discovery rates (“adjusted p-values” in limma)

• Interpretation: If there are 100 genes significant at FDR< 5%, we are willing to accept that 5 will be false discoveries

Page 16: Differential Expression Analysis - GitHub Pagescombine-australia.github.io/RNAseq-R/slides/Differential_Expression_Analysis.pdf · • empirical Bayes methods for differential expression:

Linear modelling analysis pipeline for RNA-seq data

16

• model.matrix / makeContrasts• voom• lmFit• contrasts.fit• treat• eBayes• topTable / topTreat• decideTests