LASWG - Local Alignment Statistics with Gaps

Introduction

LASWG computes upper bounds for the p-values of local pairwise alignment scores. It can handle gaps (insertions and deletions) and do not suffer from so-called edge effects.

The best local alignment score t of some sequences x and y can be computed by the well-known Smith-Waterman algorithm. The p-value of this score t is the probability of picking sequences x' and y' from the null model with the best local alignment score ≥ t Here, the lengths of x' and y' are equal to the ones of x and y.

LASWG will output expectation(s) E(X_t), where each E(X_t) is an upper bound for the p-value of an alignment score t.

Scoring Model

The model in LASWG is the same as in BLASTn, i.e. the score of a match is +1, and the score of a mismatch is -3. For the linear gaps, the gap penalty is 5 and for the affine gaps the penalties are 5 and 2 for opening a gap and extending it by one character, respectively. In the current version, one has to edit the source code to change this alignment model.

Program with Source Code

Download LASWG from here.

Usage

Copy all .class files from the source package to some directory and run it there with the java interpreter. If java is not installed on your system, download Java Runtime Environment (JRE) from java.sun.com.

For linear gap model use

java LocalLinear m n t q1 ... qk
Here m and n are the sequence lengths and t is the alignment score of interest. Parameters q1...qk define the null model, i.e. the probabilities for each residue. Thus, an example command for the DNA alphabet would look like
java LocalLinear 100 1000 15 0.25 0.25 0.25 0.25

For affine gap model use the command

java LocalAffine m n q1 ... qk
Thus, an example command for the DNA alphabet would look like
java LocalAffine 100 1000 0.25 0.25 0.25 0.25
Note, it is not needed to specify parameter t here as LocalAffine will output E(X_t) for all t.

References

[1] Pasi Rastas: A General Framework for Local Pairwise Alignment Statistics with Gaps, In Proc. 9th Workshop on Algorithms in Bioinformatics - WABI 2009, pages 233-245. pdf
Pasi Rastas
Last modified: Mon Oct 5 17:42:13 EEST 2009