240 likes | 475 Views
Linkage Disequilibrium Mapping - Natural Population. Put Markers and Trait Data into box below. OR. Linkage Disequilibrium Mapping - Natural Population. Initial value of p11, p10, p01:. Linkage Disequilibrium Mapping - Natural Population. Linkage disequilibrium mapping – natural population.
E N D
Linkage Disequilibrium Mapping - Natural Population Put Markers and Trait Data into box below OR
Linkage Disequilibrium Mapping - Natural Population Initial value of p11, p10, p01:
Linkage disequilibrium mapping – natural population Mixture model-based likelihood Height markers Sample (cm, y) m1 m2 m3 … 1 184 1 1 2 2 185 2 2 0 3 180 0 1 1 4 182 1 2 2 5 167 2 0 1 6 169 1 2 1 7 165 2 1 2 8 166 0 0 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 Estimatep, 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)] Sam- Height Marker genotype QTL genotype ple (cm, y) MQQQq qq 1 184 MM (2) 2|i1|i 0|i 2 185 MM (2) 2|i1|i 0|i 3 180 Mm (1) 2|i1|i 0|i 4 182 Mm (1) 2|i1|i 0|i 5 167 Mm (1) 2|i1|i 0|i 6 169 Mm (1) 2|i1|i 0|i 7 165 mm (0) 2|i1|i 0|i 8 166 mm (0) 2|i1|i 0|i Prior prob.
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 p2p2p2 Mm 2p11p01 2(p11p00+p10p01) 2p10p00 n1 2p(1-p) 2p(1-p) 2p(1-p) mm 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/(22)1/2exp[-(yi-2)2/(22)], 2 = + a f1(yi) = 1/(22)1/2exp[-(yi-1)2/(22)], 1 = + d f0(yi) = 1/(22)1/2exp[-(yi-0)2/(22)], 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) 1|i= 1|if1(yi)/[2|if2(yi) + 1|if1(yi) + 0|if0(yi)] (2) 0|i= 0|if1(yi)/[2|if2(yi) + 1|if1(yi) + 0|if0(yi)] (3) 2 = i=1n(2|iyi)/ i=1n1|i (4) 1 = i=1n(1|iyi)/ i=1n1|i (5) 0 = i=1n(0|iyi)/ i=1n0|i (6) 2 = 1/ni=1n[1|i(yi-1)2+0|i(yi-0)2] (7)
Incomplete (observed) data Posterior prob QQ Qq qq Obs MM 2|2i1|2i 0|2i n2 Mm 2|1i1|1i 0|1in1 mm 2|0i1|0i 0|0in0 p11=1/2n{i=1n2[22|2i+1|2i]+ i=1n1[2|1i+1|1i], (8) p10=1/2n{i=1n2[20|2i+1|2i]+ i=1n1[0|1i+(1-)1|1i], (9) p01=1/2n{i=1n0[22|0i+1|0i]+ i=1n1[2|1i+(1-)1|1i], (10) p00=1/2n{i=1n2[20|0i+1|0i]+ i=1n1[0|1i+1|1i] (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, p11, p10, p01, p00 mu(1), mu(2), mu(3), s2 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 store2|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) 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 ofFORMULA (4-6) cpi(j) = cpi(j) + bpi(j) ’ denominator ofFORMULA (4-6) cs2 = cs2 + bpi(j) * (y(i) - mu(j)) ^ 2 ’FORMULA (7) nnn(datas(i, mrk), j) = nnn(datas(i, mrk), j) + bpi(j) ’FORMULA (8-11) Next j Next i ‘[2|if2(yi) + 1|if1(yi) + 0|if0(yi)]
‘ 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 PopulationBinary Trait Put Markers and Trait Data into box below OR
Linkage Disequilibrium Mapping - Natural PopulationBinary Trait Initial value of p11, p10, p01: Initial value of f2, f1, f0:
Linkage Disequilibrium Mapping - Natural PopulationBinary Trait Initial value of f2, f1, f0:
Linkage Disequilibrium Mapping - Natural PopulationBinary Trait L(|y)=j=02i=0nj log [2|ijPr{yij=1|Gij=2,}yijPr{yij=0|Gij=2,}(1-yij) +1|ijPr{yij=1|Gij=1,}yijPr{yij=0|Gij=1,}(1-yij) +0|ijPr{yij=1|Gij=0,}yijPr{yij=0|Gij=0,}(1-yij)] =j=02i=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 store2|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 ofFORMULA (4-6) cpi(j) = cpi(j) + bpi(j) ’ denominator ofFORMULA (4-6) cs2 = cs2 + bpi(j) * (y(i) - mu(j)) ^ 2 ’FORMULA (7) nnn(datas(i, mrk), j) = nnn(datas(i, mrk), j) + bpi(j) ’FORMULA (8-11) Next j Next i