





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















References
Chapter 15 of Bioconductor Monograph(course text)
Benjamini & Hochberg (1995) J. of the RoyalStat. Soc., series B, 57(1):289-
Storey & Tibshirani (2003) Proc. of the Natl.Acad. of Science, 100(16):9440-
Differential Expression (DE) tests – basics
Have 2 or more groups of samples
ex: healthy, beg. disease, adv. diseaseNull: Gene expressed same in all groupsAlt.: Gene not expressed same in all groups
(biological relevance?)
Result:
Test Stat.: some “standardized” measure of DE
P-value: some measure of “significance”
ALL Example – simple t-test for one gene
(B-cell vs. T-cell)
load
data
and
define
gene
to
test
library(affy);
library(ALL)
data(ALL)
;
gn
<-
featureNames(ALL)
gn.test
<-
"39020_at"
t
<-
gn==gn.test
gn.exprs
<-
exprs(ALL)[t,81:110]
exprs.vals
<-
as.vector(gn.exprs)
cell
<-
c(rep(0,15),rep(1,15))
0
for
B-cell;
1
for
T-cell
boxplot(exprs.vals~cell,main=gn.test,
cex.lab=1.5,cex.main=1.5,xlab='T-cell
indicator',
ylab='RMA
expression')
Test
for
significance
a
<-
lm(exprs.vals~cell)
s
<-
summary(a1)
round(s1$coefficients,3)
NOTE: We will improve on the simple t-test later
Estimate
Std.
Error
t
value
Pr(>|t|)
(Intercept)
cell
For each value of c,1000 data sets (think ofas 1000 genes) weresimulated where twopopulations arecompared, and the“truth” is
μ
2
= c. For
each data set, the t-testevaluates H
: 0 μ
=0 2
(think of as no changein expression level).The resulting P-valuesfor all data sets aresummarized in thehistograms.What’s going on here?
set.seed(123)N
<-
1000
c.list
<-
c(0,0.1,0.15,0.2)
k
<-
length(c.list)
p.mat
<-
matrix(nrow=N,ncol=length(c.list))
j
<-
0
for(c
in
c.list){
j
<-
j+1;
p
<-
1:N
for(i
in
1:N){
x
<-
rnorm(50,mean=c,sd=1)
y
<-
rnorm(50,mean=0,sd=1)
resp
<-
c(x,y)
d
<-
c(rep(0,50),rep(1,50))
s
<-
summary(lm(resp~d))$coefficients
p.mat[i,j]
<-
s[2,4]}
}
par(mfrow=c(2,2))for(i
in
1:k){
hist(p.mat[,i],xlab='P-value',ylab='Density',main=paste('Histogram
when
c
=',c.list[i]))
}
n <- 200x.mat <- y.mat <- matrix(nrow=n,ncol=k)for(i in 1:k){
d <- density(p.mat[,i],n=n)x.mat[,i] <- d$xy.mat[,i] <- d$y/max(d$y)
}
library(RColorBrewer)cols <- brewer.pal(4, "PuOr")par(mfrow=c(1,1))plot(x.mat[,1],y.mat[,1],xlim=c(0,1),type='l',
lwd=3, xlab='P-value',col=cols[1],ylab='Density, smoothed and scaled') for(i in 2:k){
lines(x.mat[,i],y.mat[,i],col=cols[i],lwd=3)}
legend(0.7,1.0,paste('c =',c.list[1]),bty='n')legend(0.6,0.8,paste('c =',c.list[2]),bty='n')legend(0.5,0.6,paste('c =',c.list[3]),bty='n')legend(0.45,0.45,paste('c =',c.list[4]),bty='n')
ALL Example: observed P-values(simple t-test, comparing B-cell to T-cell)
Remember, this is amixture of distributions.A flat histogram wouldsuggest that there reallyaren’t any: DE genes.The peak near 0 indicatesthat: some genes are DE.But which ones?
How to treat these P-values?
Traditionally, consider some cut-off
Reject null if P-value <
α
, for example
(often
α
= 0.05)
What does this mean?
α
is the acceptable level of Type I error:
α
= P(reject null | null is true)
Multiple testing
We do this with many (thousands, often)genes simultaneously – say m genes
m
m-R
m-m
0
Null False
m
0
Null True
TotalCount
RejectNull
Fail toRejectNull
V
T
U+S
What are P-values, really?
true, is
when
Then
is
So
of
be
Let ? ) (
of
on
distributi
the is
What
be
and T
of
cdf
the
be
Let
true. is
Assume
observed
the is t
and
stat.,
test
the is T
Suppose
0
0
0
Pval
Uniform
Pval
t f
t f
dt dy t f y g t f t F
dy dt
g
t
F
Pval
dt t f t T P t F
f
t
Pval
t
∫ ∞−
P-values and
α
cut-off
Suppose null is true for all mgenes -(so none of the genes aredifferentially expressed)
Look at histogram of m=1000P-values with
α
=0.05 cut-off -
about 50 “significant” just bychance
these can be“expensive” errors
set.seed(2);
p
<-
runif(1000)
hist(p,xlab='P-values',main='',
breaks=c(0:40)/40) abline(v=0.05,col='red',lwd=3)
(Here, V/m
≈
50/1000 = 0.05.)
A more reasonable approach
Consider these corrections sequentially:
Then for independent
test statistics and for
any configuration of false null hypotheses,this procedure guarantees:
.
,..., (^2) , 1
for
all
Reject
.
for which i
largest
the
be k
Let
values.
P
ordered
the
be
Let
.
null
with ,
gene g
for testin
value
P
the
be
Let
) (
) (
) (^2) (
) 1 (
k
i
H
i m
P
P
P
P
H
i
P
i
(i)
m
i
i
=
≤
≤
≤
≤
K
α
R
V
E
≤ ]
/
[
What does this mean?
V = # of “wrongly-rejected” nulls
R = total # of rejected nulls
Think of rejected nulls as “discovered” genesof significance
Then call E[V/R] the FDR
This is the Benjamini-Hochberg FDRcorrection – sometimes called the marginalFDR correction