什么是VCFtools

簡(jiǎn)介

VCFtools是一種可以對(duì)VCF文件和BCF文件進(jìn)行格式轉(zhuǎn)換及過濾的工具,其中很多過濾及計(jì)算功能可以自己使用perl或者python編寫腳本實(shí)現(xiàn),但都不如這個(gè)工具的運(yùn)算速度快。

配置流程

1.配置編譯環(huán)境

安裝相關(guān)依賴。

yum install autoconf dh-autoreconf automake zlib-devel

2.獲取源碼

獲取“vcftools-0.1.16”源碼包。

cd/usr/local/src
wget https://github.com/vcftools/vcftools/archive/v0.1.16.tar.gz-O vcftools-0.1.16.tar.gz

3.編譯和安裝

1)解壓并進(jìn)入源碼目錄。

tar-zxvf vcftools-0.1.16.tar.gz
cd vcftools-0.1.16

2)生成configure文件。

.

/autogen.sh

3)配置生成Makefile。

./configure-prefix=/usr/local/vcftools

4)編譯安裝。

make-j4
make install

5)配置環(huán)境。

a.修改環(huán)境變量。

vim/etc/profile

在“/etc/profile”文件末尾增加下面代碼:

export PATH=/usr/local/vcftools/bin:$PATH

b.按“Ecs”,輸入“wq!”保存后退出。

c.運(yùn)行下面命令,使修改的環(huán)境變量生效。

source/etc/profile

4.運(yùn)行和驗(yàn)證

1)查看版本。

查看VCFtools版本信息。

vcftools--version

當(dāng)系統(tǒng)回顯類似如下信息是,表示VCFtools安裝成功。

VCFtools(0.1.16)

2)測(cè)試數(shù)據(jù)。

test目錄下有很多例子,通過輸入如下命令,進(jìn)行測(cè)試。

cd/usr/local/src/vcftools-0.1.16/examples
vcftools--vcf shuffle-test.vcf--missing-site--out ms

當(dāng)系統(tǒng)回顯類似如下信息是,表示VCFtools能夠正常使用。

VCFtools(0.1.16)
(C)Adam Autom and Anthony Marchetta 2009
Parameters as interpreted:
--vcf shuffle-test.vcf
--out ms
--missing-site
After filtering,kept 2 out of 2 Individuals
Outputting Site Missingness
After filtering,kept 6 out of a possible 6 Sites
Run Time=0.00 seconds