Package org.biojava.nbio.structure.io
Class SeqRes2AtomAligner
- java.lang.Object
-
- org.biojava.nbio.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, Jose Duarte
-
-
Constructor Summary
Constructors Constructor Description SeqRes2AtomAligner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
align(Structure s, List<Chain> seqResList)
String
getAlignmentString()
static String
getFullAtomSequence(List<Group> groups, Map<Integer,Integer> positionIndex, boolean isNucleotideChain)
Returns the full sequence of the Atom records of a parent with X instead of HETATMSs.static Chain
getMatchingAtomRes(Chain seqRes, List<Chain> atomList, boolean useChainId)
void
mapSeqresRecords(Chain atomRes, Chain seqRes)
Map the seqRes groups to the atomRes chain.static void
storeUnAlignedSeqRes(Structure structure, List<Chain> seqResChains, boolean headerOnly)
Storing unaligned SEQRES groups in a Structure.
-
-
-
Constructor Detail
-
SeqRes2AtomAligner
public SeqRes2AtomAligner()
-
-
Method Detail
-
getAlignmentString
public String getAlignmentString()
-
getMatchingAtomRes
public static Chain getMatchingAtomRes(Chain seqRes, List<Chain> atomList, boolean useChainId)
- Parameters:
seqRes
-atomList
-useChainId
- if true chainId (Chain.getId) is used for matching, if false chainName (Chain.getName) is used- Returns:
-
mapSeqresRecords
public void mapSeqresRecords(Chain atomRes, Chain seqRes)
Map the seqRes groups to the atomRes chain. Updates the atomRes chain object with the mapped data The seqRes chain should not be needed after this and atomRes should be further used.- Parameters:
atomRes
- the chain containing ATOM groups (in atomGroups slot). This chain is modified to contain in its seqresGroups slot the mapped atom groupsseqRes
- the chain containing SEQRES groups (in atomGroups slot). This chain is not modified
-
getFullAtomSequence
public static String getFullAtomSequence(List<Group> groups, Map<Integer,Integer> positionIndex, boolean isNucleotideChain)
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 positionisNucleotideChain
- whether the atom groups are predominantly nucleotides (the groups represent a nucleotide chain), if true non-standard nucleotides will be represented with ambiguous letter 'N' instead of 'X', if false all non-standard residues will be 'X'- Returns:
- string representations
-
storeUnAlignedSeqRes
public static void storeUnAlignedSeqRes(Structure structure, List<Chain> seqResChains, boolean headerOnly)
Storing unaligned SEQRES groups in a Structure.- Parameters:
structure
-seqResChains
-
-
-