BioinfoFieldExtractor
Class GlobalAlignment

java.lang.Object
  extended by BioinfoFieldExtractor.GlobalAlignment

public class GlobalAlignment
extends java.lang.Object

This class provides functionality for global alignment for 2 messages sequences based on the NeedlemanWunsch algorithm.

Author:
Serge Gorbunov

Constructor Summary
GlobalAlignment()
           
 
Method Summary
 NeedlemanWunschHolder alignGlobally(java.util.ArrayList<java.lang.Integer> msg1, java.util.ArrayList<java.lang.Integer> msg2)
           
 NeedlemanWunschHolder alignGlobally(java.util.ArrayList<java.lang.Integer> msg1, java.util.ArrayList<java.lang.Integer> msg2, float[][] similarityMatrix)
          Converts the strings into a byte array and calls the main alignGlobaly method.
 NeedlemanWunschHolder alignGlobally(int[] msg1, int[] msg2, float[][] similarityMtx)
          Performs NeedlemanWunsch global alignment algorithm to calculate similarity between message sequences.
 int[] convertToDec(java.lang.String msg)
          Converts string to an array of dec representations of the chars
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalAlignment

public GlobalAlignment()
Method Detail

alignGlobally

public NeedlemanWunschHolder alignGlobally(java.util.ArrayList<java.lang.Integer> msg1,
                                           java.util.ArrayList<java.lang.Integer> msg2)

alignGlobally

public NeedlemanWunschHolder alignGlobally(java.util.ArrayList<java.lang.Integer> msg1,
                                           java.util.ArrayList<java.lang.Integer> msg2,
                                           float[][] similarityMatrix)
Converts the strings into a byte array and calls the main alignGlobaly method.


alignGlobally

public NeedlemanWunschHolder alignGlobally(int[] msg1,
                                           int[] msg2,
                                           float[][] similarityMtx)
Performs NeedlemanWunsch global alignment algorithm to calculate similarity between message sequences. TODO: implement the use of the similarity matrix

Parameters:
msg1 - The first message
msg2 - The second message
similarityMtx - similarity matrix
Returns:
The needlemanWunch Holder object with the alignment info

convertToDec

public int[] convertToDec(java.lang.String msg)
Converts string to an array of dec representations of the chars