服务热线02152235399
当前位置:博客 > 生物信息

PacBio数据组装软件Sprai的安装及使用说明

时间:2018-10-19    |    阅读量:6798

一、Sprai简介

Sprai (single-pass read accuracy improver) is a tool to correct sequencing errors in single-pass reads for de novo assembly. It is originally designed for correcting sequencing errors in single-molecule DNA sequencing reads, especially in Continuous Long Reads (CLRs) generated by PacBio RS sequencers. The goal of Sprai is not maximizing the accuracy of error-corrected reads; instead, Sprai aims at maximizing the continuity (i.e., N50 contig length) of assembled contigs after error correction.

官网: http://zombie.cb.k.u-tokyo.ac.jp/sprai/README.html#introduction

二、安装方法:

2.1 软件需求

1. python 2.6 or newer

2. BLAST+ 2.2.27 or newer

3. Celera Assembler ver. 8.1 or newer (if you assemble reads after error-correction)

2.2 安装方法:

2.2.1 CA 安装过程:

CA 下载地址: https://sourceforge.net/projects/wgs-assembler/

bzip2 -dc wgs-8.3rc2.tar.bz2 | tar -xf -

cd wgs-8.3rc2

cd kmer

make install

cd ../src

make

cd ../..

2.2.2 安装List-MoreUtils-0.415.tar.gz:

perl Makefile.PL

make

make install

2.2.3 安装 Exporter-Tiny-0.042.tar.gz (注意需要先安装该模块,然后安装下面的Statistics-Descriptive-3.0612.tar.gz模块,才不会出错)

tar -xzvf Exporter-Tiny-0.042.tar.gz

cd Exporter-Tiny-0.042/

perl Makefile.PL

make

make install

2.2.4 安装 Statistics-Descriptive-3.0612.tar.gz

tar -xzvf Statistics-Descriptive-3.0612.tar.gz

cd Statistics-Descriptive-3.0612/

perl Build.PL

./Build

./Build test

./Build install

2.2.5 sprai安装:

spri下载地址:http://zombie.cb.k.u-tokyo.ac.jp/sprai/Download.html

tar -xzvf sprai-0.9.9.17.tar.gz

cd sprai-0.9.9.17/

./waf configure

./waf build

./waf install

三、使用方法

3.1 输入文件要求是subreads in FASTQ格式,如果文件是.bas.h5格式,则需要使用软件bash5tools.py进行格式的转换。PacBio GitHub (pbh5tools) 使用方法:

bash5tools.py --outFilePrefix example_output --readType subreads --outType fastq --minReadScore 0.75 example.bas.h5

如果是多个subreads,则需要将所有的文件合并成一个fastq文件作为输入,注意输入的fastq文件不能为压缩文件。

3.2 创建一个文件夹 mkdir tmp; cd tmp ,并复制sprai路径下的pbasm.specec.spec文件到当前的路径中

3.3 修改配置文件

1ec.spec是软件Sprai的配置文件,根据实际情况修改该配置文件

#>- params -<#input_fastq all.fqestimated_genome_size 50000estimated_depth 100partition 12evalue 1e-50trim 42ca_path /path/to/your/wgs/Linux-amd64/bin/word_size 18

参数说明:

input_fastq is your input file name.

estimated_genome_size is the number of nucleotides of your target. If you do not know it, set large number. For example, set 1e+12.

estimated_depth is the depth of coverage of input_fastq of your target. If you do not know it, set 0.

partition is the number of processors Sprai uses.

evalue is used by blastn.

trim is the number of nucleotides Sprai cut from both sides of alignments.

ca_path is the path to your wgs-assembler (Celera Assembler) installed.

word_size is used by blastn.

2pbasm.spec 是组装软件Celera assembler的配置文件,如果仅做数据的纠错,则不需要这个配置文件。该文件中设置组装过程中所用到的一些参数,包括CPU使用个数等。

3.4 运行方法:

1)数据纠错及组装

ezez_vx1.pl ec.spec pbasm.spec > log.txt 2>&1 &

2)仅做数据纠错

ezez_vx1.pl ec.spec -ec_only > log 2>&1 &

或者

ezez_vx1.pl ec.spec > log 2>&1 &

即可

3)仅做组装

ca_ikki_v5.pl pbasm.spec estimated_genome_size \ -d directory in which fin.idfq.gzs exist \ -ca_path /path/to/your/wgs/Linux-amd64/bin \ -sprai_path the path to get_top_20x_fa.pl installed

3.5 输出文件

1)第一步,数据纠错,输出一个result_yyyymmdd_hhmmss的文件夹,处理后结果文件名称为c01.fin.idfq.gz

2)第二步,组装,输出的config文件为./CA/9-terminator/asm.ctg.fasta

3)组装统计结果,在CA/do_*_c01.fin.top20x.log 文件中

. 软件安装过程中所遇问题

4.1 找不到/usr/bin/time 命令

解决方法:

a. 修改软件中的代码,将/usr/bin/time 修改为time

4.2 软件运行过程中报"set Illegal option -o pipefail"

解决方法:

查看 sh调用的是什么,如果不是/bin/bash,则需要进行第二步的修改

1)$ls -al /bin/sh

2)直接修改 /bin/sh 链接文件,将其指定到 /bin/bash:

$sudo ln -fs /bin/bash /bin/sh