velvet使用介绍

24,158

新一代测序技术组装拼接软件velvet使用简介
目前用于新一代的测序的主要仪器有Illumina/Solexa的Genome Analyzer、ABI的Solid和Roche的454,它们都能高通量的测序,产生大量的测序结果,接下来就要对序列进行拼接,用于拼接的软件也有很多,比如velvet、soapdenovo、abyss等,454的还有专门的newbler。平时用velvet比较多,就简单介绍一下。
velvet对短序列的拼接效果比较好,所以多用于对Illumina等产生的短序列片段进行组装拼接。下面以Illumina的GAII产生的结果为例进行说明。
一、单端测序
单端测序可以直接对fastq格式的原始文件进行处理,首先是用velveth命令建立hash表子集
在shell里面输入velveth会出来使用方法信息:

Compilation settings:
CATEGORIES = 57
MAXKMERLENGTH = 127
OPENMP
LONGSEQUENCES
BIGASSEMBLY

Usage:
./velveth directory hash_length {[-file_format][-read_type] filename1 [filename2 ...]} {...} [options]

directory : directory name for output files
hash_length : EITHER an odd integer (if even, it will be decremented) : OR: m,M,s where m and M are odd integers (if not, they will be decremented) with m < M and s is a step (even number). Velvet will then hash from k=m to k=M with a step of s
filename : path to sequence file or - for standard input

File format options:
-fasta -fastq -raw -fasta.gz -fastq.gz -raw.gz -sam -bam

Read type options:
-short -shortPaired
...
-short56 -shortPaired56
-short57 -shortPaired57
-long -longPaired

Options:
-strand_specific : for strand specific transcriptome sequencing data (default: off)
-reuse_Sequences : reuse Sequences file (or link) already in directory (no need to provide original filenames in this case (default: off)
-noHash : simply prepare Sequences file, do not hash reads or prepare Roadmaps file (default: off)

Synopsis:

- Short single end reads:
velveth Assem 29 -short -fastq s_1_sequence.txt

- Paired-end short reads (remember to interleave paired reads):
velveth Assem 31 -shortPaired -fasta interleaved.fna

- Two channels and some long reads:
velveth Assem 43 -short -fastq unmapped.fna -longPaired -fasta SangerReads.fasta

- Three channels:
velveth Assem 35 -shortPaired -fasta pe_lib1.fasta -shortPaired2 pe_lib2.fasta -short3 se_lib1.fa

Output:
directory/Roadmaps
directory/Sequences
[Both files are picked up by graph, so please leave them there]

这一步主要是要确定使用的hash值,hash值必须为奇数,且小于MAXKMERLENGTH,这个值默认为31,但是在安装的时候可以调整。
具体的命令可以是:
velveth result 29 -fastq -short sequence.fastq
建立hash子集后用velvetg命令进行组装,在shell里面输入velvetg 也会显示使用方法信息:

Compilation settings:
CATEGORIES = 57
MAXKMERLENGTH = 127
OPENMP
LONGSEQUENCES
BIGASSEMBLY

Usage:
./velvetg directory [options]

directory : working directory name

Standard options:
-cov_cutoff : removal of low coverage nodes AFTER tour bus or allow the system to infer it
(default: no removal)
-ins_length : expected distance between two paired end reads (default: no read pairing)
-read_trkg : tracking of short read positions in assembly (default: no tracking)
-min_contig_lgth : minimum contig length exported to contigs.fa file (default: hash length * 2)
-amos_file : export assembly to AMOS file (default: no export)
-exp_cov : expected coverage of unique regions or allow the system to infer it
(default: no long or paired-end read resolution)
-long_cov_cutoff : removal of nodes with low long-read coverage AFTER tour bus
(default: no removal)

Advanced options:
-ins_length2 : expected distance between two paired-end reads in the second short-read dataset (default: no read pairing)
-ins_length_long : expected distance between two long paired-end reads (default: no read pairing)
-ins_length*_sd : est. standard deviation of respective dataset (default: 10% of corresponding length)
[replace '*' by nothing, '2' or '_long' as necessary]
-scaffolding : scaffolding of contigs used paired end information (default: on)
-max_branch_length : maximum length in base pair of bubble (default: 100)
-max_divergence : maximum divergence rate between two branches in a bubble (default: 0.2)
-max_gap_count : maximum number of gaps allowed in the alignment of the two branches of a bubble (default: 3)
-min_pair_count : minimum number of paired end connections to justify the scaffolding of two long contigs (default: 5)
-max_coverage : removal of high coverage nodes AFTER tour bus (default: no removal)
-long_mult_cutoff : minimum number of long reads required to merge contigs (default: 2)
-unused_reads : export unused reads in UnusedReads.fa file (default: no)
-alignments : export a summary of contig alignment to the reference sequences (default: no)
-exportFiltered : export the long nodes which were eliminated by the coverage filters (default: no)
-clean : remove all the intermediary files which are useless for recalculation (default : no)
-very_clean : remove all the intermediary files (no recalculation possible) (default: no)
-paired_exp_fraction : remove all the paired end connections which less than the specified fraction of the expected count (default: 0.1)
-shortMatePaired* : for mate-pair libraries, indicate that the library might be contaminated with paired-end reads (default no)

Output:
directory/contigs.fa : fasta file of contigs longer than twice hash length
directory/stats.txt : stats file (tab-spaced) useful for determining appropriate coverage cutoff
directory/LastGraph : special formatted file with all the information on the final graph
directory/velvet_asm.afg : (if requested) AMOS compatible assembly file

这里主要用到的参数是-cov_cutoff(覆盖度)这个参数,其他都可不加,其实覆盖度参数也可以省略,但是最好还是加上,增加可靠性。还有-exp_cov这个参数加上后会对重复区域进行处理,也最好加上,后面的数值用auto就可以了。其他的一些参数就根据你自己的喜好来设置。具体的命令可以是:
velvetg result -cov_cutoff 30 -exp_cov auto -min_contig_lgth 100
最后根据出来的n50和max contig长度来判断拼接的效果,为了达到最好的拼接效果,一般要对hash值和覆盖度进行一系列的设置来进行比较。

二、双向测序

双端测序与单端测序相比在运行velveth时将-short参数改为-shortPaired,其他一样。
在运行velvetg时可加入-ins_length 和-ins_length_sd 参数提高拼接的准确性。具体命令可以是:
velvetg result -cov_cutoff 30 -ins_length 300 -ins_length_sd 100 -exp_cov auto -min_contig_lgth 100
其实运行这几个命令很简单,最重要的还是根据你的测序数据选择合适的参数。

评论  2  访客  2
    • icefoxx 1

      非常感谢这里的share氛围,不过,soap是用于比对的,maq也是。soapdenovo才是用于拼接的。。

      • shashu877 1

        留言是种美德,写点什么… :razz: 很好的分享,学习了,最近正在用这个软件组装

      发表评论

      匿名网友