shapeit提取或去除指定SNP和样本(shapeit extract or exclude SNP, sample)

shapeit最大的功能是对双链DNA进行phase和基因型进行impute。除此之外,还能提取SNP和样本,同样的,也能去除SNP和样本。下面简单介绍这两个功能。

一、提取SNP

提取SNP用到“--include-snp”参数,具体命令为:

time shapeit 

 -convert 

        --input-haps data.phased 

        --output-haps data.phased.subset 

        --include-snp include_marker.site

  

其中,include_marker.site为我们需要提取的SNP位点的位置,其格式如下:

20158887

21111456

45612378

每一个位点一行

 

二、去除SNP

去除SNP用到“--exclude-snp”参数,具体命令为:

time shapeit 

 -convert 

        --input-haps data.phased 

        --output-haps data.phased.subset 

        --exclude-snp exclude_marker.site

  

其中,exclude_marker.site为我们需要去除的SNP位点的位置,其格式如下:

20158887

21111456

45612378

每一个位点一行

 

三、提取样本

提取样本用到的参数为“--include-ind”,具体命令为:

time shapeit 

 -convert 

        --input-haps data.phased 

        --output-haps data.phased.subset 

        --include-snp include_ind.ind

  

include_ind.ind的文件为我们需要提取的样本ID,一个样本一行,如下:

NA12056

NA25034

NA75213

 

四、去除样本

去除样本用到的参数为“--exclude-ind”,具体命令为:

time shapeit 

 -convert 

        --input-haps data.phased 

        --output-haps data.phased.subset 

        --exclude-snp exclude_ind.ind

  


exclude_ind.ind的文件为我们需要去除样本的ID,一个样本一行,如下:

NA12056

NA25034

NA75213

 

参考链接:

1、https://mathgen.stats.ox.ac.uk/genetics_software/shapeit/shapeit.html#input

2、https://jmarchini.org/shapeit-3-usage/

原文地址:https://www.cnblogs.com/chenwenyan/p/10283703.html