Class CECalculator
java.lang.Object
org.biojava.nbio.structure.align.ce.CECalculator
This is based on the original Combinatorial Extension (CE) source code from 2003 or 2004 (CE version 2.3),
as has been originally developed by I. Shindyalov and P.Bourne (1998).
The original CE paper is available from here: http://peds.oxfordjournals.org/cgi/content/short/11/9/739.
This class is a pretty much exact 1:1 port from C, where I cared about exact reproduce of the CE results
and not about Java style.
- Author:
- Andreas Prlic
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]protected int[]protected int[][]protected int[][]protected doubleprotected int[]protected double[]protected static final booleanprotected double[][]protected intprotected intprotected static final intprotected intprotected intprotected CeParametersprotected int[]protected int[]protected static final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoublesuperimpose and get rmsdvoidconvertAfpChain(AFPChain afpChain, Atom[] ca1, Atom[] ca2) copy data from this class into AFPChain container object.protected intdoIter0(int newBestTrace, double traceTotalScore, double bestTracesMax) extractFragments(AFPChain afpChain, Atom[] ca1, Atom[] ca2) int[]int[]double[][]getDist1()double[][]getDist2()intgetLcmp()double[][]Caution: this matrix is overwriten with very different data at several points in the alignment algorithm.intgetnAtom()Gets the rotation matrix from the last call tocalc_rmsd.protected doublegetScore2(int jse1, int jse2, double[][] traceScore, int traceIndex_, int[] traceIndex, int winSizeComb1, int winSizeComb2, double score0, double score1) protected doublegetScoreFromDistanceMatrices(int mse1, int mse2, int winSize) getShift()Gets the shift from the last call tocalc_rmsd.double[][]initSumOfDistances(int nse1, int nse2, int winSize, int winSizeComb1, Atom[] ca1, Atom[] ca2) voidvoidsetAlign_se1(int[] alignSe1) voidsetAlign_se2(int[] alignSe2) voidsetDist1(double[][] dist1) voidsetDist2(double[][] dist2) voidsetLcmp(int lcmp) voidsetMatMatrix(double[][] matrix) voidsetnAtom(int nAtom) voidtraceFragmentMatrix(AFPChain afpChain, Atom[] ca1, Atom[] ca2) static double[][]updateMatrixWithSequenceConservation(double[][] max, Atom[] ca1, Atom[] ca2, CeParameters params) Modifies an alignment matrix by favoring the alignment of similar and identical amino acids and penalizing the alignment of unrelated ones.protected doublezStrAlign(int winSize, int nTrace, double score, int nGaps)
-
Field Details
-
isPrint
- See Also:
-
mat
-
bestTrace1
-
bestTrace2
-
bestTraces1
-
bestTraces2
-
nBestTrace
-
nBestTraces
-
bestTracesN
-
bestTraceScore
-
nTrace
-
bestTracesScores
-
trace1
-
trace2
-
zThr
- See Also:
-
nTraces
-
params
-
nIter
- See Also:
-
-
Constructor Details
-
CECalculator
-
-
Method Details
-
extractFragments
public AFPChain extractFragments(AFPChain afpChain, Atom[] ca1, Atom[] ca2) throws StructureException - Parameters:
afpChain- A new AFPChain, which will be filled in by this functionca1-ca2-- Returns:
- afpChain
- Throws:
StructureException
-
initSumOfDistances
public double[][] initSumOfDistances(int nse1, int nse2, int winSize, int winSizeComb1, Atom[] ca1, Atom[] ca2) -
traceFragmentMatrix
-
getScore2
protected double getScore2(int jse1, int jse2, double[][] traceScore, int traceIndex_, int[] traceIndex, int winSizeComb1, int winSizeComb2, double score0, double score1) -
doIter0
-
getScoreFromDistanceMatrices
-
nextStep
- Throws:
StructureException
-
updateMatrixWithSequenceConservation
public static double[][] updateMatrixWithSequenceConservation(double[][] max, Atom[] ca1, Atom[] ca2, CeParameters params) Modifies an alignment matrix by favoring the alignment of similar and identical amino acids and penalizing the alignment of unrelated ones.- Parameters:
max- alignment matrixca1- Atoms for protein 1ca2- Atoms for Protein 2params- alignment parameters- Returns:
- modified alignment matrix
-
addMatrixListener
-
calc_rmsd
public double calc_rmsd(Atom[] pro1, Atom[] pro2, int strLen, boolean storeTransform) throws StructureException superimpose and get rmsd- Parameters:
pro1-pro2-strLen- Number of atoms from pro1 and pro2 to usestoreTransform- Store rotation and shift matrices locally- Returns:
- RMSD
- Throws:
StructureException
-
zStrAlign
-
convertAfpChain
copy data from this class into AFPChain container object.- Parameters:
afpChain-ca1-ca2-
-
getnAtom
-
setnAtom
-
getLcmp
-
setLcmp
-
getAlign_se1
-
setAlign_se1
-
getAlign_se2
-
setAlign_se2
-
getMatMatrix
Caution: this matrix is overwriten with very different data at several points in the alignment algorithm. AfterinitSumOfDistancesis run, this will hold the distance matrix between AFPs.- Returns:
- mat
-
setMatMatrix
-
getRotationMatrix
Gets the rotation matrix from the last call tocalc_rmsd.- Returns:
- The rotatiokn matrix
-
getShift
Gets the shift from the last call tocalc_rmsd.- Returns:
- The shift
-
getDist1
-
setDist1
-
getDist2
-
setDist2
-