/*********************************************************************
    LAkernel (version 0.3.2)                                          
                                                                    
    A program to compute local alignment string kernels

    Reference:
    H. Saigo, J.-P. Vert, T. Akutsu and N. Ueda, "Protein homology 
    detection using string alignment kernels", Bioinformatics, 
    vol.20, p.1682-1689, 2004.
                                                                    
                                                                    
    Copyright 2003,2007 Jean-Philippe Vert                                 
    Jean-Philippe.Vert@mines.org
    Copyright 2005 Jean-Philippe Vert, Hiroto Saigo
    hiroto@kuicr.kyoto-u.ac.jp

    This file is part of LAkernel.

    LAkernel is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    Foobar is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 *********************************************************************/


Content:
--------
The tarball contains the following files:
    README: this file
    Makefile: a simple makefile to build all executables
    parameters.dat: a parameter file. Last three numbers indicates scaling parameter for LA kernel, gap open and gap extension penalties.
    LAkernel.h, LAkernel.c: library to compute the pair HMM scores
    seqio.h, seqio.c : a library to manipulate sequence files
    LAkernel_direct.c, LAkernel_1_vs_all.c, 
    LAkernel_all_vs_all.c, LAkernel_MPI.c : programs
    proteins.dat: a FASTA format example file
    blosum62.dat, pam250.dat: sample amino acid substitution matrices with gap penalties and scaling parameter.

Installation:
-------------
Copy the file LAkernel-0.3.1.tar.gz in a directory, then run:
> tar xvzf LAkernel-0.3.1.tar.gz
> cd LAkernel-0.3.1
# Edit Makefile if you have MPI library in your system
> make

This will create various object files (*.o) and three executables:
     - LAkernel_direct : compute the score between two proteins entered as arguments
     - LAkernel_1_vs_all : compute the scores between a protein and all
proteins of a database (two arguments are the names of two sequence
files)
     - LAkernel_all_vs_all : compute the scores between all pairs of
proteins in a database (one argument, the name of a file which
contains a database of proteins)
     - LAkernel_MPI : LAkernel_all_vs_all implemented using MPI library.

Examples:
---------

$ ./LAkernel_direct AAAAA AAAAAA
20.74700

(or $./LAkernel_direct AAAAA AAAAAA blosum62.dat)

$ ./LAkernel_1_vs_all protein.dat protein.dat 
315.02
219.18
193.40
217.05
229.18
296.02
293.02
304.05
299.05
257.18

(or $ ./LAkernel_1_vs_all protein.dat protein.dat blosum62.mat)

$ ./LAkernel_all_vs_all protein.dat            
matrix  Cow     Carp    Chicken Human   Loach   Mouse   Rat     Seal    Whale   Toad
Cow     315.02  219.18  193.40  217.05  229.18  296.02  293.02  304.05  299.05  257.18
Carp    219.18  314.02  175.52  188.07  270.02  203.18  200.18  212.07  231.07  251.02
Chicken 193.40  175.52  304.02  182.56  170.03  189.40  186.40  184.51  193.51  195.16
Human   217.05  188.07  182.56  316.02  213.07  224.05  219.05  224.02  212.02  221.07
Loach   229.18  270.02  170.03  213.07  314.02  213.18  210.18  222.07  234.07  253.02
Mouse   296.02  203.18  189.40  224.05  213.18  313.02  308.02  297.05  290.05  242.18
Rat     293.02  200.18  186.40  219.05  210.18  308.02  314.02  294.05  287.05  239.18
Seal    304.05  212.07  184.51  224.02  222.07  297.05  294.05  313.02  292.02  250.07
Whale   299.05  231.07  193.51  212.02  234.07  290.05  287.05  292.02  318.02  263.07
Toad    257.18  251.02  195.16  221.07  253.02  242.18  239.18  250.07  263.07  316.02

(or $ ./LAkernel_all_vs_all protein.dat blosum62.dat)           

$ mpirun -np 8 ./LAkernel_MPI protein.dat parameters.dat   /* -np #CPU */
matrix  Cow     Carp    Chicken Human   Loach   Mouse   Rat     Seal    Whale   Toad
Cow     315.02  219.18  193.40  217.05  229.18  296.02  293.02  304.05  299.05  257.18
Carp    219.18  314.02  175.52  188.07  270.02  203.18  200.18  212.07  231.07  251.02
Chicken 193.40  175.52  304.02  182.56  170.03  189.40  186.40  184.51  193.51  195.16
Human   217.05  188.07  182.56  316.02  213.07  224.05  219.05  224.02  212.02  221.07
Loach   229.18  270.02  170.03  213.07  314.02  213.18  210.18  222.07  234.07  253.02
Mouse   296.02  203.18  189.40  224.05  213.18  313.02  308.02  297.05  290.05  242.18
Rat     293.02  200.18  186.40  219.05  210.18  308.02  314.02  294.05  287.05  239.18
Seal    304.05  212.07  184.51  224.02  222.07  297.05  294.05  313.02  292.02  250.07
Whale   299.05  231.07  193.51  212.02  234.07  290.05  287.05  292.02  318.02  263.07
Toad    257.18  251.02  195.16  221.07  253.02  242.18  239.18  250.07  263.07  316.02


Changes:
--------

Ver 0.3.1 -> 0.3.2:
- bug fiw (memory leak)

Ver 0.3 -> 0.3.1:
- dynamic input of parameters

Ver 0.2 -> 0.3:
- significant speed up by employing log tables and executing operations in integer space. 
- MPI version implementation (tested on Intel and SGI platform)

Ver 0.1 -> 0.2:
- modification of the pair HMM architecture to implement local alignment and computation of log odds (instead of probability)
- choice of forward algorithm (to compute the complete log odds) or Viterbi algorithm (to compute the Smith-Waterman score)


ToDo:
-----
- Update the seqio package (to remove compilation errors/warning)
- This is only a preliminary version for research purpose
only. Parameters, option handling should be rewritten.
- Efficient allocation of memory for MPI version.

Comments:
---------
Jean-Philippe.Vert@mines.org
hiroto@kuicr.kyoto-u.ac.jp


