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

Tim Booth tbooth at ceh.ac.uk
Wed Apr 8 06:49:10 EDT 2015


Hi,

I think the quick answer is - you are probably running ZSH so edit
~/.zshrc and add the PATH setting there.  The actual syntax for variable
assignment in ZSH is the same as for BASH.

Regarding paths for programs in general, this is a fairly fundamental
question regarding modern Linux systems but I actually don't know
anywhere that it is spelled out clearly and simply, so I'll give you my
own summary:

      * Everything under /usr/ belongs to the package manager and you
        should only modify it by adding or removing packages (eg. with
        apt-get or the update manager)
      * The exception is /usr/local which belongs to you (as the system
        administrator) and overrides /usr.  For example if you place a
        modified version of velvet in /usr/local/bin and then run
        "velvet" your own modified version will be called.  This would
        also apply to the VelvetOptimiser.
      * A regular user (without sudo) can have a personal bin/ directory
        in their home directory and any executables in there will be
        added to the path automatically.  But this does not
        override /usr/bin or /usr/local/bin, so you need to either give
        the executable a new name, like "velvet303" or else run it
        explicitly by typing "~/bin/velvet" or else add $HOME/bin at the
        start of your PATH.
      * The default shell in Bio-Linux is ZSH so you need to edit .zshrc
        to modify local behaviour and you can either modify the path or
        add aliases - eg.:
              * export PATH="$HOME/bin:$PATH" #(gives priority to
                programs in ~/bin)
              * alias velvet="~/mydir/velvet" #(overrides velvet but
                won't affect VelvetOptimiser as aliases aren't exported
                from the shell)

I hope that makes sense.

Cheers,

TIM


On Tue, 2015-04-07 at 16:51 +0100, Zain A Alvi wrote:
> Dear Sir or Madam,
> 
> 
> 
> I hope this reaches you well. I am trying to add the Velvet (a custom
> version with Kmer value of 303, and another version that Velvet that
> was made up to 191) and VelvetOptimiser to path. In my findings with
> BioLinux 8's documentation, I found Velvet was pre-installed with
> BioLinux, which is great and useful. Unfortunately, the Kmer value is
> too low for our needs.
> 
> 
> I was wondering where exactly is the file to edit the path to this
> tool. I have tried export PATH=/dir/:$PATH , but I rather know where
> exactly is the file is located to edit.  I have taken a look into
> $HOME/.bashrc (or ~/.bashrc) via gedit to no avail as well.
> 
> 
> 
> Also I found the tools (Velvet and more tools) to be found
> in /usr/bin/ folder but they can't be replaced and they are found
> repeatedly in the X11 folders within them as well.
> 
> 
> I was wondering if you could kindly help in finding on correct folder
> and adding files to $PATH to alleviate this situation and have my
> higher kmer version of Velvet be used by VelvetOptimiser. 
> 
> 
> 
> Sincerely,
> 
> 
> Zain Alvi
> 
> 
> ---
> 
> zain.alvi at student.shu.edu
> 
> Ph. D. Candidate in Molecular Bioscience
> 
> Seton Hall University
> 
> Ph: (973) 710-7149
> 
> 
> 
> 

-- 
Tim Booth <tbooth at ceh.ac.uk>
NERC Environmental Bioinformatics Centre 

Centre for Ecology and Hydrology
Maclean Bldg, Benson Lane
Crowmarsh Gifford
Wallingford, England
OX10 8BB 

http://environmentalomics.org/bio-linux
+44 1491 69 2297




More information about the Bio-linux-list mailing list