# # # R代码从装饰图案的tdt-vignette来源。Rnw“# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块1号:家庭数据# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #要求(snpStats)数据(家庭)基因型的头(pedData) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块2号:mis-inheritances # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # mis <——misinherits (data = pedData snp.data =基因型)暗(mis) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块3号:per-subj-snp # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /。主题< -应用(mis, 1, na.rm = TRUE) /。snp < -应用(mis 2和,na.rm = TRUE)标准(mfrow = c(1、2)嘘(每。每主题的主题、主要= '直方图,xlab =“主题”)嘘(每。snp,主要=每个snp直方图,xlab = snp) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块数量4:住房# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # fam < - pedData [rownames (mis), " familyid "] /。fam公司< - tapply(每。主题,家人,总和)标准(mfrow = c(1,1))嘘(每。家人,主要=直方图每个家庭,xlab = '家庭')# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块5号:tdt-tests # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #测试< - dt。snp (data = pedData snp。数据=基因型)cbind (p.values。1 df = p。值(测试,1),p.values。2 df = p。值(测试,2))qq.chisq (chi。方(测试,1),df = 1)