# # # R代码从装饰图案的pca-vignette来源。Rnw“# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块1号:获取数据# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #要求(snpStats)数据(for.exercise)控制< - rownames (subject.support)[主题。支持美元cc = = 0]使用< - seq (1, ncol (snps.10), 10) ctl。10 < -单核苷酸多态性。10(控制,使用)# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块2号:xxt-matrix # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # xxmat < - xxt (ctl。10,correct.for.missing = FALSE) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块3号:特征# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # evv < -特征(xxmat,对称= TRUE)电脑< - evv美元向量[1:5]评价<——evv美元值[1:5]测评# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块数量4:pc-one # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #流行< -主题。支持(控制,“层”)标准(mfrow = c(1、2)箱线图(pc[1] ~流行)箱线图(pc[2] ~流行)# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块5号:pre-multiply # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # btr < - snp.pre.multiply (ctl。10、诊断接头(1 /√(测评))% * % t (pc)) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块6号:post-multiply # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #电脑< - snp.post.multiply (snp。10[使用],t (btr)) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #代码块数量7:测试# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # cc < -主题。cc未修正的< - single.snp美元的支持。测试(cc, snp.data = snps.10) < - snp.rhs纠正。测试(cc ~电脑[1],snp.data = snps.10)标准(mfrow = c (1、2), cex.sub = 0.85) qq.chisq (chi.squared(未修正的,1),df = 1) qq.chisq (chi.squared(纠正),df = 1)