STA6178_2005(6) - Interval mapping with maximum likelihood...

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: Interval mapping with maximum likelihood Data Files: •Marker file – all markers •Traits file – all traits •Linkage map – built based on markers For example: Interval mapping with maximum likelihood ID #PN RG472 RG246 K5 U10 RG532 W1 RG173 Amy1B RZ276 RG146 Interval mapping with maximum likelihood ID 10D 20D 30D 40D 50D 60D 70D 80D 90D chrom1 chrom2 chrom3 chrom4 RG218 RG472 19.2 RG246 16.1 4.8 4.7 15.3 15.5 15.0 3.8 3.3 23.5 W1 RG173 Amy1B RZ276 RG146 RG345 RG381 RZ19 8.2 RG690 13.2 RZ730 33.1 5.3 22.2 K5 U10 RG532 34.3 2.5 13.0 RG437 RG544 RG171 RG157 27.4 6.3 29.3 RZ318 Pall 9.2 13.2 6.9 9.8 2.8 17.5 8.8 CDO686 Amy1A/C 12.8 8.4 5.1 10.0 RG95 RG654 RG256 5.4 13.1 RZ213 RZ123 RZ801 8.1 8.6 12.6 RG100 13.7 3.2 RG191 RZ678 16.1 8.4 16.8 RZ574 RZ284 RZ394 2.5 5.0 28.6 1.9 22.5 pRD10A RZ403 RG179 CDO337 RZ337A RZ448 15.0 RZ519 32.1 Pgi -1 7.1 9.2 17.9 RG190 RG908 RG91 RG449 RG788 RZ565 RZ675 RG163 15.6 18.5 RZ262 21.4 37.1 RG810 RG331 RZ329 RZ892 41.6 RZ58 10.2 RG520 2.6 7.7 RG104 RG348 CDO87 RG910 RG418A 28.2 2.7 12.2 RZ590 RG214 RG143 5.9 RG620 Interval Mapping Program - Type of Study Simulatio n - Genetic Design Backcros s F2 Back Interval Mapping Program - Data and Options Names of Markers (optional) Cumulative Marker Distance (cM) Map Function QTL Searching Step Halda ne cM Kosa mbi Parameters Here for Simulation Study Only sigma^2 Means QTL position H2 N Calculate H2 or Sigma2 Back Interval Mapping Program - Data Put Markers and Trait Data into box below OR Back Simulate Data Interval Mapping Program - Analyze Data Analyze Regressi on Model Mixtu re Mod el Back Interval Mapping Program - Profile 4.00 3.50 3.00 2.50 2.00 1.50 1.00 0.50 0.00 (0.50) 0 20 40 60 80 100 QTL at 91 (091 1.756 1.455 0.182 3.649) Back Interval Mapping Program - Permutation Test #Tests 8.00 Test 7.00 6.00 5.00 4.00 Cut Point at Level Is Based on Tests. 3.00 2.00 1.00 0.00 (1.00) 0 20 40 60 80 100 QTL at 91 (091 1.756 1.455 0.182 3.649) Reset Back Backcross Population – Two Point Freq Qq qq Mm 1/2 (1-r)/2 r/2 mm 1/2 r/2 (1-r)/2 Backcross Population – Three Point Freq Qq qq Mm Nn (1-r)/2 (1-r1)(1-r2) r1*r2 Mm nn r/2 (1-r1)r2 r1 (1-r2) mm Nn r/2 r1 (1-r2) (1-r1)r2 mm nn (1-r)/2 r1*r2 M Q N (1-r)/2 F2 Population – Two Point Freq QQ Qq qq MM 1/4 (1-r)2/4 (1-r)r/2 r2/4 Mm 1/2 (1-r)r/2 ½-(1-r)r (1-r)r/2 mm 1/4 r2/4 (1-r)r/2 (1-r)2/4 F2 Population – Three Point Freq QQ MM NN (1-r)2/4 Qq r=a+b-2ab M aQb N qq 1/4(1-a)2(1-b)2 1/2a(1-a)b(1-b) 1/4a2b2 Nn (1-r)r/2 1/2(1-a)2b(1-b) 1/2a(2b2-2b+1) (1-a) 1/2a2b(1-b) nn r2/4 1/4(1-a)2b2 1/2a(1-a)b(1-b) 1/4a2(1-b)2 1/2a(1-a)(1-b)2 1/2b(1-2a+2a2) (1-b) 1/2a(1-a)b2 Mm NN (1-r)r/2 Nn a(1-a)b(1-b) 1/2(2b2-2b+1) (1-2a+2a2) a(1-a)b(1-b) Nn mm ½-(1-r)r (1-r)r/2 1/2a(1-a)b2 1/2b(1-2a+2a2) (1-b) 1/2a(1-a)(1-b)2 NN r2/4 1/4a2(1-b)2 1/2a(1-a)b(1-b) 1/4(1-a)2b2 Nn (1-r)r/2 1/2a2b(1-b) 1/2a(2b2-2b+1) (1-a) 1/2(1-a)2b(1-b) nn (1-r)2/4 1/4a2b2 1/2a(1-a)b(1-b) 1/4(1-a)2(1-b)2 Differentiating L with respect to each unknown parameter, setting derivatives equal zero and solving the log-likelihood equations L(y,M|Ω ) = Π i=1n[π 1|if1(yi) + π 0|if0(yi)] log L(y,M|Ω ) = Σ i=1n log[π 1|if1(yi) + π 0|if0(yi)] Define Π 1|i = π 1|if1(yi)/[π 1|if1(yi) + π 0|if0(yi)] (1) (2) Π 0|i = π 0|if1(yi)/[π 1|if1(yi) + π 0|if0(yi)] µ 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] θ = (∑i=1n2Π1|i +∑i=1n3Π0|i)/(n2+n3) (3) (4) (5) (6) Random Generate Markers for Backcross Population function [mk, testres]=GenMarkerForBackcross(dist, N) %%genarate N Backcross Markers from marker disttance (cM) dist. if dist(1)~=0, cm=[0 dist]/100; else cm=dist/100; end n=length(cm); rs=1/2*(exp(2*cm)-exp(-2*cm))./(exp(2*cm)+exp(-2*cm)); for j=1:N mk(j,1)=(rand>0.5); end Random Generate Markers for Backcross Population, Cont’ for i=2:n for j=1:N if mk(j,i-1)==1, mk(j,i)=rand>rs(i); else mk(j,i)=rand<rs(i); end end end EM algorithm for Interval Mapping function intmapbackross(Datas, mrkplace) %% for example, mrkplace=[0 20 40 60 80]; N=size(Datas,1); nmrk=size(mrkplace); mm=mean(Datas(:,size(Datas,2))); vv=var(Datas(:,size(Datas,2)),1); ll0 = N * (-log(2 * 3.1415926 * vv) - 1) / 2; %%likelihood at null res=; omu1=0; EM algorithm for Interval Mapping for cm = 1:2:mrkplace(nmrk) for i = 1:nmrk if mrkplace(i) <= cm qtlk = i end end theta = (cm - mrkplace(qtlk)) / (mrkplace(qtlk + 1) - mrkplace(qtlk)); th(1) = 1; th(2) = 1 - theta; th(3) = theta; th(4) = 0; mu1 = mm; mu0 = mm; s2=vv; EM algorithm for Interval Mapping while (abs(mu1 - omu1) > 0.00000001) omu1 = mu1; cmu1 = 0; cmu0 = 0; cs2 = 0; cpi = 0; ll = 0; for j = 1:N f1 = 1 / sqrt(2 * 3.1415926 * s2) * exp(-(Datas(j, nmrk+1) - mu1)^2 / 2 / s2); f0 = 1 / sqrt(2 * 3.1415926 * s2) * exp(-(Datas(j, nmrk+1) - mu0)^2 / 2 / s2); pi1i = th(4 - Datas(j, qtlk + 1) - Datas(j, qtlk) * 2); pi0i = 1 - pi1i; ll = ll + log(pi1i * f1 + pi0i * f0); BPi1i = pi1i * f1 / (pi1i * f1 + pi0i * f0); %%E-Step BPi0i = 1 - BPi1i; cmu1 = cmu1 + BPi1i * Datas(j, nmrk+1); %%M-STEP cmu0 = cmu0 + BPi0i * Datas(j, nmrk+1); cs2 = cs2 + BPi1i * (Datas(j, nmrk+1) - mu1) ^ 2 + BPi0i * (Datas(j, nmrk+1) - mu0) ^ 2; cpi = cpi + BPi1i; end mu1 = cmu1 / cpi; mu0 = cmu0 / (N - cpi); %%M-STEP s2 = cs2 / N; end EM algorithm for Interval Mapping %%Simplex Local Search Method prob=th(4 - Datas(:, qtlk + 1) - Datas(:, qtlk) * 2)'; [mmmm, llll]=fminsearch(@(p) likelihoodback(p, … Datas(:,nmrk+1), [prob 1-prob]), [mm mm vv]); %%Simplex Local Search Method LR = 2 * (ll - ll0); res=[res; [cm mu1 mu0 s2 LR]]; end EM algorithm for Interval Mapping function A=likelihoodback(par, y, marker) mu1=par(1); mu0=par(2); s2=par(3); yy1=y-mu1; yy0=y-mu0; A=sum( log( sum([exp(-yy1.^2/2/s2) … exp(-yy0.^2/s2/2)].*marker,2)) ... -log(s2)/2-1/2*log(2*pi)) -10.E5*(s2<0.001); A=-A; ...
View Full Document

Ask a homework question - tutors are online