Class MultipleAlignmentScorer
MultipleAlignments.- Since:
- 4.1.0
- Author:
- Spencer Bliven, Aleix Lafita
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcalculateScores(MultipleAlignment alignment) Calculates and puts the RMSD and the average TM-Score of the MultipleAlignment.static doublegetAvgTMScore(List<Atom[]> transformed, List<Integer> lengths) Calculates the average TMScore all the possible pairwise structure comparisons of the given a set of superimposed Atoms and the original structure lengths.static doublegetAvgTMScore(MultipleAlignment alignment) Calculates the average TMScore of all the possible pairwise structure comparisons of the given alignment.static doublegetMCScore(MultipleAlignment alignment, double gapOpen, double gapExtension, double dCutoff) Calculates the MC score, specific for the MultipleAlignment algorithm.static doublegetRefRMSD(List<Atom[]> transformed, int reference) Calculates the average RMSD from all structures to a reference s tructure, given a set of superimposed atoms.static doublegetRefRMSD(MultipleAlignment alignment, int ref) /** Calculates the average RMSD from all structures to a reference s tructure, given a set of superimposed atoms.static doublegetRefTMScore(List<Atom[]> transformed, List<Integer> lengths, int reference) Calculates the average TMScore from all structures to a reference structure, given a set of superimposed atoms.static doublegetRefTMScore(MultipleAlignment alignment, int ref) Calculates the average TMScore from all structures to a reference structure, given a set of superimposed atoms.static doubleCalculates the RMSD of all-to-all structure comparisons (distances), given a set of superimposed atoms.static doublegetRMSD(MultipleAlignment alignment) Calculates the RMSD of all-to-all structure comparisons (distances) of the given MultipleAlignment.
-
Field Details
-
PROBABILITY
- See Also:
-
CE_SCORE
- See Also:
-
RMSD
- See Also:
-
AVGTM_SCORE
- See Also:
-
MC_SCORE
- See Also:
-
REF_RMSD
- See Also:
-
REFTM_SCORE
- See Also:
-
-
Constructor Details
-
MultipleAlignmentScorer
public MultipleAlignmentScorer()
-
-
Method Details
-
calculateScores
Calculates and puts the RMSD and the average TM-Score of the MultipleAlignment.- Parameters:
alignment-- Throws:
StructureException- See Also:
-
getRMSD
Calculates the RMSD of all-to-all structure comparisons (distances) of the given MultipleAlignment.Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length.
The formula used is just the sqroot of the average distance of all possible pairs of atoms. Thus, for R structures aligned over C columns without gaps, we have
RMSD = \sqrt{1/(C*(R*(R-1)/2)) * \sum_{r1=1}^{R-1} \sum_{r2=r1+1}^{R-1} \sum_{j=0}^{C-1} (atom[r1][c]-atom[r2][c])^2}- Parameters:
alignment-- Returns:
- double RMSD
-
getRMSD
Calculates the RMSD of all-to-all structure comparisons (distances), given a set of superimposed atoms.- Parameters:
transformed-- Returns:
- double RMSD
- See Also:
-
getRefRMSD
/** Calculates the average RMSD from all structures to a reference s tructure, given a set of superimposed atoms.Complexity: T(n,l) = O(l*n), if n=number of structures and l=alignment length.
For ungapped alignments, this is just the sqroot of the average distance from an atom to the aligned atom from the reference. Thus, for R structures aligned over C columns (with structure 0 as the reference), we have:
RefRMSD = \sqrt{ 1/(C*(R-1)) * \sum_{r=1}^{R-1} \sum_{j=0}^{C-1} (atom[1][c]-atom[r][c])^2 }For gapped alignments, null atoms are omitted from consideration, so that the RMSD is the average over all columns with non-null reference of the average RMSD within the non-null elements of the column.
- Parameters:
alignment- MultipleAlignmentref- reference structure index- Returns:
-
getRefRMSD
Calculates the average RMSD from all structures to a reference s tructure, given a set of superimposed atoms.Complexity: T(n,l) = O(l*n), if n=number of structures and l=alignment length.
For ungapped alignments, this is just the sqroot of the average distance from an atom to the aligned atom from the reference. Thus, for R structures aligned over C columns (with structure 0 as the reference), we have:
RefRMSD = \sqrt{ 1/(C*(R-1)) * \sum_{r=1}^{R-1} \sum_{j=0}^{C-1} (atom[1][c]-atom[r][c])^2 }For gapped alignments, null atoms are omitted from consideration, so that the RMSD is the average over all columns with non-null reference of the average RMSD within the non-null elements of the column.
- Parameters:
transformed-reference-- Returns:
-
getAvgTMScore
Calculates the average TMScore of all the possible pairwise structure comparisons of the given alignment.Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length.
- Parameters:
alignment-- Returns:
- double Average TMscore
- Throws:
StructureException
-
getAvgTMScore
public static double getAvgTMScore(List<Atom[]> transformed, List<Integer> lengths) throws StructureException Calculates the average TMScore all the possible pairwise structure comparisons of the given a set of superimposed Atoms and the original structure lengths.Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length.
- Parameters:
transformed- aligned Atoms transformedlengths- lengths of the structures in residue number- Returns:
- double Average TMscore
- Throws:
StructureException
-
getRefTMScore
Calculates the average TMScore from all structures to a reference structure, given a set of superimposed atoms.Complexity: T(n,l) = O(l*n), if n=number of structures and l=alignment length.
- Parameters:
alignment-ref- Index of the reference structure- Returns:
- Throws:
StructureException
-
getRefTMScore
public static double getRefTMScore(List<Atom[]> transformed, List<Integer> lengths, int reference) throws StructureException Calculates the average TMScore from all structures to a reference structure, given a set of superimposed atoms.Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length.
- Parameters:
transformed- Arrays of aligned atoms, after superpositionlengths- lengths of the full input structuresreference- Index of the reference structure- Returns:
- Throws:
StructureException
-
getMCScore
public static double getMCScore(MultipleAlignment alignment, double gapOpen, double gapExtension, double dCutoff) throws StructureException Calculates the MC score, specific for the MultipleAlignment algorithm. The score function is modified from the original CEMC paper, making it continuous and differentiable.The maximum score of a match is 20, and the penalties for gaps are part of the input. The half-score distance, d0, is chosen as in the TM-score.
Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length.
- Parameters:
alignment-gapOpen- penalty for gap opening (reasonable values are in the range (1.0-20.0)gapExtension- penalty for extending a gap (reasonable values are in the range (0.5-10.0)dCutoff- the distance cutoff- Returns:
- the value of the score
- Throws:
StructureException
-