[Bio-Linux] BioLinux 8 question - Adding and removing Paths - Velvet - correction

Tony Travis tony.travis at minke-informatics.co.uk
Thu Apr 9 05:27:49 EDT 2015


On 09/04/15 00:42, Zain A Alvi wrote:
> Hi Tim and Tony,
> 
> I hope everything is well. I just had an idea for a temporary
> solution, would going into root via terminal and then re-downloading
> and re-compiling velvet with the higher Kmer value in the usr/bin
> folder.  Do you think that this would make VelvetOptimiser to work
> properly with the higher compiled Velvet?
> 
> But my main question would be, how are we able to keep the older
> version in usr/bin and force VelvetOptimiser to use the newly
> compiled version of the software in some other location.

Hi, Zain.

As Tim said, you need to understand how the shell finds commands using
the PATH. Here is a quick summary of how to compile and install a custom
version of Velvet in /usr/local/bin:

> wget http://www.ebi.ac.uk/~zerbino/velvet/velvet_latest.tgz
> tar xzf velvet_latest.tgz
> cd velvet_1.2.10/
> make velveth velvetg MAXKMERLENGTH=191
> cp -ai velvetg velveth /usr/local/bin

Check your PATH contains "/usr/local/bin" and it is before /usr/bin:

> printenv PATH
> /usr/local/hyb-master/bin:/home/ajt/bin:/usr/local/hyb-master/bin:/home/ajt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/cd-hit:/usr/lib/cd-hit

Check which version of "velvet[hg]" the shell finds:

> which -a velveth
> /usr/local/bin/velveth
> /usr/bin/velveth

> which -a velvetg
> /usr/local/bin/velvetg
> /usr/bin/velvetg

Test e.g. velveth

> velveth
> velveth - simple hashing program
> Version 1.2.10
> 
> Copyright 2007, 2008 Daniel Zerbino (zerbino at ebi.ac.uk)
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Compilation settings:
> CATEGORIES = 2
> MAXKMERLENGTH = 191
> 

Look in VelvetOpt/[gh]wrap.pm to see how "VelvetOptimiser" calls the
"velveth" and "velvetg" binaries:

> VelvetOptimiser-2.2.5$ ls VelvetOpt
> Assembly.pm  gwrap.pm  hwrap.pm  Utils.pm

It just uses the first "velveth" and "velvetg" it finds on the PATH.

HTH,

  Tony.

-- 
Minke Informatics Limited, Registered in Scotland - Company No. SC419028
Registered Office: 3 Donview, Bridge of Alford, AB33 8QJ, Scotland (UK)
tel. +44(0)19755 63548                    http://minke-informatics.co.uk
mob. +44(0)7985 078324        mailto:tony.travis at minke-informatics.co.uk



More information about the Bio-linux-list mailing list