!************************************************************************** !MX SCRIPT TO MODEL SEX LIMITED LINKAGE WITH ORDINAL DATA !************************************************************************** #define npair 2 ! number of siblings per row in the dataset #define nvar 1 ! number of phenotypes #define ndef 2 ! number of definition variables (sex and age) G1: Calculation group Data Calc NGroups=7 Begin Matrices ; X Lower 1 1 Free ! female genetic structure Z Lower 1 1 Free ! female specific environmental structure G Full 1 1 Free ! female qtl U Lower 1 1 Free ! male genetic structure W Lower 1 1 Free ! male specific environmental structure F Full 1 1 Free ! male qtl M Full npair 1 Free ! thresholds B Full ndef 1 Fix ! sex/age correction for threshold model K Full 1 2 Fix ! matrix used to calculate pihat H Full 1 1 Fix ! specifies the kinship for same-sex sib pairs T Full 1 1 Free ! contains the genetic correlation for OS sib pairs (to be estimated) End matrices ; Matrix H 0.5 Matrix K 0.5 1 Equate M 1 1 1 M 1 2 1 Begin Algebra; A = U*U'; ! male genetic variance E = W*W'; ! male specific environmental variance Q = F*F'; ! male qtl variance V = A+E+Q; ! male total variance C = (X*X'); !female genetic variance D = (Z*Z'); !female specific environmental variance N = (G*G'); !female qtl variance O = C+D+N; !total variance females End Algebra ; Labels Row M thres_t1 thres_t2 Labels Row B beta_sex beta_age Labels Row U add_m Labels Row F qtl_m Labels Row W env_m Labels Row X add_f Labels Row G qtl_f Labels Row Z env_f Labels Row T cor_g_os Start 0.14 M 1 1 1 — M 1 npair 1 Start 0.82 U 1 1 1 Start 0.01 F 1 1 1 Start 0.75 X 1 1 1 Start 0.01 G 1 1 1 Start 0.25 T 1 1 1 Bound 0 .5 T 1 1 1 Bound -3 3 M 1 1 1 Bound -3 3 M 1 2 1 END G2: Data from genotyped male-male sibling pairs #include 19infomm.dat Matrices = group 1; S Full npair 1 ! sex definition variables R Full npair 1 ! age definition variables I Full 2 1 ! ibd's End matrices; Specify S sex1 sex2; Specify R age1 age2; Specify I p1_11 p2_11 ; Begin algebra; P = K*I; ! calculates pihat End algebra; Thresholds M +(S|R)*B ; Covariances A+E+Q | H@A+P@Q _ H@A+P@Q | A+E+Q ; END G3: Data from genotyped female-female sibling pairs #include 19infoff.dat Matrices = group 1; S Full npair 1 ! sex definition variables R Full npair 1 ! age definition variables I Full 2 1 ! ibd's End matrices; Specify S sex1 sex2; Specify R age1 age2; Specify I p1_11 p2_11 ; Begin algebra; P = K*I; ! calculates pihat End algebra; Thresholds M +(S|R)*B ; Covariances C+D+N | H@C+P@N _ H@C+P@N | C+D+N ; END G4: Data from genotyped male-female sibling pairs #include 19infomf.dat Matrices = group 1; S Full npair 1 ! sex definition variables R Full npair 1 ! age definition variables I Full 2 1 ! ibd's End matrices; Specify S sex1 sex2; Specify R age1 age2; Specify I p1_11 p2_11 ; Begin algebra; P = K*I; ! calculates pihat End algebra; Thresholds M +(S|R)*B ; Covariances A+E+Q | P@(F*G)+T@(X*U) _ (P@(F*G)+T@(X*U))' | C+D+N; END G5: Data from genotyped female-male sibling pairs #include 19infofm.dat Matrices = group 1; S Full npair 1 ! sex definition variables R Full npair 1 ! age definition variables I Full 2 1 ! ibd's End matrices; Specify S sex1 sex2; Specify R age1 age2; Specify I p1_11 p2_11 ; Begin algebra; P = K*I; ! calculates pihat End algebra; Thresholds M +(S|R)*B ; Covariances C+D+N | P@(F*G)+T@(X*U) _ (P@(F*G)+T@(X*U))' | A+E+Q; option multiple issat END G6: constraint males: total variance=1 Constraint Begin matrices; I unit nvar 1 V comp = V1 End matrices; Constraint V=I; option no-output END G7: constraint females: total variance=1 Constraint Begin matrices; I unit nvar 1 O comp =O1 End matrices; Constraint O=I; option no-output END ! Save results of first model-fitting run save full.mxs ! Equate QTL effects in both males and females Equate F 1 1 1 G 1 1 1 END ! Recover first model-fitting run get full.mxs ! Eliminate MALE qtl effect only Drop @0 F 1 1 1 END ! Recover first model-fitting run get full.mxs ! Eliminate FEMALE qtl effect only Drop @0 G 2 1 1 END