!Genetic Simplex Model !Analysis of platelet count !Platelet count rescaled by dividing count by 100 to aid optimisation #define nvar 3 ! platelet count at 12, 14 and 16 years #define nsib 2 ! number of siblings #NGroups 3 Title Genetic structure - Simplex Calculation Begin Matrices X Diag nvar nvar Free !genetic innovations W Diag nvar nvar Free !dominance Z Diag nvar nvar Free !specific environmental innovations N Lower nvar nvar Free !genetic transmission paths O Lower nvar nvar Free !dominance transmission paths P Lower nvar nvar Free !specific environmental paths R Diag nvar nvar Free !measurement error L Full nvar 1 Free !QTL effect I Iden nvar nvar M Full nsib nvar Free H Full 1 1 !.5 B Full 1 1 !.25 End Matrices; Matrix H .5 Matrix B .25 Specify N 0 13 0 0 14 0 Specify O 0 15 0 0 16 0 Specify P 0 17 0 0 18 0 Specify R 21 21 21 !Equate measurement error variances for identification Specify M 40 41 42 40 41 42 Begin Algebra; A= (I-N)~ & (X*X'); D= (I-O)~ & (W*W'); E= (I-P)~ & (Z*Z') + R*R'; Q= L*L'; !variance due to QTL V= A+Q+D+E; !total variance End Algebra; End G2: Monozygotic twins Data NInput=13 Rectangular File=marker6.dat Labels famid indid1 indid2 pibd0 pibd1 pibd2 zygosity plt11 plt12 plt13 plt21 plt22 plt23 Select if zygosity <3; Select plt11 plt12 plt13 plt21 plt22 plt23; Begin Matrices = Group 1; Means M; Covariance A+D+Q+E | A+D+Q _ A+D+Q | A+D+Q+E; End G3: Dizygotic twins Data NInput=13 NModel=3 Rectangular File=marker6.dat Labels famid indid1 indid2 pibd0 pibd1 pibd2 zygosity plt11 plt12 plt13 plt21 plt22 plt23 Select if zygosity >2; Select pibd0 pibd1 pibd2 plt11 plt12 plt13 plt21 plt22 plt23; Definition pibd0 pibd1 pibd2; Begin Matrices = Group 1; K Full 3 1 !IBD probabilities (from Genehunter) I Unit 3 1 !to create means for all models & sibs End Matrices; Specify K pibd0 pibd1 pibd2 Begin Algebra; U= H@A+B@D; !IBD 0 covariance (=non-qtl covariance) S= U+H@Q; !IBD 1 covariance T= U+Q; !IBD 2 covariance Y= V|U_ U|V_ !IBD 0 matrix V|S_ S|V_ !IBD 1 matrix V|T_ T|V; !IBD 2 matrix End Algebra; Means I@M; Covariance Y; Weights K; Start 0.5 All Start 2.8 M 1 1 1 M 1 1 2 M 1 1 3 Option NDecimals=3 Option Iterations=10000 Option Multiple Issat End ! Equate loadings on QTL Start 0.5 All Start 2.8 M 1 1 1 M 1 1 2 M 1 1 3 Equate L 1 1 1 L 1 2 1 L 1 3 1 End ! Test significance of QTL effect Drop L 1 1 1 to L 1 3 1 End