Class AlternativeAlignment
java.lang.Object
org.biojava.nbio.structure.align.pairwise.AlternativeAlignment
- All Implemented Interfaces:
 Serializable
Implements a class which handles one possible (alternative) solution.
 Alternative alignments arise from different seed
 alignments or seed FPairs. The AltAlg class contains methods
 for refinement (Dynamic Programming based) and filtering
 (i.e. removing probably wrongly matched APairs). In the refinement
 phase, different seed alignments can converge to the same solution.
- Since:
 - 3:04:26 PM
 - Version:
 - %I% %G%
 - Author:
 - Andreas Prlic,, Peter Lackner (original Python and C code)
 - See Also:
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidSet apairs according to a list of (i,j) tuples.voidapairs_from_seed(int l, int i, int j) Set apairs according to a seed position.voidcalcScores(Atom[] ca1, Atom[] ca2) calculates scores for this alignment ( %id )voidcalculateSuperpositionByIdx(Atom[] ca1, Atom[] ca2) voidfinish(StrucAligParameters params, Atom[] ca1, Atom[] ca2) getAlignedStructure(Structure s1, Structure s2) create an artifical Structure object that contains the two structures superimposed onto each other.intreturns the sequential number of this alternative alignmentintget the number of the cluster this alignment belongs toThe distance matrix this alignment is based onstatic MatrixgetDistanceMatrix(Atom[] ca1, Atom[] ca2) intgetEqr()returns the number of euqivalent residues in this alignmentintgetGaps()return the number of gaps in this alignmentint[]getIdx1()the positions of the structure equivalent positions in atom set 1int[]getIdx2()the positions of the structure equivalent atoms in atom set 2getPath()String[]String[]intdoublegetRmsd()returns the rotation matrix that needs to be applied to structure 2 to rotate on structure 1floatgetScore()the alignment scoregetShift()returns the shift vector that has to be applied on structure to to shift on structure onevoidrefine(StrucAligParameters params, Atom[] ca1, Atom[] ca2) Refinement procedure based on superposition and dynamic programming.voidsetAltAligNumber(int fromia) voidsetCluster(int cluster) set the number of the cluster this alignment belongs to.voidsetDistanceMatrix(Matrix distanceMatrix) The distance matrix this alignment is based onvoidsetPDBresnum1(String[] pdbresnum1) voidsetPDBresnum2(String[] pdbresnum2) voidsetPercId(int percId) voidsetRms(double rms) the rms in the structurally equivalent regionsvoidsetScore(float score) converts the alignment to a PDB file each of the structures will be represented as a model.toString()print the idx positions of this alignment 
- 
Field Details
- 
logger
 
 - 
 - 
Constructor Details
- 
AlternativeAlignment
public AlternativeAlignment() 
 - 
 - 
Method Details
- 
toString
print the idx positions of this alignment - 
getCluster
get the number of the cluster this alignment belongs to- Returns:
 - an int giving the number of the cluster
 
 - 
setCluster
set the number of the cluster this alignment belongs to. All alignments in a cluster are quite similar.- Parameters:
 cluster- the number of the cluster
 - 
getRmsd
 - 
setRms
the rms in the structurally equivalent regions- Parameters:
 rms-
 - 
getScore
the alignment score- Returns:
 - the score of this alignment
 
 - 
setScore
 - 
getGaps
return the number of gaps in this alignment- Returns:
 - the number of Gaps
 
 - 
getEqr
returns the number of euqivalent residues in this alignment- Returns:
 - the number of equivalent residues
 
 - 
getIdx1
the positions of the structure equivalent positions in atom set 1- Returns:
 - the array of the positions
 
 - 
getIdx2
the positions of the structure equivalent atoms in atom set 2- Returns:
 - the array of the positions
 
 - 
getPercId
 - 
setPercId
 - 
apairs_from_seed
Set apairs according to a seed position.- Parameters:
 l-i-j-
 - 
apairs_from_idxlst
Set apairs according to a list of (i,j) tuples.- Parameters:
 jf- a JoingFragment
 - 
getAltAligNumber
returns the sequential number of this alternative alignment- Returns:
 - the sequential number of this alternative alignment
 
 - 
setAltAligNumber
 - 
finish
- Throws:
 StructureException
 - 
getDistanceMatrix
 - 
refine
Refinement procedure based on superposition and dynamic programming. Performs an iterative refinement. Several methods apply such a procedure, e.g. CE or ProSup. Here we additionally test for circular permutation, which are in the same frame of superposition as the optimal alignment. This feature may be switched off by setting permsize to -1.- Parameters:
 params- the parametersca1- atoms of structure 1ca2- atoms of structure 2- Throws:
 StructureException
 - 
getPDBresnum1
 - 
setPDBresnum1
 - 
getPDBresnum2
 - 
setPDBresnum2
 - 
calculateSuperpositionByIdx
- Throws:
 StructureException
 - 
getRotationMatrix
returns the rotation matrix that needs to be applied to structure 2 to rotate on structure 1- Returns:
 - the rotation Matrix
 
 - 
getShift
returns the shift vector that has to be applied on structure to to shift on structure one- Returns:
 - the shift vector
 
 - 
calcScores
calculates scores for this alignment ( %id )- Parameters:
 ca1- set of Atoms for molecule 1ca2- set of Atoms for molecule 2
 - 
getAlignedStructure
create an artifical Structure object that contains the two structures superimposed onto each other. Each structure is in a separate model. Model 1 is structure 1 and Model 2 is structure 2.- Parameters:
 s1- the first structure. its coordinates will not be changeds2- the second structure, it will be cloned and the cloned coordinates will be rotated according to the alignment results.- Returns:
 - composite structure containing the 2 aligned structures as a models 1 and 2
 
 - 
toPDB
converts the alignment to a PDB file each of the structures will be represented as a model.- Parameters:
 s1-s2-- Returns:
 - a PDB file as a String
 
 - 
getDistanceMatrix
The distance matrix this alignment is based on- Returns:
 - a Matrix object.
 
 - 
setDistanceMatrix
The distance matrix this alignment is based on- Parameters:
 distanceMatrix-
 - 
getPath
 
 -