Skip to content

Compiling Velvet

Velvet is an algorithm package that has been designed to deal with de novo genome assembly and short read sequencing alignments.[1][2]

Installed Version

A locally compiled version is installed, available as a module:

velvet/1.2.10

Running Velvet

Multithreading

Velvet is multithreaded. Request the "shm" PE with some number of slots:

#$ -pe shm 16

Use the environment variables OMP_NUM_THREADS and OMP_THREAD_LIMIT to control the number of threads, making sure velvetg or velveth do not try to run more threads than the number of requested slots. See official documentation for details.

export OMP_NUM_THREADS=${NSLOTS}

Documentation

The PDF manual is available (after the module is loaded):

${VELVETDIR}/doc/Manual.pdf

Velvet Optimiser

Velvet Optimiser is available from:

http://bioinformatics.net.au/software.velvetoptimiser.shtml

It should be available when you load the velvet/1.2.10 module.

If you wish to install your own version: after downloading and expanding the tar.gz file, modify the script VelvetOptimiser.pl. Change the very first line to:

#!/usr/bin/env perl

This ensures that the appropriate version of Perl is used, rather than the default system version (which does not have BioPerl).

Compiling Velvet

Download

Download the code by cloning the git repository,[3] which contains the current maintained version:

[juser@proteusa01 src]$ git clonehttps://github.com/dzerbino/velvet.git

This creates the directory velvet

Read the instructions in the manual (PDF) -- there are various options including building "colorspace velvet", categories, etc:

http://www.ebi.ac.uk/~zerbino/velvet/Manual.pdf

Environment

Modules to be loaded:

gcc/4.8.1 zlib/cloudflare/gcc/1.2.8

Modify Makefile

Modify these two lines:

OPT = -O3 -march=corei7-avx

CFLAGS = -Wall -m64

Compile

Then,

[juser@proteusa01 velvet-1.2.10]$ make OPENMP=1 MAXKMERLENGTH=127

Test

Do

[juser@proteusa01]$ make OPENMP=1 MAXKMERLENGTH=127 test ... [Wed Apr 11 11:59:55 AM 2018] Running Velvet Test Suite [Wed Apr 11 11:59:55 AM 2018] Found ../velveth, ok [Wed Apr 11 11:59:55 AM 2018] Found ../velvetg, ok [Wed Apr 11 11:59:55 AM 2018] Found Sequences.31, ok [Wed Apr 11 11:59:55 AM 2018] Found Roadmaps.31, ok [Wed Apr 11 11:59:55 AM 2018] Found read1.fq.gz, ok [Wed Apr 11 11:59:55 AM 2018] Found read2.fq.gz, ok [Wed Apr 11 11:59:55 AM 2018] Found reads.fq.gz, ok [Wed Apr 11 11:59:55 AM 2018] Found read1.fa.gz, ok [Wed Apr 11 11:59:55 AM 2018] Found read2.fa.gz, ok [Wed Apr 11 11:59:55 AM 2018] Found reads.fa.gz, ok [Wed Apr 11 11:59:55 AM 2018] making test folder: velvet.test.WjraxN [Wed Apr 11 11:59:55 AM 2018] running test 1 of 5: fasta_eq_fastq_ascii.t [Wed Apr 11 11:59:59 AM 2018] ok [Wed Apr 11 11:59:59 AM 2018] ok [Wed Apr 11 11:59:59 AM 2018] ok [Wed Apr 11 11:59:59 AM 2018] ok [Wed Apr 11 11:59:59 AM 2018] passed test 1 [Wed Apr 11 11:59:59 AM 2018] running test 2 of 5: fasta_eq_fastq_binary.t [Wed Apr 11 12:00:04 PM 2018] ok [Wed Apr 11 12:00:04 PM 2018] ok [Wed Apr 11 12:00:04 PM 2018] passed test 2 [Wed Apr 11 12:00:04 PM 2018] running test 3 of 5: fmt_auto_mode.t [Wed Apr 11 12:00:08 PM 2018] ok [Wed Apr 11 12:00:08 PM 2018] ok [Wed Apr 11 12:00:08 PM 2018] passed test 3 [Wed Apr 11 12:00:08 PM 2018] running test 4 of 5: interleaved_eq_separate.t [Wed Apr 11 12:00:16 PM 2018] ok [Wed Apr 11 12:00:16 PM 2018] ok [Wed Apr 11 12:00:16 PM 2018] passed test 4 [Wed Apr 11 12:00:16 PM 2018] running test 5 of 5: mismatched_separates.t [Wed Apr 11 12:00:16 PM 2018] ok [Wed Apr 11 12:00:16 PM 2018] ok [Wed Apr 11 12:00:16 PM 2018] passed test 5 [Wed Apr 11 12:00:16 PM 2018] removing test folder: velvet.test.WjraxN [Wed Apr 11 12:00:16 PM 2018] passed all 5 tests [Wed Apr 11 12:00:16 PM 2018] hooray!

References

[1] Velvet official website

[2] Wikipedia article on Velvet assembler

[3] Velvet git repository