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

Zain A Alvi zain.alvi at student.shu.edu
Sun Apr 12 16:49:43 EDT 2015


Hi Tim and Tony,

Thank you Tim and Tony for bearing with me. I really appreciate the detailed explanation on how Velveth/g and VelvetOptimiser seeks Velvet through the PATHs. 

I finally understand your points about looking into path order and on how to add those into ~/.zshrc for new apps.  I apologize for all the trouble. 

On a side note.  I had to sudo cp -ai velvetg velveth /usr/local/bin as I was receiving Permission Errors.  Is this normal even when I am admin and not root in Bio-Linux/Ubunut?  I know to access root you have to go through sudo su and it should be rarely used.

If I ever want to add other applications, I would then continue adding/copying them into /usr/local/bin and adding the paths to ~/.zshrc 

Is there any way to change the order for $PATH? 

For example if I do something like: 

> echo $PATH

It would return:

>/usr/local/bin before usr/bin and then any other $PATH that I might add in ~/.zshrc.

What if I wanted to create separate location to store the installed applications. How would I force biolinux to go there before going to /usr/local/bin or usr/bin? 

I know we can always add locations at the end? What do we have to do to add locations in the beginning for the $PATH.  The main concern is that we only about 5 GB free on the partition has BioLinux installed. Whereas we have about 3.8 TB free (800 GB - SSD and 3 TB - 3.5" Hard Drive).

Thank you again for all the help. I sincerely appreciate it. 

Kind regards,

Zain 



________________________________________
From: Tony Travis <tony.travis at minke-informatics.co.uk>
Sent: Thursday, April 9, 2015 5:27 AM
To: bio-linux at nebclists.nerc.ac.uk
Subject: Re: [Bio-Linux] BioLinux 8 question - Adding and removing Paths - Velvet - correction

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
_______________________________________________
Bio-Linux mailing list
Bio-Linux at nebclists.nerc.ac.uk
http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux



More information about the Bio-linux-list mailing list