LinkageDisequilibriumMappingNaturalPopulation

LinkageDisequilibriumMappingNaturalPopulation - Linkage...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Linkage Disequilibrium Mapping - Natural Population Put Markers and Trait Data into box below OR Simulate Data Means sigma^2 N p11 p10 p01 p00 Back Linkage Disequilibrium Mapping - Natural Population Initial value of p11, p10, p01: Estimate Back Next Linkage Disequilibrium Mapping - Natural Population Estimate Back Next Linkage disequilibrium mapping – natural population Mixture model-based likelihood Sample 1 2 3 4 5 6 7 8 Height (cm, y) 184 185 180 182 167 169 165 166 markers m1 m2 1 1 2 2 0 1 1 2 2 0 1 2 2 1 0 0 m3 … 2 0 1 2 1 1 2 0 Linkage disequilibrium mapping – natural population Association between marker and QTL -Marker, Prob(M)=p, Prob(m)=1-p -QTL, Prob(Q)=q, Prob(q)=1-q Four haplotypes: Prob(MQ)=p11=pq+D p=(p11+p10) Prob(Mq)=p10=p(1-q)-D q=(p11+p01) Prob(mQ)=p01=(1-p)q-D D=p11p00-p10p01 Prob(mq)=p00=(1-p)(1-q)+D Estimate p, q, D AND µ 2 , µ 1 , µ 0 Linkage disequilibrium mapping – natural population Mixture model-based likelihood L(y,M|Ω )=Π i=1n[π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] Prior prob. Sample 1 2 3 4 5 6 7 8 Height (cm, y) 184 185 180 182 167 169 165 166 Marker genotype M MM (2) MM (2) Mm (1) Mm (1) Mm (1) Mm (1) mm (0) mm (0) QTL genotype QQ Qq π2|i π1|i π2|i π1|i π2|i π1|i π2|i π1|i π2|i π1|i π2|i π1|i π2|i π1|i π2|i π1|i qq π0|i π0|i π0|i π0|i π0|i π0|i π0|i π0|i Joint and conditional (π j|i) genotype prob. between marker and QTL QQ Qq qq Obs MM p112 2p11p10 p102 n2 Mm 2p11p01 2(p11p00+p10p01) 2p10p00 n1 mm p012 2p01p00 p002 n0 MM p112 2p11p10 p102 n2 p2 p2 p2 Mm 2p11p01 2(p11p00+p10p01) 2p10p00 n1 mm 2p(1-p)2p(1-p) 2p(1-p) p012 2p01p00 p002 n0 (1-p)2 (1-p)2 (1-p)2 Linkage disequilibrium mapping – natural population Conditional probabilities of the QTL genotypes (missing) based on marker genotypes (observed) L(y,M|Ω ) = Π i=1n [π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] = Π i=1n2 [π 2|2f2(yi) + π 1|2f1(yi) + π 0|2f0(yi)] Conditional on 2 (n2) × Π i=1n1 [π 2|1f2(yi) + π 1|1f1(yi) + π 0|1f0(yi)] Conditional on 1 (n1) × Π i=1n0 [π 2|0f2(yi) + π 1|0f1(yi) + π 0|0f0(yi)] Conditional on 0 (n0) Linkage disequilibrium mapping – natural population Normal distributions of phenotypic values for each QTL genotype group f2(yi) = 1/(2πσ 2)1/2exp[-(yi-µ 2)2/(2σ 2)], µ2 = µ + a f1(yi) = 1/(2πσ 2)1/2exp[-(yi-µ 1)2/(2σ 2)], µ1 = µ + d f0(yi) = 1/(2πσ 2)1/2exp[-(yi-µ 0)2/(2σ 2)], µ0 = µ - a Linkage disequilibrium mapping – natural population Differentiating L with respect to each unknown parameter, setting derivatives equal zero and solving the log-likelihood equations L(y,M|Ω ) = Π i=1n[π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] log L(y,M|Ω ) = Σ i=1n log[π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] Define Π 2|i = π 2|if1(yi)/[π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] Π 1|i = π 1|if1(yi)/[π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] Π 0|i = π 0|if1(yi)/[π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] µ 2 = ∑ i=1n(Π 2|iyi)/ ∑ i=1nΠ 1|i µ 1 = ∑ i=1n(Π 1|iyi)/ ∑ i=1nΠ 1|i µ 0 = ∑ i=1n(Π 0|iyi)/ ∑ i=1nΠ 0|i σ 2 = 1/n∑ i=1n[Π 1|i(yi-µ1)2+Π 0|i(yi-µ0)2] (1) (2) (3) (4) (5) (6) (7) Incomplete (observed) data Posterior prob QQ Qq qq Obs MM Π2|2i Π1|2i Π0|2i n2 Mm Π2|1i Π1|1i Π0|1i n1 Π2|0i Π1|0i Π0|0i n0 mm p11=1/2n{Σi=1n2[2Π2|2i+Π1|2i]+ Σi=1n1[Π2|1i+φΠ1|1i], (8) p10=1/2n{Σi=1n2[2Π0|2i+Π1|2i]+ Σi=1n1[Π0|1i+(1-φ)Π1|1i], (9) p01=1/2n{Σi=1n0[2Π2|0i+Π1|0i]+ Σi=1n1[Π2|1i+(1-φ)Π1|1i], p00=1/2n{Σi=1n2[2Π0|0i+Π1|0i]+ Σi=1n1[Π0|1i+φΠ1|1i] (10) (11) EM algorithm (1) Give initiate values Ω (0) =(µ 2,µ 1,µ 0,σ 2,p11,p10,p01,p00)(0) (2) Calculate Π2|i(1), Π1|i(1) and Π0|i(1) using Eqs. 1-3, (3) Calculate Ω (1) using Π2|i(1), Π1|i(1) and Π0|i(1) based on Eqs. 4-11, (4) Repeat (2) and (3) until convergence. PROGRAM: Given a initial µ 2, µ 1, µ 0, σ 2, mu(1), mu(2), mu(3), s2 p11, p10, p01, p00 Do While (Abs(mu(1) - omu(1)) + Abs(p00 - p00old) > 0.00001) kkk = kkk + 1 ‘cumulate the number of iteration p00old = p00 ‘keep old value of p00 prob(1, 1) = p11 ^ 2 / p ^ 2 ‘prior conditional probability π 2|2 prob(1, 2) = 2 * p11 * p10 / p ^ 2 ‘ π 2|1 prob(1, 3) = p10 ^ 2 / p ^ 2 ‘ π 2|0 prob(2, 1) = 2 * p11 * p01 / (2 * p * q) ‘ π 1|2 prob(2, 2) = 2 * (p11 * p00 + p10 * p01) / (2 * p * q) ‘ π 1|1 prob(2, 3) = 2 * p10 * p00 / (2 * p * q) ‘ π 1|0 prob(3, 1) = p01 ^ 2 / q ^ 2 ‘ π 0|2 prob(3, 2) = 2 * p01 * p00 / q ^ 2 ‘ π 0|1 prob(3, 3) = p00 ^ 2 / q ^ 2 ‘ π 0|0 For j = 1 To 3 omu(j) = mu(j) : cmu(j) = 0 : cpi(j) = 0 : bpi(j) = 0 For i = 1 To 3 nnn(i, j) = 0 ’3 by 3 matrix to store Π2|2, Π2|1, Π2|0, …. Π0|0 Next Next j cs2 = 0 ll = 0 For i = 1 To N sss = 0 For j = 1 To 3 ’ f2(yi), f1(yi), f0(yi) f(j) = 1 / Sqr(2 * 3.1415926 * s2) * Exp(-(y(i) - mu(j)) ^ 2 / 2 / s2) sss = sss + prob(datas(i, mrk), j) * f(j) ‘[π 2|if2(yi) + π 1|if1(yi) + π 0|if0(yi)] Next j ll = ll + Log(sss) ’calculate log-likelihood For j = 1 To 3 bpi(j) = prob(datas(i, mrk), j) * f(j) / sss ’FORMULA (1-3) cmu(j) = cmu(j) + bpi(j) * datas(i, nmrk) ’ numerator of FORMULA (4-6) cpi(j) = cpi(j) + bpi(j) ’ denominator of FORMULA (46) cs2 = cs2 + bpi(j) * (y(i) - mu(j)) ^ 2 ’FORMULA (7) nnn(datas(i, mrk), j) = nnn(datas(i, mrk), j) + bpi(j) ’FORMULA (811) Next j ‘ Update µ 2, µ 1, µ 0 formula (4-6) For j = 1 To 3 mu(j) = cmu(j) / cpi(j) Next j ‘Update σ 2 formula 7 s2 = cs2 / N ‘Update p11, p10, p01, p00 FORMULA (8-11) phi = p11 * p00 / (p11 * p00 + p10 * p01) p11 = (2 * nnn(1, 1) + nnn(1, 2) + nnn(2, 1) + phi * nnn(2, 2)) / 2 / N p10 = (2 * nnn(1, 3) + nnn(1, 2) + nnn(2, 3) + (1 - phi) * nnn(2, 2)) / 2 / N p01 = (2 * nnn(3, 1) + nnn(2, 1) + nnn(3, 2) + (1 - phi) * nnn(2, 2)) / 2 / N p00 = (2 * nnn(3, 3) + nnn(2, 3) + nnn(3, 2) + phi * nnn(2, 2)) / 2 / N p = p11 + p10 q=1-p Loop LR = 2 * (ll - ll0) Linkage Disequilibrium Mapping - Natural Population Binary Trait Put Markers and Trait Data into box below OR Simulate Data f2, f1, f0 N p11 p10 p01 p00 Back Linkage Disequilibrium Mapping - Natural Population Binary Trait Initial value of p11, p10, p01: Initial value of f2, f1, f0: Estimate Back Next Linkage Disequilibrium Mapping - Natural Population Binary Trait Initial value of f2, f1, f0: Estimate Back Next Linkage Disequilibrium Mapping - Natural Population Binary Trait L(Ω |y)=Πj=02Πi=0nj log [ϖ2|ijPr{yij=1|Gij=2,Ω }yij Pr{yij=0|Gij=2,Ω }(1-yij) +ϖ1|ijPr{yij=1|Gij=1,Ω }yij Pr{yij=0|Gij=1,Ω }(1-yij) +ϖ0|ijPr{yij=1|Gij=0,Ω }yij Pr{yij=0|Gij=0,Ω }(1-yij)] =Πj=02Πi=0nj log[ϖ2|ijf2yij(1-f2)(1-yij)+ϖ1|ijf1yij(1-f1)(1-yij)+ϖ0|ijf0yij(1-f0)(1-yij)] Ω = (p11, p10, p01, p00, f2, f1, f0) (6 parameters) For j = 1 To 3 omu(j) = mu(j) : cmu(j) = 0 : cpi(j) = 0 : bpi(j) = 0 For i = 1 To 3 nnn(i, j) = 0 ’3 by 3 matrix to store Π2|2, Π2|1, Π2|0, …. Π0|0 Next Next j cs2 = 0 ll = 0 For i = 1 To N sss = 0 For j = 1 To 3 ’ f2(yi), f1(yi), f0(yi) f(j) = 1 / Sqr(2 * 3.1415926 * s2) * Exp(-(y(i) - mu(j)) ^ 2 / 2 / s2) f(j)=mu(j) ^ datas(i, nmrk) * (1 - mu(j)) ^ (1 - datas(i, nmrk)) sss = sss + prob(datas(i, mrk), j) * f(j) Next j ll = ll + Log(sss) ’calculate log-likelihood For j = 1 To 3 bpi(j) = prob(datas(i, mrk), j) * f(j) / sss ’FORMULA (1-3) cmu(j) = cmu(j) + bpi(j) * datas(i, nmrk) ’ numerator of FORMULA (4-6) cpi(j) = cpi(j) + bpi(j) ’ denominator of FORMULA (46) cs2 = cs2 + bpi(j) * (y(i) - mu(j)) ^ 2 ’FORMULA (7) nnn(datas(i, mrk), j) = nnn(datas(i, mrk), j) + bpi(j) ’FORMULA (811) ...
View Full Document

This note was uploaded on 12/01/2011 for the course STA 6178 taught by Professor Staff during the Fall '11 term at University of Florida.

Ask a homework question - tutors are online