GWAS群体遗传学

10.GWAS:LD decay(LD衰减)—— PopLDde

2022-02-13  本文已影响0人  Wei_Sun

关于连锁不平衡的详细介绍在之前的帖子里有说过,这里就不再赘述,本篇主要介绍LD decay的计算。
1.GWAS:原理与目的 - 简书 (jianshu.com)

LD衰减(LD decay):指位点之间由连锁不平衡到连锁平衡的演变过程,能够很好的反映连锁不平衡程度。

PopLDdecay是一款基于VCF文件,快速、高效计算连锁不平衡的工具。


流程图

相比于 PLINK 和 Haploview,PopLDdecay 的优点如下:

论文:
https://academic.oup.com/bioinformatics/article/35/10/1786/5132693

1.下载安装

1.1 下载地址

官网:https://github.com/BGI-shenzhen/PopLDdecay
论文:https://academic.oup.com/bioinformatics/article/35/10/1786/5132693

1.2 安装

$ git clone https://github.com/BGI-shenzhen/PopLDdecay.git 
$ cd your/path/PopLDdecay
$ chmod 755 configure
$ ./configure
$ make
$ mv PopLDdecay ./bin/

运行

$ PopLDdecay

2. 计算LD decay

2.1 vcf格式

$ PopLDdecay -InVCF  ~/vcftools_0.1.13/bin/root.id.vcf  -OutStat LDdecay

-InVCF:输入vcf文件路径及文件名
-OutStat:输出压缩文件前缀

输出文件中为LD衰减的计算结果,包括平均R2,平均D'等。


LDdecay.stat.gz

2.2 plink格式(.ped和.map)

$ perl mis/plink2genotype.pl -inPED ~/plink1.9/root12.ped -inMAP ~/sunwei/plink1.9/root12.map  -outGenotype out.genotype

-inPED:输入.ped文件路径及文件名
-inMAP:输入.map文件路径及文件名
-outGenotype:输出基因型结果,及文件名前缀


out.genotype

2.3 计算亚群的LD decay(.vcf)

准备亚群的名称清单GroupA_sample.list。

$ PopLDdecay -InVCF  ~/vcftools_0.1.13/bin/root.id.vcf -OutStat SubA_LDdecay -SubPop GroupA_sample.list

2.4 计算EHH(.vcf)

EHH (Extended Haplotype Homozygosity) : is a statistical method used to identify locations in the genome where natural selection has been occurring. EHH examines the relative occurrence haplotypes upstream and downstream of a given locus and gives a score indicating the relative similarity of uniqueness of the haplotypes of a given length.

$ PopLDdecay -InVCF  ~/vcftools_0.1.13/bin/root.id.vcf -OutStat EHH.stat.gz -EHH chr1:5154

-EHH:关注某一个SNP位点的衰减情况

3. 绘制LD decay图

软件自带一个perl的脚本,直接调用就可以,但是绘图依赖于R,需要保证环境中已经添加好R。

将上一步计算得到的LD decay结果导入,进行衰减图绘制。

3.1 全局LD decay图

$ perl  Plot_OnePop.pl  -inFile  LDdecay.stat.gz  -output  Fig

结果生成一个pdf文件,一个png文件,以及绘图用到的bin文件。


Lu, et al, 2018

3.2 多亚群LD decay图

例如一个vcf文件中,个体分为两个亚群,现在想计算两个亚群各自的LD decay,首先需要准备两个sample.list,每个list中包含一个亚群的sample ID,分别命名为subA.list和subB.list。

sample.list格式为sample ID,用空格隔开:

$ vim subA.list
  1 2 3 4 5 6 7 8 9 10
$ vim subB.list
  12 13 14 15 17 19 21 22 23 24

之后分别计算两个亚群的的LD decay:

$ PopLDdecay -InVCF  ~/vcftools_0.1.13/bin/root.id.vcf  -OutStat subA_LDdecay  -SubPop subA.list

$ PopLDdecay -InVCF  ~/vcftools_0.1.13/bin/root.id.vcf  -OutStat subB_LDdecay  -SubPop subB.list

创建一个Pop.list,包含两列,第一列为LD decay文件的路径,第二列为亚群的图例。

$ vim Pop.list
your/path/subA_LDdecay.stat.gz subA
your/path/subB_LDdecay.stat.gz subB

绘制多亚群的LD decay图:

$ perl Plot_MultiPop.pl  -inList  Pop.list  -output sub_Fig
Xu et al, 2011

参考资料:
https://mp.weixin.qq.com/s/5z28_7PGdkNuMJc8l6PFjQ

引用转载请注明出处,如有错误敬请指出。

上一篇 下一篇

猜你喜欢

热点阅读