Child pages
  • 5. Installing Application
Skip to end of metadata
Go to start of metadata

Introduction

There are two methods to install application in Linux: 1. From the source code, 2. From the binary package/package manager. Install application in Linux from the source code means you have to compile the program (source code) before you can use it and install from binary package/package manager means the application already pre-compiled (i.e. binary) and you just need to "put" it at the appropriate folder. Then come a question "which method should I use?", the answer is subjective, depend on the code availability and compatibility. Below is the pros and cons of each method:

 

MethodProsCons
Source Code
  • The binary produced by the compilation process is compatible with the system
  • Can add extra options and optimization
  • Can be easily installed at the user space
  • Sometimes non-trivial
  • Need to install all the software dependency
Binary/Package Manager
  • Pre-compiled, easy to install
  • Some package manager (e.g. yum , apt) has feature to search and install the software dependency
  • The binary may not compatible with the another system (i.e. Linux Distro)
  • May not optimum for your system
  • Usually need administrator access/account to install the binary package

 

Source Code

In general there are 3 steps in installing an application from the source code:

  1. configure - to set some compilation parameter, installation folder, dependency check, etc.
  2. make - to start the compilation process
  3. make install - to install the binaries to the installation folder.

Below is the example how to compile an application (Clustal W - http://www.clustal.org) from the source code

Installing Application from Source Code

Download the source code

$ wget http://www.clustal.org/download/current/clustalw-2.1.tar.gz

$ tar -zxvf clustalw-2.1.tar.gz

$ cd clustalw-2.1

$ ./configure --prefix=/home/<username>/clustalw-2.1-binary

$ make

$ make install

Check the binary installation at the installation folder

$ cd /home/<username>/clustal-2.1-binary

$ ls -l

total 8

drwxrwxr-x 2 farhan farhan 4096 Mar 10 09:23 bin

drwxrwxr-x 3 farhan farhan 4096 Mar 10 09:23 share

 

The clustalw application binary is located at bin folder:

$ ls -l bin

total 11468

-rwxr-xr-x 1 farhan farhan 11742518 Mar 10 09:23 clustalw2

 

 

Preparing the sample input file (save it as sample.fasta):

sample.fasta

>A4_Baboon

MTMSSFLINSNYIEPKFPPFEEYAQHSGPGGEDGGPGGGPGYQQPPAPP

TQHLPPQQPQLPHAGGGREPPASYYAPRTAREPAYPAAALYPSHRAADTA

YPYGYRGGASPGRPPQPEQPLAHAKGPAHGLHASHVLQPQPPPPLQPRA

VPPAAPRRCEAAPATPGVPAGGSAPACPLLLADKSPLGLKGKEPVVYPWM

KKIHVSAVNPSYNGGEPKRSRTAYTRQQVLELEKEFHFNRYLTRRRRIEIAH

TLCLSERQVKIWFQNRRMKWKKDHKLPNTKMRSSNSASASAGPPGKAQT

ESPHLHPHPHPSTSTQVPSSI

 

>A4_Cattle

MTMSSFLINSNYIEPKFPPFEEYAQHSGPGGGDGGPGGGPGYQQPPAPA

AQHLPPPQQQPQLSHAGGSREPPASYYAPRAARESSYPAAALYPAHGAAD

TAYPYGYRGGASPGQPPQPEQPPAHAKAPAHGLHASHVLPPPPPQHRAAA

PAPQRRCEAAPATPGVPSGGSAPACPLLLADKSPPGLKGKEPVVYPWMKK

IHVSAVNPSYNGGEPKRSRTAYTRQQVLELEKEFHFNRYLTRRRRIEIAHTLC

LSERQVKIWFQNRRMKWKKDHKLPNTKMRSSNSGSASAGPPGKPQTQSPH

LHPQPHQGASALTPSSM

 

>A4_Rabbit

MTMSSFLINSNYIEPKFPPFEEYAQHSGPGGGDGGPGGGPGYQQPPAPASQ

HRPPQQPPLPHAGGSREPPATLLRAAGHPRARLPRGRALPRARCRGHRLPL

WLPRRRQPRAAASARAAPGARQGPRARPAREPRPAAWPAAAAAAHRAAPP

APPRRCEAAPATPGVPAGGSAPACPLLLADKSPPGLKGKEPVVYPWMKKIHV

SAVNPSYNGGEPKRSRTAYTRQQVLELEKEFHFNRYLTRRRRIEIAHALCLSE

RQVKIWFQNRRMKWKKDHKLPNTKMRSTNSASTGQPGKAQTQSPHPHPHP

VPGASTPIPSTI

 

 

 

Run the program:

Run ClustalW

$ /home/<user>/clustalw-2.1-binary/bin/clustalw2 sample.fasta

CLUSTAL 2.1 Multiple Sequence Alignments

 

Sequence format is Pearson

Sequence 1: A4_Baboon    320 aa

Sequence 2: A4_Cattle    319 aa

Sequence 3: A4_Rabbit    319 aa

Start of Pairwise alignments

Aligning...

 

Sequences (1:2) Aligned. Score:  89

Sequences (1:3) Aligned. Score:  73

Sequences (2:3) Aligned. Score:  72

Guide tree file created:   [sample.dnd]

 

There are 2 groups

Start of Multiple Alignment

 

Aligning...

Group 1: Sequences:   2      Score:6615

Group 2: Sequences:   3      Score:5898

Alignment Score 4752

 

CLUSTAL-Alignment file created  [sample.aln]

 

Check the result:

$ ls -l

-rw-rw-r-- 1 farhan farhan   1747 Mar 10 09:34 sample.aln

-rw-rw-r-- 1 farhan farhan     60 Mar 10 09:34 sample.dnd

-rw-rw-r-- 1 farhan farhan   1041 Mar 10 09:34 sample.fasta

 

Check the content of the result:

$ cat sample.aln

CLUSTAL 2.1 multiple sequence alignment

 

 

A4_Baboon       MTMSSFLINSNYIEPKFPPFEEYAQHSGPGGEDGGPGGGPGYQQPPAPPTQHLPP--QQP

A4_Cattle       MTMSSFLINSNYIEPKFPPFEEYAQHSGPGGGDGGPGGGPGYQQPPAPAAQHLPPPQQQP

A4_Rabbit       MTMSSFLINSNYIEPKFPPFEEYAQHSGPGGGDGGPGGGPGYQQPPAPASQHRPP--QQP

                ******************************* ****************.:** **  ***

 

A4_Baboon       QLPHAGGGREPPASYYAPRTAREPAYPAAALYPSHRAADTAYPYGYRGGASPGRPPQPEQ

A4_Cattle       QLSHAGGSREPPASYYAPRAARESSYPAAALYPAHGAADTAYPYGYRGGASPGQPPQPEQ

A4_Rabbit       PLPHAGGSREPPATLLRAAGHPRARLPRGRALPRARCRGHRLPLWLPRRRQPRAAASARA

                 *.****.*****:   .    ..  * .   *   . .   *       .*  .....

 

A4_Baboon       PLAHAKGP-AHGLHASHVLQPQPPPPLQPRAVPPAAPRRCEAAPATPGVPAGGSAPACPL

A4_Cattle       PPAHAKAP-AHGLHASHVL---PPPPPQHRAAAPAPQRRCEAAPATPGVPSGGSAPACPL

A4_Rabbit       APGARQGPRARPAREPRPAAWPAAAAAAHRAAPPAPPRRCEAAPATPGVPAGGSAPACPL

                . .  :.* *:  : .:     ....   **..**. *************:*********

 

A4_Baboon       LLADKSPLGLKGKEPVVYPWMKKIHVSAVNPSYNGGEPKRSRTAYTRQQVLELEKEFHFN

A4_Cattle       LLADKSPPGLKGKEPVVYPWMKKIHVSAVNPSYNGGEPKRSRTAYTRQQVLELEKEFHFN

A4_Rabbit       LLADKSPPGLKGKEPVVYPWMKKIHVSAVNPSYNGGEPKRSRTAYTRQQVLELEKEFHFN

                ******* ****************************************************

 

A4_Baboon       RYLTRRRRIEIAHTLCLSERQVKIWFQNRRMKWKKDHKLPNTKMRSSNSASASAGPPGKA

A4_Cattle       RYLTRRRRIEIAHTLCLSERQVKIWFQNRRMKWKKDHKLPNTKMRSSNSGSASAGPPGKP

A4_Rabbit       RYLTRRRRIEIAHALCLSERQVKIWFQNRRMKWKKDHKLPNTKMRSTN--SASTGQPGKA

                *************:********************************:*  ***:* ***.

 

A4_Baboon       QTESPHLHPHPHPSTSTQVPSSI

A4_Cattle       QTQSPHLHPQPHQGASALTPSSM

A4_Rabbit       QTQSPHPHPHPVPGASTPIPSTI

                **:*** **:*  .:*:  **::

 

$ cat sample2.dnd

(

A4_Baboon:0.04702,

A4_Cattle:0.05956,

A4_Rabbit:0.21944);

 

Binary/Package Manager

To be continued....

 

  • No labels

3 Comments

  1. Anonymous

  2. Anonymous

    MDlooa ijhezwwswhny, [url=http://jxfkkscjdxva.com/]jxfkkscjdxva[/url], [link=http://ofhrxyhegmeu.com/]ofhrxyhegmeu[/link], http://aiydzwlhlpeh.com/