graphical model view of additive genetic models

33
Graphical Model View of Additive Genetic Models Gregor Gorjanc University of Ljubljana, Biotechnical Faculty, Department of Animal Science, Slovenia UGA, Athens, Georgia, USA 30th September 2010

Upload: gregor-gorjanc

Post on 08-Apr-2015

370 views

Category:

Documents


2 download

DESCRIPTION

Talk at University of Georgia Athens, Edgar, L. Rhodes Center for Animal and Dairy, Science, Georgia, USA

TRANSCRIPT

Page 1: Graphical Model View of Additive Genetic Models

Graphical Model View of Additive GeneticModels

Gregor Gorjanc

University of Ljubljana, Biotechnical Faculty, Department of Animal Science, Slovenia

UGA, Athens, Georgia, USA30th September 2010

Page 2: Graphical Model View of Additive Genetic Models

My department ...

Page 3: Graphical Model View of Additive Genetic Models

Table of Contents

1. Models capturing additive genetic variation

2. Graphical model representation(enlightening view on animal model)

3. BUGS implementation(flexible McMC engine for “kids”)

Page 4: Graphical Model View of Additive Genetic Models

Additive Genetic VariationI Additive genetic variation is essential "ingredient” for animal

breeding business

I Majority of genetic variance seems to be additive(e.g. Hill et al., 2008, PLOS Genet.)

I Models:1. single marker/gene regression of phenotype on number of allele

copies (= gene content)2. regression of phenotype on pedigree (= animal model)

I sum of models 1. as we push the number of genes to limitI a lot of variations (genetic groups, maternal and/or paternal,

mutliple traits, competitive effects, . . . )I can use genome-wide marker data to improve relationships

Page 5: Graphical Model View of Additive Genetic Models

Animal ModelI Equivalent names:

I pedigree based mixed modelI regression of phenotypes on pedigree (graph)

y = Xb + Za + ey|b, a, σ2

e ∼ N(Xb + Za, Iσ2

e)

a|A, σ2a ∼ N

(0,Aσ2

a)

parameters: b, a (location) σ2a , σ

2e (variance)

data: y (phenotypes), A (pedigree)

I Simplistic, powerful, & robust modelI Frequently used in:

I animal and plant breeding - research & INDUSTRYI human genetics - researchI evolutionary biology - research

Page 6: Graphical Model View of Additive Genetic Models

“Alien” Example

Figure by Jouke

Individual Father Mother Group Phenotype1 / / / /2 / / 1 103, 1063 2 1 1 984 2 / 2 1015 4 3 2 1066 2 3 2 937 5 6 / /8 5 6 / /9 / / / /10 8 9 1 109

Page 7: Graphical Model View of Additive Genetic Models

“Alien” Example ModelI Phenotype regressions, e.g., y|b, a, σ2

e ∼ N (Xb + Za, Iσ2e )

y2,1 = b1 + a2 + e2,1

y2,2 = b1 + a2 + e2,2

y3 = b1 + a3 + e3

y4 = b2 + a4 + e4

. . .

I Pedigree regressions, e.g., a|A, σ2a ∼ N (0,Aσ2

a)

a1 = w1

a2 = w2

a3 = 1/2a1 + 1/2a2 + w3

a4 = 1/2a2 + w4

. . .

Page 8: Graphical Model View of Additive Genetic Models

Solutions for b and a

I Henderson’s mixed model equations (MME)(assuming variances σ2

a and σ2e are known)

(XTX XTZZTX ZTZ + A−1σ2

e/σ2a

)(ba

)=

(XTyZTy

)I We know all this . . .

Page 9: Graphical Model View of Additive Genetic Models

2. Graphical Model Representation(enlightening view on animal model)

∼Wright’s path analysis with distributions

Page 10: Graphical Model View of Additive Genetic Models

“Alien” Example Model as a Graph

Figure by Jouke

Page 11: Graphical Model View of Additive Genetic Models

“Alien” Example Model as a Graphσ2

a σ2e

a1 a2

a398 a4

a5 a6

a7 a8 a9

a10109

Figure by Jouke

Page 12: Graphical Model View of Additive Genetic Models

“Alien” Example Model as a Graphσ2

a σ2e

a1 a2

103

106

a398 a4 101

a5 106 a6 93

a7 a8 a9

a10109

Figure by Jouke

Page 13: Graphical Model View of Additive Genetic Models

“Alien” Example Model as a Graphσ2

a σ2e

b1 b2

a1 a2

103

106

a398 a4 101

a5 106 a6 93

a7 a8 a9

a10109

Figure by Jouke

Page 14: Graphical Model View of Additive Genetic Models

“Alien” Example Model as a Graphσ2

a σ2e

b1 b2

a1 a2

103

106

a398 a4 101

a5 106 a6 93

a7 a8 a9

a10109

Figure by Jouke

Page 15: Graphical Model View of Additive Genetic Models

. . . using Plate Notation

σ2a

af(k) am(k)

ak

k = 1 : nI

Wk,k

1/2 1/2

bj

j = 1 : nB

µi

σ2e

yi

i = 1 : nY

Zi,k

Xi,j

Page 16: Graphical Model View of Additive Genetic Models

Graphical ModelsI Directed Acyclic Graphs (DAG) (= Bayesian Networks)

I variables (nodes/vertices) & “relationships” between variables(directed arcs/edges)

I joint distribution of a graph (conditional independence!!!)

p (z) =∏zi∈z

p(zi |zparents(i)

)I full conditional distribution of a node zi

p (zi |z−i) ∝ p(zi |zparents(i)

) ∏zj∈zchildren(i)

p(zj |zparents(j)

)I Undirected Graphs (= Markov Network, (Gaussian) Markov

Random Fields)I Other variants capturing particular independence statements

Page 17: Graphical Model View of Additive Genetic Models

Equivalence between Pedigree Graph and A−1

A = TWTT = (I− 1/2P)−1W(I− 1/2PT)−1

A−1 =(T−1)TW−1T−1 = (I− 1/2P)TW−1(I− 1/2P)

Wi ,i = 1− 1/4(1 + F f (i)

)− 1/4

(1 + F m(i)

)The “hardest” part is to figure out W. The rest is easy.

σ2a

af (i) am(i)

ai

i = 1 : nI

Wi ,i

1/2 1/2

Page 18: Graphical Model View of Additive Genetic Models

Equivalence between Pedigree Graph and A−1Only first decimal number shown!

A−1 =

1.5 0.5 −1.02.3 −0.5 −0.6 −1.0

+3.0 +0.5 −1.0 −1.0+1.8 −1.0

+3.2 +1.2 −1.2 −1.2+3.2 −1.2 −1.2

+2.4+3.0 0.5 −1.1

1.5 −1.1sym. +2.3

I DAG structureI introduced with moralization (process of transforming DAG to

undirected graph, A−1 does not imply directions per se)I A−1 = precision / conditional independence matrix

Page 19: Graphical Model View of Additive Genetic Models

Extensions in the Pedigree GraphMaternal and/or paternal

Multiple traits Uncertain parentage

k = 1 : nI

G0

af(k),l am(k),l

ak,l

l = 1 : nA

Wk,k

1/2 1/2

σ2a

ap(k,l)

ak

k = 1 : nI

l = 1 : nCk

Wk,k

1/2Pk,p(k,l)

Genetic groups(not shown)

Page 20: Graphical Model View of Additive Genetic Models

Inference with McMCI Location parameters θ = (b, a)

Block-wise sampling

p(θ|y,A, σ2

a , σ2e)∼ N

(θ,C−1σ2

e

)Component-wise sampling

p(θi |θ−i , y,A, σ2

a , σ2e)∼ N

(θi ,C−1

i ,i σ2e

)Mixed model equations (MME)

Cθ = r(XTX XTZZTX ZTZ + A−1σ2

e/σ2a

)(ba

)=

(XTyZTy

)

I Variances . . . (see Sorensen & Gianola (2002))

Page 21: Graphical Model View of Additive Genetic Models

Full Conditionals for ai

p (zi |z−i) ∝ p(zi |zparents(i)

)×∏

zj∈zchildren(i)

p(zj |zparents(j)

)I Markov blanket for a5:

I “parents”: a3, a4I “children”: y5, a7, a8I “mates”: b2, a6

I Animal breeding view:I parent averageI yield deviationI progeny contribution

b1 b2

a1 a2

y21

y22

a3y3 a4 y4

a5 y5 a6 y6

a7 a8 a9

a10y10

(= Gianola’s operator view)

Page 22: Graphical Model View of Additive Genetic Models

Do we gain anything?I Just another view on the same model!

I But:I other comunities (computer science, machine learning)I other algorithms

I variable elimination = peelingI loopy belief propagation = iterative peelingI Gaussian belief propagationI variational message passingI expectation propagationI . . .

I general purpose graphical model software availableI BUGS, JAGSI Infer.NETI . . .

Page 23: Graphical Model View of Additive Genetic Models

3. BUGS Implementation(flexible McMC engine for kids)

µµµµ ττττ

Y6

Y5

Y1

Y2

Y3 Y

4

θθθθ

Page 24: Graphical Model View of Additive Genetic Models

Can we use BUGS for Animal Model? YES!I Previous work

I Damgaard (2007) Technical note: How to use Winbugs todraw inferences in animal models. J. Anim. Sci., 85(6):1363-1368.http://jas.fass.org/cgi/reprint/85/6/1363.pdf

I Waldmann (2009) Easy and flexible Bayesian inference ofquantitative genetic parameters. Evolution, 63(6): 1640-1643.http://www3.interscience.wiley.com/journal/

121675188/abstract

I My workI Fit animal model in BUGS in a general mannerI How? Describe animal model as a graphical model

using Directed Acyclic Graph (DAG)

µµµµ ττττ

Y6

Y5

Y1

Y2

Y3 Y

4

θθθθ

Page 25: Graphical Model View of Additive Genetic Models

How-to use BUGS?

I Check “Welcome to WinBUGS - the movie” to see thepoint&click work-flowhttp://www.mrc-bsu.cam.ac.uk/bugs/winbugs/

winbugsthemovie.html

I There are also “automatic” interfaces from:I R & S-PLUS (packages R2WinBUGS & BRugs)I SASI MATLABI Excel

Page 26: Graphical Model View of Additive Genetic Models

Essential “Ingredients” for BUGS?

I User provides:I Model (DAG description via BUGS model language)I DataI Initial valuesI McMC scheme parameters (iterations, burn-in, thinning)

I BUGS automagically does:I construction of full conditionalsI choice of samplers (Gibbs, Metropolis, slice sampler, . . . )I sampling

Page 27: Graphical Model View of Additive Genetic Models

Animal Model in BUGS Model Language## Phenotypic values

y21 ∼ dnorm(mu21, tau2e)

mu21 <- b2 + a2

## Additive genotypic values

a1 ∼ dnorm(0, tau2a)

...

a4 ∼ dnorm(pa4, tau2a4)

pa4 <- 0.5 * (a2 + 0); tau2a4 <- winv4 * tau2a

...

a10 ∼ dnorm(pa10, tau2a10)

pa10 <- 0.5 * (a8 + a9); tau2a10 <- winv10 * tau2a

## Other priors

b2 ∼ dnorm(0, 100)

...

Page 28: Graphical Model View of Additive Genetic Models

Animal Model - Using Loops –> Plate Notation

## Additive genetic values

for(k in 1:nI) {

a[id[k]] ∼ dnorm(pa[id[k]], Xtau2a[id[k]])

pa[id[k]] <- 0.5 * (a[fid[k]] + a[mid[k]])

Xtau2a[id[k]] <- winv[id[k]] * tau2a

}

a[nU] <- 0 # NULL (zero) holder

## Phenotypes

for(i in 1:nY) {

y[i] ∼ dnorm(mu[i], tau2e)

mu[i] <- b[x[i]] + a[idy[i]]

}

Page 29: Graphical Model View of Additive Genetic Models

Animal Model - Additional Priors

## Variance priors

tau2e ∼ dgamma(0.001, 0.001)

tau2a ∼ dgamma(0.001, 0.001)

sigma2e <- 1 / tau2e

sigma2a <- 1 / tau2a

## Location priors

for(j in 1:nB) { b[j] ∼ dnorm(0, 1.0E-6) }

Page 30: Graphical Model View of Additive Genetic Models

Animal Model - Data

list(## Constants

nI=10, nU=11, nY=6, nB=2,

## Pedigree

id=c( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10),

fid=c(11, 11, 2, 2, 4, 2, 5, 5, 11, 8),

mid=c(11, 11, 1, 11, 3, 3, 6, 6, 11, 9),

winv=c( 1, 1, 2, 1.3, 2, 2, 2.5, 2.5, 1, 2.3),

## Phenotypes & model variables

y=c(105, 98, 101, 106, 93, 109),

idy=c( 2, 3, 4, 5, 6, 10),

x=c( 1, 1, 2, 2, 2, 1)

)

Page 31: Graphical Model View of Additive Genetic Models

Initial values

I Not strictly needed, but its good to provide them to avoidextreme initial valueslist(## Means

b=c(1, -1),

a=c(0, -0.8, 1, 0.6, 1.2, 5, 0, -1, 2, 1, NA),

## Variances

tau2a=1,

tau2e=1

)

Page 32: Graphical Model View of Additive Genetic Models

Heritability for the "alien” example - prior effect1

Non-informative priortau2e ∼ dgamma(1, 1)tau2a ∼ dgamma(1, 1)

0.0 0.2 0.4 0.6 0.8 1.0

Informative priortau2e ∼ dgamma(5, 120)tau2a ∼ dgamma(15, 240)

0.0 0.2 0.4 0.6 0.8 1.0

1For details see Sorensen & Gianola (2002) - Example 2.21 (p. 109-111)

Page 33: Graphical Model View of Additive Genetic Models

Questions?

Figure by Jouke