Interface MultipleAlignmentEnsemble
-
- All Superinterfaces:
ScoresCache
- All Known Implementing Classes:
MultipleAlignmentEnsembleImpl
public interface MultipleAlignmentEnsemble extends ScoresCache
A MultipleAlignmentEnsemble is a collection ofMultipleAlignment
s that share the same structures (Atoms) and creation properties (algorithm, version, creation time, etc.).This class is the top level of the hierarchy and allows the storage of a set of alignment alternatives created by a multiple structure alignment algorithm, so that only one object is returned with more than one alignment option.
- Since:
- 4.1.0
- Author:
- Aleix Lafita, Spencer Bliven
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMultipleAlignment(MultipleAlignment alignment)
Add a new MultipleAlignment to the end of the ensemble and set its parent ensemble to this.void
clear()
Clear scores and other properties which depend on the specific alignment.MultipleAlignmentEnsemble
clone()
Creates and returns an identical copy of this ensemble, including a deep clone of all constituent alignments.String
getAlgorithmName()
Returns the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.List<Atom[]>
getAtomArrays()
Get an array of representative atoms for each structure (CA atoms for proteins).Long
getCalculationTime()
Returns the running time of the structure alignment calculation, in milliseconds.List<Matrix>
getDistanceMatrix()
Returns the List containing the interatomic distance Matrix of each structure.Long
getIoTime()
Returns the io time for this object, in milliseconds.MultipleAlignment
getMultipleAlignment(int index)
Returns the MultipleAlignments at the specified index in the ensemble.List<MultipleAlignment>
getMultipleAlignments()
Returns the List of MultipleAlignments in the ensemble.List<StructureIdentifier>
getStructureIdentifiers()
Returns a List containing the names of the structures aligned (i.e.: PDB code, SCOP domain, etc.).String
getVersion()
Returns the version of the algorithm used to generate the MultipleAlignment objects.void
setAlgorithmName(String algorithmName)
Set the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.void
setAtomArrays(List<Atom[]> atomArrays)
Sets the List of Atom arrays.void
setCalculationTime(Long millis)
Set the running time spent to calculate this alignment.void
setIoTime(Long millis)
Set the IO time to load this objectvoid
setMultipleAlignments(List<MultipleAlignment> alignments)
Set the List of MultipleAlignments in the ensemble.void
setStructureIdentifiers(List<StructureIdentifier> structureIdentifiers)
Set the List containing the names of the structures aligned (i.e.: PDB code, SCOP domain, etc.).void
setVersion(String version)
Sets the version of the algorithm used to generate the MultipleAlignment objects.int
size()
Returns the number of aligned structures in the MultipleAlignments.-
Methods inherited from interface org.biojava.nbio.structure.align.multiple.ScoresCache
getScore, getScores, putScore
-
-
-
-
Method Detail
-
clone
MultipleAlignmentEnsemble clone()
Creates and returns an identical copy of this ensemble, including a deep clone of all constituent alignments.- Returns:
- MultipleAlignmentEnsemble identical copy of this object.
-
getAlgorithmName
String getAlgorithmName()
Returns the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.- Returns:
- String name of the algorithm.
- See Also:
setAlgorithmName(String)
-
setAlgorithmName
void setAlgorithmName(String algorithmName)
Set the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.- Parameters:
algorithmName
- name of the algorithm.- See Also:
getAlgorithmName()
-
getVersion
String getVersion()
Returns the version of the algorithm used to generate the MultipleAlignment objects.- Returns:
- String version of the algorithm.
- See Also:
setVersion(String)
-
setVersion
void setVersion(String version)
Sets the version of the algorithm used to generate the MultipleAlignment objects.- Parameters:
version
- the version of the algorithm.- See Also:
getVersion()
-
getStructureIdentifiers
List<StructureIdentifier> getStructureIdentifiers()
Returns a List containing the names of the structures aligned (i.e.: PDB code, SCOP domain, etc.).The names are structure identifiers of the structures. They are in the same order as in the alignment Blocks (same index number for same structure).
- Returns:
- List of String names of the structures
- See Also:
setStructureIdentifiers(List)
,getAtomArrays()
-
setStructureIdentifiers
void setStructureIdentifiers(List<StructureIdentifier> structureIdentifiers)
Set the List containing the names of the structures aligned (i.e.: PDB code, SCOP domain, etc.).The names are structure identifiers of the structures.
- Parameters:
structureIdentifiers
- names of the structures, structure identifiers- See Also:
getStructureIdentifiers()
,setAtomArrays(List)
-
getAtomArrays
List<Atom[]> getAtomArrays()
Get an array of representative atoms for each structure (CA atoms for proteins).Atoms should be unrotated. Thus, to obtain a superimposed set of structures, each atom array should be cloned and then rotated according to the transformation matrix.
If atoms have not previously been set using
setAtomArrays(List)
, attempts to load representative atoms based ongetStructureIdentifiers()
. If it fails to load the Atoms it gives a NullPointerException before returning null.- Returns:
- List of Atom[].
- See Also:
setAtomArrays(List)
-
setAtomArrays
void setAtomArrays(List<Atom[]> atomArrays)
Sets the List of Atom arrays. Every structure has an Atom array associated. Note that this should be called in conjunction withsetStructureIdentifiers(List)
.Setting the atom arrays to null will cause them to be automatically regenerated based on
getStructureIdentifiers()
during the next call togetAtomArrays()
.- Parameters:
atomArrays
- the List of representative (C-alpha) atom arrays- See Also:
getAtomArrays()
,setStructureIdentifiers(List)
-
getDistanceMatrix
List<Matrix> getDistanceMatrix()
Returns the List containing the interatomic distance Matrix of each structure.- Returns:
- List of Matrix interatomic distance matrices.
- See Also:
#updateDistanceMatrix()
-
getMultipleAlignments
List<MultipleAlignment> getMultipleAlignments()
Returns the List of MultipleAlignments in the ensemble.- Returns:
- List of MultipleAlignment in the ensemble.
- See Also:
#setMultipleAlignments()
-
getMultipleAlignment
MultipleAlignment getMultipleAlignment(int index)
Returns the MultipleAlignments at the specified index in the ensemble. Throws an exception equivalently to accessing an index of a List- Returns:
- MultipleAlignment at the index in the ensemble.
- See Also:
#setMultipleAlignments()
-
setMultipleAlignments
void setMultipleAlignments(List<MultipleAlignment> alignments)
Set the List of MultipleAlignments in the ensemble.- Parameters:
alignments
- List of MultipleAlignments that are part of the ensemble.- See Also:
addMultipleAlignment(MultipleAlignment)
-
addMultipleAlignment
void addMultipleAlignment(MultipleAlignment alignment)
Add a new MultipleAlignment to the end of the ensemble and set its parent ensemble to this.- Parameters:
alignment
-
-
size
int size()
Returns the number of aligned structures in the MultipleAlignments.- Returns:
- int number of aligned structures.
- See Also:
getStructureIdentifiers()
,getAtomArrays()
-
getIoTime
Long getIoTime()
Returns the io time for this object, in milliseconds.- Returns:
- long creation time, or null if unset
-
getCalculationTime
Long getCalculationTime()
Returns the running time of the structure alignment calculation, in milliseconds.- Returns:
- long running time of the calculation, or null if unset
- See Also:
getIoTime()
-
setCalculationTime
void setCalculationTime(Long millis)
Set the running time spent to calculate this alignment.- Parameters:
millis
-
-
clear
void clear()
Clear scores and other properties which depend on the specific alignment. This frees memory and ensures consistency of the cached variables.Recursively clears the member MultipleAlignments.
-
-