util
Class Alignment

java.lang.Object
  extended by util.Alignment

public class Alignment
extends java.lang.Object

This class does a simple alignment by using a dot plot matrix for the PDB and the given alignment sequence. It follow the assumption of a correctly selected PDB sequence. Main goal is to provide a mapping from the alignment AA position to the PDB sequence position.


Constructor Summary
Alignment(java.lang.String alignSequence, java.lang.String pdbSequence)
          Constructor of the DotPlotMatrix
 
Method Summary
 void alignSequenceToStructure()
          Initializes the alignment by the condition of matching the first four amino acids and aligns the two sequences by starting at the first four matching positions and going diagonal (down-to-the-right) in the matrix.
 void checkAlignment()
          Checks sequence converage and shows a warning if it is under the specified threshold
 java.util.HashMap<java.lang.Integer,java.lang.Integer> getAlign2PDBPositionMap()
          Returns the alignment to PDB position hash map.
 int getAlignPos(int pdbPos)
          Receives an aminoacid position on the pdb chain and returns its position on the alignment sequence
 int getNumCols()
          Returns the number of columns of the matrix;
 int getNumRows()
          Returns the number of rows of the matrix;
 java.util.HashMap<java.lang.Integer,java.lang.Integer> getPdb2alignPositionMap()
           
 int getPDBPos(int alignPos)
          Receives an aminoacid position on the alignment sequence chain and returns its position on the pdb chain
 void showAlignment()
          Shows a a window with the alignment data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Alignment

public Alignment(java.lang.String alignSequence,
                 java.lang.String pdbSequence)
Constructor of the DotPlotMatrix

Parameters:
alignSequence -
pdbSequence -
Method Detail

getNumCols

public int getNumCols()
Returns the number of columns of the matrix;

Returns:
Integer

getNumRows

public int getNumRows()
Returns the number of rows of the matrix;

Returns:
Integer

alignSequenceToStructure

public void alignSequenceToStructure()
Initializes the alignment by the condition of matching the first four amino acids and aligns the two sequences by starting at the first four matching positions and going diagonal (down-to-the-right) in the matrix.


getAlign2PDBPositionMap

public java.util.HashMap<java.lang.Integer,java.lang.Integer> getAlign2PDBPositionMap()
Returns the alignment to PDB position hash map.

Returns:
align2PDBPositionMap HashMap

getPdb2alignPositionMap

public java.util.HashMap<java.lang.Integer,java.lang.Integer> getPdb2alignPositionMap()

checkAlignment

public void checkAlignment()
Checks sequence converage and shows a warning if it is under the specified threshold


showAlignment

public void showAlignment()
Shows a a window with the alignment data


getAlignPos

public int getAlignPos(int pdbPos)
Receives an aminoacid position on the pdb chain and returns its position on the alignment sequence

Parameters:
pbdPos - Position of an aminoacid in the pdb chain
Returns:
Position of given aminoacid in the alignment sequence

getPDBPos

public int getPDBPos(int alignPos)
Receives an aminoacid position on the alignment sequence chain and returns its position on the pdb chain

Parameters:
alignPos - Position of given aminoacid in the alignment sequence
Returns:
Position of an aminoacid in the pdb chain