## org.biojava.bio.structure.io
Class SeqRes2AtomAligner

    java.lang.Object
      org.biojava.bio.structure.io.SeqRes2AtomAligner

    public class SeqRes2AtomAligner

extends Object

Aligns the SEQRES residues to the ATOM residues. The AminoAcids that can be matched between the two of them will be set in the SEQRES chains

Author:
  Andreas Prlic

Constructor Summary
`SeqRes2AtomAligner()`

Method Summary
`boolean` `align(List<Group> seqRes, List<Group> atomRes)` aligns two chains of groups, where the first chain is representing the list of amino acids as obtained from the SEQRES records, and the second chain represents the groups obtained from the ATOM records (and containing the actual ATOM information).
`void` `align(Structure s, List<Chain> seqResList)`
`String` `getAlignmentString()`
`String` `getFullAtomSequence(List<Group> groups)` returns the full sequence of the Atom records of a chain with X instead of HETATMSs.
`static SubstitutionMatrix` `getSubstitutionMatrix(FiniteAlphabet alphabet)`
`boolean` `isDEBUG()`
`void` `setDEBUG(boolean debug)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SeqRes2AtomAligner

    public SeqRes2AtomAligner()

Method Detail

### getAlignmentString

    public String getAlignmentString()

### isDEBUG

    public boolean isDEBUG()

### setDEBUG

    public void setDEBUG(boolean debug)

### align

    public void align(Structure s,
                      List<Chain> seqResList)

### getFullAtomSequence

    public String getFullAtomSequence(List<Group> groups)

  returns the full sequence of the Atom records of a chain with X instead of HETATMSs. The advantage of this is that it allows us to also align HETATM groups back to the SEQRES.

  Parameters:
    `groups` - the list of groups in a chain
  Returns:
    string representations

### align

    public boolean align(List<Group> seqRes,
                         List<Group> atomRes)
                  throws StructureException

  aligns two chains of groups, where the first chain is representing the list of amino acids as obtained from the SEQRES records, and the second chain represents the groups obtained from the ATOM records (and containing the actual ATOM information). This does the actual alignment and if a group can be mapped to a position in the SEQRES then the corresponding position is repplaced with the group that contains the atoms.

  Parameters:
    `seqRes` -
    `atomRes` -
  Returns:
    true if no match has bee found
  Throws:
    `StructureException`

### getSubstitutionMatrix

    public static SubstitutionMatrix getSubstitutionMatrix(FiniteAlphabet alphabet)
                                                    throws IOException,
                                                           BioException

  Throws:
    `IOException`
    `BioException`