Installing+Programs

flat

=Using Package Managers= When installing programs it is sometimes easiest to start off by checking if the programs you are interested in are available through your package manager. You can use **Mac Ports** if you are using a Mac or **Apt** if you are using a Debian Linux distribution. You will need sudo privileges to install programs using a package manager. code format="bash" port search bowtie bowtie @0.12.7 (science, biology) an ultrafast, memory-efficient short read aligner sudo port install bowtie code code format="bash" apt-cache search bowtie bowtie - ultrafast memory-efficient short read aligner bowtie-examples - Examples for bowtie, the ultrafast memory-efficient short read aligner fastx-toolkit - FASTQ/A short nucleotide reads pre-processing tools sudo apt-get install bowtie code =Installing Programs Manually= If you don't have sudo privileges (see section bellow for more options in this case) or don't find the program or version of the program you are interested in using a package manager you will have to install the program manually. The first thing you need to do is download the program, see the section on wget on the **working on remote machines** page if you need to download the program to a remote machine. Note: if you are downloading a file from sourceforge you will need to use some trickery with wget. code format="bash" wget "http://sourceforge.net/projects/bowtie-bio/files/bowtie/0.12.7/bowtie-0.12.7-linux-x86_64.zip/download" -O bowtie-0.12.7-linux-x86_64.zip code After downloading the program **start by looking at the README** for the installation specifications. Most programs can be installed with some variation of the following sequence of commands: code format="bash" cd /install/directory ./configure make make test sudo make install code =Install Locally Use Globally= Sometimes you will not be able to use make install to create a globally available program and will have to use an absolute path whenever you need to execute the program (for instance this will happen if you don't have sudo privlages). There are several ways to make a locally installed program globally available.
 * 1) Search for bowtie using mac ports
 * 1) Install bowtie using mac ports
 * 1) Search for bowtie using apt
 * 1) Install bowtie using apt
 * 1) Downloading bowtie from sourceforge. Use the -O flag to specify the name to download the file as.
 * 1) Move to the install directory
 * 1) Execute the configuration script to create the make file
 * 1) Install the program
 * 1) Test the installed program
 * 1) Make the program globally available

With sudo:
All programs in your bin will be globally available. After locally installing a program you can symbolically link that program to your bin using the ln command with the -s flag. code format="bash" sudo ln -s /home/ngs_programs/bowtie-0.12.7/bowtie /bin/bowtie code Now you should be able to use bowtie from any directory by issuing the command bowtie.
 * 1) Create a symbolic link from bowtie in a local installation directory to the bin.
 * 2) Be sure to use the absolute path to the installed program.

Without sudo:
Without sudo privileges you can add a directory that belongs to you to your PATH and use this directory just like the bin. Your PATH is a collection of places your computer looks for programs when you issue the command to execute a program without an absolute path. You can have a look at your PATH using echo. code format="bash" echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin code You can add a directory to your path by editing the .bashrc file. This file should be in your home directory the commands below assume that it does not exist yet. code format="bash" mkdir /home/me/bin touch ~/.bashrc export PATH=${PATH}:/home/me/bin code The change to your .bashrc will take effect the next time your start the terminal. Now you can use ~/bin as the install location for your programs.
 * 1) Create a bin folder in your home directory
 * 1) Create .bashrc in your home directory
 * 1) Open the created file for editing and add the following line to add /home/me/bin to your PATH

If configuring is part of the installation process you can use the --prefix flag to install programs in the bin of the specified prefix directory the default is /usr/local. A complete list of flags that can be used with configure scripts can be found here. code format="bash" ./configure --prefix=/home/me ./configure --prefix=$HOME code You can also create symbolic links to your new bin just as described above. code format="bash" ln -s /home/ngs_programs/bowtie-0.12.7/bowtie /home/me/bin/bowtie code
 * 1) To install in /home/me/bin
 * 1) Or you can just use the $HOME variable
 * 1) You can proceed to using make and make install without sudo
 * 1) Create a symbolic link from bowtie in a local installation directory to /home/me/bin.
 * 2) Be sure to use the absolute path to the installed program.