designed for family based tests of linkage disequilibrium between a marker and a complex trait (=family based association mapping)
we are going to us it to estimate variance components where our marker is the whole genome or a chromosome
designed for family based tests of linkage disequilibrium between a marker and a complex trait (=family based association mapping)
we are going to us it to estimate variance components where our marker is the whole genome or a chromosome
-w
and -v
-a
optione
non-shared environmentg
polygenic componentsa
additive major gene effectt
twin environmentc
common environment-w
option specifies variances under the null
-we
specifies that only environmental effects are modelledv
specifies variances under the alternative
-veg
models environment and polygenic effects.-a-
-we
and -veg
typical command line:
qtdt -d example.dat -p example.ped -a- -we -veg
regress.tbl
-a-
-weg
and -vega
-i idbfile
typical command line
qtdt -d example.dat -p example.ped -i example.ibd -a- -weg -vega
data.txt
three files for QTDT
chromosomal (1-22, X) mean pihats
data<-read.table("data.txt", header=T)
data[1:2,1:24]
## pairID chr1_pi chr2_pi chr3_pi chr4_pi chr5_pi chr6_pi chr7_pi
## 1 800301112 0.3025 0.4413 0.4603 0.3322 0.4801 0.2045 0.6479
## 2 801101112 0.5184 0.3173 0.4297 0.6732 0.5803 0.4266 0.3382
## chr8_pi chr9_pi chr10_pi chr11_pi chr12_pi chr13_pi chr14_pi chr15_pi
## 1 0.1674 0.3484 0.4224 0.4550 0.2969 0.5484 0.2646 0.6484
## 2 0.6611 0.4706 0.3917 0.4542 0.4342 0.3589 0.4113 0.4557
## chr16_pi chr17_pi chr18_pi chr19_pi chr20_pi chr21_pi chr22_pi chrx_pi
## 1 0.7575 0.5294 0.7745 0.6430 0.6818 0.8810 0.5376 0.4681
## 2 0.7145 0.6257 0.6315 0.8907 0.6510 0.3921 0.4344 0.7597
chromosomal (1-22, X) mean IBD
data[1:2,25:47]
## chr1_ibd chr2_ibd chr3_ibd chr4_ibd chr5_ibd chr6_ibd chr7_ibd chr8_ibd
## 1 0.0146 0.1576 0.1428 0.0201 0.2047 0.0102 0.4009 0.0318
## 2 0.1987 0.0300 0.1771 0.5068 0.3305 0.1260 0.0731 0.4637
## chr9_ibd chr10_ibd chr11_ibd chr12_ibd chr13_ibd chr14_ibd chr15_ibd
## 1 0.0458 0.1916 0.1324 0.1090 0.4508 0.0107 0.3754
## 2 0.2977 0.1373 0.2333 0.1679 0.0037 0.0597 0.3768
## chr16_ibd chr17_ibd chr18_ibd chr19_ibd chr20_ibd chr21_ibd chr22_ibd
## 1 0.5247 0.2466 0.5560 0.3028 0.3735 0.7689 0.1238
## 2 0.4518 0.3782 0.3355 0.7852 0.3151 0.0176 0.0309
## chrx_ibd
## 1 0.4681
## 2 0.7597
data[1:2,48:59]
## gw_pi gw_ibd sex_sib1 age_sib1 ht_sib1 zht_sib1 sex_sib2 age_sib2
## 1 0.4920 0.2361 1 16 178.0 0.47048 1 16
## 2 0.5119 0.2498 1 16 174.5 -0.05328 1 16
## ht_sib2 zht_sib2 sex_pair pop
## 1 166 -1.325 1 2
## 2 185 1.518 1 2
hints:
rowMeans(dat[,2:23])
apply(dat[,2:3],1,sd)
meanpi=rowMeans(dat[,2:23]);pihat_sd=apply(dat[,2:3],1,sd)
meanibd=rowMeans(dat[,25:46]);ibd2_sd=apply(dat[,25:46],1,sd)
plot(meanpi,meanibd, pch=20,col=4, xlab="genome-wide pihat", ylab="genome-wide IBD2")
summary(lm(ibd2_mean~pihat_mean))
##
## Call:
## lm(formula = ibd2_mean ~ pihat_mean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.12674 -0.01129 0.00004 0.01125 0.06657
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.25602 0.00218 -117 <2e-16 ***
## pihat_mean 1.01194 0.00436 232 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0171 on 11212 degrees of freedom
## Multiple R-squared: 0.828, Adjusted R-squared: 0.828
## F-statistic: 5.38e+04 on 1 and 11212 DF, p-value: <2e-16
zht_sib1 & zht_sib2
qtdt -d qtdt.dat -p qtdt.ped -a- -we -veg
qtdt -d qtdt.dat -p qtdt.ped -i qtdt.ibd -a- -weg -vega
estimate additive variance for a specific chromosome
need to edit .dat
file and change one S2 to an M!