进行GWAS:提取出合格的样本和SNP后,使用plink进行GWAS分析
输入文件:
1、 test.ped
The PED file is a white-space (space or tab) delimited file: the first six columns are mandatory:
Family ID
Individual ID
Paternal ID
Maternal ID
Sex (1=male; 2=female; other=unknown)
Phenotype
2、test.map
each line of the MAP file describes a single marker and must contain exactly 4 columns:
chromosome (1-22, X, Y or 0 if unplaced)
rs# or snp identifier
Genetic distance (morgans)
Base-pair position (bp units)
-
将整理好的输入文件放入plink工作路径下
-
cmd进入plink工作目录(dir可查看目录信息)
-
在plink目录运行:plink.exe --ped test.ped --map test.map --maf 0.05 --assoc
-
在工作路径可查看结果文件:plink.assoc
整理数据—gwasResults.txt
结果展示:
1、曼哈顿图
2、QQ图:
#install.packages("qqman")
library(qqman)
setwd("D:/Software/R/projects/GWAS")
pdf(file = 'manhattan.pdf', width=15)
rt=read.table("gwasResults.txt",header=T)
manhattan(rt, chr="CHR", bp ="BP", p="P", snp="SNP", col=c("blue4", "orange3"), ylim = c(0, 10),suggestiveline = F, genomewideline = -log10(3e-06))#临界值=0.05/snp数
dev.off()
# `QQplot`
pdf(file = 'QQplot.pdf', width=13)
qq(rt$P)
dev.off()
SNP注释: http://wannovar.usc.edu/