加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

[转载]plink进行GWAS分析

(2017-05-16 11:54:04)
标签:

转载

原文地址:plink进行GWAS分析作者:Ochi
plink 1.9 可以接受vcf文件

https://www.cog-genomics.org/plink2/

加上recode参数 可以转为ped, map等文件, 如果不加recode , 使用make-bed 可以转为二进制bed文件

../plink --vcf test_SNP.vcf --geno 0.1 --hwe 0.0001 --make-bed  --out  Specie_Geno

./plink --vcf New_snp.vcf --allow-no-sex --maf 0.05 --recode --out MySpe_Hap
The MAP file must therefore contain as many markers as are in the PED file. The markers in the PED file do not need to be in genomic order: (i.e. the order MAP file should align with the order of the PED file markers).   MAP 文件中的SNP位点顺序必须与PED文件中基因型位点次序一致, 一般情况向MAP文件中第二列是rs8789.. 等SNP位点ID,若没有就会是“.”, 后面做连锁不平衡分析的时候必须要有ID

表型默认缺省值为NA, 可以自己设定

plink --file mydata --missing-phenotype 99
也可以使用外部phenotype 文件, phenotype文件中 Individual 的次序必须与ped中个体名称次序一致

The order of the alternate phenotype file need not be the same as for the original file. If the phenotype file contains more than one phenotype, then use the --mpheno N option to specify the Nth phenotype is the one to be used:

plink --file mydata --pheno pheno2.txt --mpheno 4

phenotype如果有header,那么文件的前两列header名称必须是FID和IID

参考:http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml

GWAS 分析方法

../plink --file my_Hap --pheno pheno.txt --pheno-name ABC --allow-no-sex --assoc --adjust --out GWAS_result
 plink --allow-no-sex --bfile Specie_Geno --covar Cov_data.tab.txt --covar-name sex,age --linear --hide-covar --out GWAS_res --pheno pheno_tab.txt --pheno-name ABC
后续如果要做 连锁不平衡分析

../plink --file my_Hap --clump GWAS_result.qassoc --clump-verbose --out LD_res
 
参考:
https://www.cog-genomics.org/plink2/postproc#clump


对 LD结果进行验证

../plink -bfile ZJ_Geno --r2 --out LD_res

../plink -bfile ZJ_Geno --r2 --ld-window-r2 0.5 --ld-window 5 --ld-window-kb 10 --out LD_res_window10


参考:

https://www.cog-genomics.org/plink2/assoc

 https://github.com/JoniColeman/gwas_scripts

如果用vcftools 计算遗传距离

./vcftools --vcf vcf_file.vcf --weir-fst-pop individuals_A.txt --weir-fst-pop individuals_B.txt 

可用参数是
--fst-window-size
--fst-window-step

参考:
https://vcftools.github.io/man_latest.html

还有一个R 包可以进行GWAS分析 ,绘制曼哈顿图

Postgwas: Advanced GWAS Interpretation in R

http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0071775




0

  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有