生信科研信息学GWAS学习

用Beagle做基因型填充(Imputation)

2019-07-28  本文已影响42人  TOP生物信息

在学习基因型填充之前需要了解一下什么是Phasing(基因定相、单倍体分型),主要是参考公众号碱基矿工中的一篇文章:人类基因组的Phasing原理是什么。建议多读几遍

Phasing和Imputation
1.Phasing后形成的单倍型参考序列集(Reference panel)是基因型推断(Imputation)必须的数据材料
2.除了Reference Panel的制造需要使用Phasing技术之外,对被研究的对象进行预先Phasing(Pre-phasing)也可以极大地提高基因型推断(Imputation)的准确性

为什么要做这一步

分析过程中不允许有缺失值;可以增加标记密度

怎么做的

基于单倍型,就是上面说的。

图片来源于这篇文献,Marchini, J., & Howie, B. (2010). Genotype imputation for genome-wide association studies. Nature Reviews Genetics, 11(7), 499–511. doi:10.1038/nrg2796
a: 0、2纯合,1杂合,一行表示一个二倍体个体的基因型
d, c: 分别对应前面说的Phasing和Imputation关系的1, 2点
b, f: 说明进行填充之后,增加了标记密度,有助于将显著的SNP挑出来

实战一下,用Beagle做基因型填充

官网:http://faculty.washington.edu/browning/beagle/beagle.html

Beagle包含了利用家系(Related individual Phasing)和LD Phasing的模块, 如果输入的vcf文件是没有phasing的,会先进行定相,然后填充。

下载
链接: http://faculty.washington.edu/browning/beagle/beagle.12Jul19.0df.jar
使用
Windows和Linux下的使用类似,前面已经装好了Java了,这里直接在Windows下面运行。

E:\imputation>java -Xmx894m -jar beagle.03Jul19.b33.jar gt=test.vcf out=test_out ne=281

运行完之后,同时生成结果文件和日志文件, 从日志中可以看出phasing用时比填充用时长

Cumulative Statistics:

Study markers:           3,092

Haplotype phasing time:        38 seconds
Total time:                    48 seconds

参数列表如下,详细解释见:http://faculty.washington.edu/browning/beagle/beagle_5.0_03Jul19.pdf

data parameters ...
  gt=<VCF file: use GT field>                        (optional)
  ref=<bref3 or VCF file with phased genotypes>      (optional)
  out=<output file prefix>                           (required)
  map=<PLINK map file with cM units>                 (optional)
  chrom=<[chrom] or [chrom]:[start]-[end]>           (optional)
  excludesamples=<file with 1 sample ID per line>    (optional)
  excludemarkers=<file with 1 marker ID per line>    (optional)

phasing parameters ...
  burnin=<number of burnin iterations>               (default=6)
  iterations=<number of phasing iterations>          (default=12)
  phase-states=<model states for phasing>            (default=280)
  phase-segment=<min haplotype segment length (cM)>  (default=4.0)

imputation parameters ...
  impute=<impute ungenotyped markers (true/false)>   (default=true)
  imp-states=<model states for imputation>           (default=1600)
  imp-segment=<min haplotype segment length (cM)>    (default=6.0)
  imp-cluster=<max cM in a marker cluster>           (default=0.005)
  imp-ap=<print posterior allele probabilities>      (default=false)
  imp-gp=<print posterior genotype probabilities>    (default=false)

general parameters ...
  ne=<effective population size>                     (default=1000000)
  err=<allele mismatch rate>                         (default=1.0E-4)
  window=<window length in cM>                       (default=40.0)
  overlap=<window overlap in cM>                     (default=4.0)
  seed=<random seed>                                 (default=-99999)
  nthreads=<number of threads>                       (default: machine-dependent)
  step=<IBS step length (cM)>                        (default=0.1)
  nsteps=<number of IBS steps>                       (default=7)

对比一下填充前后的vcf文件

除了缺失的位点被填充以外,基因型的分隔符也变了,变成了竖线|,这是定相之后的一个标志。

联想到以前做重测序的时候,试过几个样本联合call SNP,也在得到的vcf文件中看到过极少数位点基因型用|分隔,这应该就是利用群体内部样本之间的LD关系得到的部分phasing结果。

上一篇 下一篇

猜你喜欢

热点阅读