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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SeqRes2AtomAligner
public SeqRes2AtomAligner()
getAlignmentString
public String getAlignmentString()
isDEBUG
public boolean isDEBUG()
setDEBUG
public void setDEBUG(boolean debug)
getMatchingAtomRes
public Chain getMatchingAtomRes(Chain seqRes,
List<Chain> atomList)
throws StructureException
- Throws:
StructureException
align
public void align(Structure s,
List<Chain> seqResList)
getFullAtomSequence
public static String getFullAtomSequence(List<Group> groups,
Map<Integer,Integer> positionIndex)
- returns the full sequence of the Atom records of a parent
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 parentpositionIndex
- a Map to keep track of which group is at which sequence position
- Returns:
- string representations
alignNucleotideGroups
public boolean alignNucleotideGroups(List<Group> seqRes,
List<Group> atomRes)
throws StructureException
- Throws:
StructureException
align
public boolean align(List<Group> seqRes,
List<Group> atomRes)
throws StructureException
- aligns two chains of groups, where the first parent is representing the
list of amino acids as obtained from the SEQRES records, and the second parent
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