RTG-tools的安装与子工具vcfeval的使用

RTG-tools是处理基因组数据常用的一个工具集,其中的vcfeval工具用于比对vcf标准集和普通vcf文件,找到普通vcf文件中真阳性、假阳性、假阴性的变异位点。

RTG-tools的安装:

支持:

java 1.8以上
ant 1.9以上
如果没有这两个东西或者版本过低,RTG-tools会无法安装。通过以下命令行检查两个工具版本情况:
$ java -version
$ ant -version
java可从官网下载Linux的安装包,解压之后,添加环境变量到/etc/profile文件,添加完成后,更新文件:
$ source /etc/profile
ant安装可直接在命令行输入
$ sudo apt-get install ant

下载RTG-tools:

$ git clone https://github.com/RealTimeGenomics/rtg-tools.git
$ cd rtg-tools
或者可以直接从 https://github.com/RealTimeGenomics/rtg-tools中下载RTG-tools,下载完后进入rtg-tools文件夹。

测试和生成执行文件:

$ ant runalltests
$ ant zip-nojre
第一行是测试,如果报错:“JAVA_HOME does not point to the JDK”,可能是安装JAVA时,添加环境变量后没有更新。具体原因参见: https://stackoverflow.com/questions/11245865/java-home-does-not-point-to-the-jdk
第二行会在dist目录下生成zip格式的安装包。

安装:

$ cd /my/install/
$ unzip /path/to/rtg-tools/dist/rtg-tools-VERSION-nojre.zip
将上一步生成的zip文件解压,就可以使用了。

使用:

$ cd /my/install/rtg-tools-VERSION/
$ ./rtg --help
进入解压后的目录,其中有一个可执行文件rtg,它就是我们要使用的工具,输入 --help即可看到它的用法及子工具。

子工具vcfeval的使用:

$ ./rtg vcfeval --help
Usage: rtg vcfeval [OPTION]... -b FILE -c FILE -o DIR -t SDF

Evaluates called variants for genotype agreement with a baseline variant set irrespective of representational differences. Outputs a weighted
ROC file which can be viewed with rtg rocplot and VCF files containing false positives (called variants not matched in the baseline), false
negatives (baseline variants not matched in the call set), and true positives (variants that match between the baseline and calls).

File Input/Output
  -b, --baseline=FILE           VCF file containing baseline variants
      --bed-regions=FILE        if set, only read VCF records that overlap the ranges contained in the specified BED file
  -c, --calls=FILE              VCF file containing called variants
  -e, --evaluation-regions=FILE if set, evaluate within regions contained in the supplied BED file, allowing transborder matches. To be used
                                for truth-set high-confidence regions or other regions of interest where region boundary effects should be
                                minimized
  -o, --output=DIR              directory for output
      --region=STRING           if set, only read VCF records within the specified range. The format is one of <sequence_name>,
                                <sequence_name>:start-end or <sequence_name>:start+length
  -t, --template=SDF            SDF of the reference genome the variants are called against
vcfeval需要四个参数:
"-b baseline":vcf标准集,格式为.vcf.gz文件
"-c calls":自己的vcf文件,格式为.vcf.gz文件
"-o output_dir":输出结果的文件夹,需指定一个不存在的文件夹
"-t SDF":vcf文件所在区域的参考基因组文件,是SDF格式,它是对参考基因组做了一些预处理后产生的文件夹。如果是.fa格式的参考基因组文件,可以用rtg-tools自带的格式转化工具进行转化。
使用实例:
$ ./rtg format -o hg19.sdf hg19.fa
$ ./rtg vcfeval -b baseline.hc.vcf.gz -c calls.hc.vcf.gz -o output -t hg19.sdf
运行时间约9分钟,跑完之后,在output文件夹中可以找到calls.hc.vcf.gz文件的真阳性位点文件,假阳性位点文件,假阴性位点文件(都是vcf.gz格式)。还有三个用于画ROC曲线的文件。之后可以用rtg中的rocplot工具画出ROC曲线,调用形式:
$ ./rtg rocplot file1 file2
其中的文件都是在vcfeval工具跑完后产生的文件,可以一次画多条曲线。
以上所有都是RTG-tools工具README或者help中的内容,在此只是简单记录。











  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值