Docsity

Distance Measures for Gene Expression Data | STAT 5570, Study notes of Statistics

Partial preview of the text

Download Distance Measures for Gene Expression Data | STAT 5570 and more Study notes Statistics in PDF only on Docsity!

Distance Measures forGene Expression Data

Utah State University – Spring 2009STAT 5570: Statistical BioinformaticsNotes 2.

References 

Chapter 12 of Bioconductor Monograph(course text)

What to do with expression measures? 

Summarize

combine estimates across arrays



Compare

between sample types



Graphically – to get visual

representation

scatterplots, tree diagrams, etc.



Numerically – to assess significance

Comparison across arrays 

What are we looking for? 

Genes that –change expression between sample types 

Genes that –have similar expression profiles



How do we know when we’ve found it?

graphical and statistical checks



What do we do once we’ve found it? exploit changes / similarities – drug discovery, pathways, e.g.

best for motivating / supporting hypotheses

Visualizing similarity or distance

look at 2 genes on10 arrays

R code – visualizing similarity or distance library(affy);

library(ALL)

data(ALL)

#

ALL

is

an

ExpressionSet

object

gn

<-

featureNames(ALL)

all.exprs

<-

exprs(ALL)

par(mfrow=c(2,2))plot(all.exprs[1,c(1:10)],main=gn[1],type='l',lwd=2,

xlab='array',ylab='rma

expression',cex.main=1.5,cex.lab=1.5)

plot(all.exprs[2,c(1:10)],main=gn[2],type='l',lwd=2,

xlab='array',ylab='rma

expression',cex.main=1.5,cex.lab=1.5)

plot(all.exprs[1,c(1:10)],all.exprs[2,c(1:10)],

xlab=gn[1],ylab=gn[2],pch=16,cex=2,cex.main=1.5,cex.lab=1.5) plot(all.exprs[1,c(1:10)],all.exprs[2,c(1:10)],

xlab=gn[1],ylab=gn[2],type='l',lwd=2,cex.main=1.5,cex.lab=1.5)

Familiar Distances 

Euclidean Metric - 

Pearson Sample Correlation Distance - 

Relation for “standardized” vectors:

(^

∑

−

=^

i

i

i

euc

y

x

y x

d^

2

) , (

=

−

−

−

−

−

−

) , ( 1 ) ( ) (

)

()

(

1 ) , (^

2

2

y x r y y x x

y y x x y x d i

i

i

i

cor

(^

))

(^

y x r n y x d

euc

0 for “zero distance”or “perfectcorrelation” (vectors have mean 0and “length” 1)

Mahalanobis Distance 

Consider vectors x and y from a multivariatedistribution with mean

μ

and covariance



Let d(x,y) be 

What does this mean?

data are more variable in some directions



When will this be equivalent to Euclidean distance(or square of Euc. dist.)?

When

is the identity matrix

(so the pairs are iid)

)

(

)

(

1

y

x

y

x

−

′Σ

−

−

Distances between distributions 

Instead of looking at “profiles” across samples,consider gene’s expression levels as indep. samplefrom a population 

Are two genes’ distributions similar? 

Which samples have the same distributions?



What would this mean biologically? Do the genes behave similarly across samples?

  • i.e., are they functionally similar

Kullback-Leibler Information 

Suppose gene k expression levels are a vectorfrom distribution with density

f

k^

; compare genes

1 & 2: 

Maybe assume

f

k^

is N(

μ

,k Σ

) andk

Σ

k^

is diagonal

(^

)^

(^2) / ) , ( ) , ( ) , (

) ( ) (

) (

log

) (

) (

log

) , (

1 2 2 1 2 1

1

1 2

1 2

1

2 1

f f

KLI

f f

KLI

f f

KLD

dx x f x f

x f

X f

X f

E

f f

KLI

=

=   

  

=

∫

estimate from expr. levels

estimate from SE of expr. levels

(to make KLIsymmetric)independent samples

= 0 if

f^1

= f

2

Interpreting “distances” betweendistributions 

What does KLD measure?

distance between distributions (shape, etc.)



What does MI measure?

distance from independence



How are they related? 

Assuming normality and equality of covariancematrices:

KLD is a Mahalanobis distance

)

,

(

) , (^

2

1

f

f

MI

g f

KLI

=

How to implement these? 

Can assume normality (or some other distribution)

But need to verify assumption is appropriate



Could group (bin) data and treat as discrete

But problems arise when distributions are not similar locally



Could apply density estimationwith numerical integration

This is computationally expensive – but can be done

Comparison of distances in Bioconductor^ library(affy);

library(ALL);

library(bioDist)

data(ALL);

gn

<-

featureNames(ALL)

gn.list

<-

c("36199_at","39020_at","2031_s_at","39723_at",

"1635_at","1636_g_at","39730_at","34740_at","41763_g_at","38050_at","1000_at","1001_at") t <- is.element(gn,gn.list)small.eset

<-

exprs(ALL[t,])

d.euc

<-

euc(small.eset)

#^

creates

a distance

matrix

d.cor

<-

cor.dist(small.eset)

d.KLD

<-

KLdist.matrix(small.eset)

d.MI <-

MIdist(small.eset)

dist.frame

<-

data.frame(as.vector(d.euc),

as.vector(d.cor),

as.vector(d.KLD),

as.vector(d.MI))

names(dist.frame)

<-

c("Euclidean","Pearson","KLD","MutualInfo")

plot(dist.frame)

Picking out differences 

Based on plots, maybe a few differencesstand out 

To tell which these are (one way):

check.mat <- 0as.matrix(d.euc)t <- as.matrix(d.euc)>25check.mat[t] <- 1apply(check.mat,2,sum) #*^

1000_at

1001_at

1635_at

1636_g_at

2031_s_at

34740_at

#^

1

11

1

1

1

1

#^

36199_at

38050_at

39020_at

39723_at

39730_at 41763_g_at

#^

1

1

1

1

1

1