Class MultipleAlignmentEnsembleImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,MultipleAlignmentEnsemble
,ScoresCache
MultipleAlignmentEnsemble
.- Since:
- 4.1.0
- Author:
- Aleix Lafita
- See Also:
-
Constructor Summary
ConstructorDescriptionDefault Constructor.MultipleAlignmentEnsembleImpl
(List<StructureIdentifier> structureIdentifiers) Constructor using structure identifiers.MultipleAlignmentEnsembleImpl
(AFPChain afp, Atom[] ca1, Atom[] ca2, boolean flexible) Constructor from an AFPChain instance.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMultipleAlignment
(MultipleAlignment alignment) Add a new MultipleAlignment to the end of the ensemble and set its parent ensemble to this.void
clear()
Clear the cached scores.clone()
Creates and returns an identical copy of this ensemble, including a deep clone of all constituent alignments.Returns the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.Get an array of representative atoms for each structure (CA atoms for proteins).Returns the running time of the structure alignment calculation, in milliseconds.Returns the List containing the interatomic distance Matrix of each structure.Returns the io time for this object, in milliseconds.getMultipleAlignment
(int index) Returns the MultipleAlignments at the specified index in the ensemble.Returns the List of MultipleAlignments in the ensemble.Returns a List containing the names of the structures aligned (i.e.: PDB code, SCOP domain, etc.).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
Set the IO time to load this objectvoid
setMultipleAlignments
(List<MultipleAlignment> alignments) Set the List of MultipleAlignments in the ensemble.void
setStructureIdentifiers
(List<StructureIdentifier> structureNames) 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.void
Force the atom arrays to regenerate based ongetStructureIdentifiers()
.void
Force recalculation of the distance matrices.Methods inherited from class org.biojava.nbio.structure.align.multiple.AbstractScoresCache
clone, getScore, getScores, putScore
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.biojava.nbio.structure.align.multiple.ScoresCache
getScore, getScores, putScore
-
Constructor Details
-
MultipleAlignmentEnsembleImpl
public MultipleAlignmentEnsembleImpl()Default Constructor. Empty ensemble, no structures assigned. -
MultipleAlignmentEnsembleImpl
Constructor using structure identifiers.- Parameters:
structureIdentifiers
- List of Structure names, that can be parsed byAtomCache
.
-
MultipleAlignmentEnsembleImpl
Copy constructor. This copies recursively all member variables, including MultipleAlignments, Atom arrays and cached variables.- Parameters:
e
- MultipleAlignmentEnsemble to copy.
-
MultipleAlignmentEnsembleImpl
Constructor from an AFPChain instance. Creates an equivalent pairwise alignment, but in the MultipleAlignment format.- Parameters:
afp
- pairwise alignmentca1
- Atoms of the first strcutureca2
- Atoms of the second structureflexible
- true if the alignment is flexible (use BlockSets)
-
-
Method Details
-
clone
Description copied from interface:MultipleAlignmentEnsemble
Creates and returns an identical copy of this ensemble, including a deep clone of all constituent alignments.- Specified by:
clone
in interfaceMultipleAlignmentEnsemble
- Overrides:
clone
in classObject
- Returns:
- MultipleAlignmentEnsemble identical copy of this object.
-
getAlgorithmName
Description copied from interface:MultipleAlignmentEnsemble
Returns the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.- Specified by:
getAlgorithmName
in interfaceMultipleAlignmentEnsemble
- Returns:
- String name of the algorithm.
- See Also:
-
setAlgorithmName
Description copied from interface:MultipleAlignmentEnsemble
Set the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.- Specified by:
setAlgorithmName
in interfaceMultipleAlignmentEnsemble
- Parameters:
algorithmName
- name of the algorithm.- See Also:
-
getVersion
Description copied from interface:MultipleAlignmentEnsemble
Returns the version of the algorithm used to generate the MultipleAlignment objects.- Specified by:
getVersion
in interfaceMultipleAlignmentEnsemble
- Returns:
- String version of the algorithm.
- See Also:
-
setVersion
Description copied from interface:MultipleAlignmentEnsemble
Sets the version of the algorithm used to generate the MultipleAlignment objects.- Specified by:
setVersion
in interfaceMultipleAlignmentEnsemble
- Parameters:
version
- the version of the algorithm.- See Also:
-
getIoTime
Description copied from interface:MultipleAlignmentEnsemble
Returns the io time for this object, in milliseconds.- Specified by:
getIoTime
in interfaceMultipleAlignmentEnsemble
- Returns:
- long creation time, or null if unset
-
setIoTime
Description copied from interface:MultipleAlignmentEnsemble
Set the IO time to load this object- Specified by:
setIoTime
in interfaceMultipleAlignmentEnsemble
-
getCalculationTime
Description copied from interface:MultipleAlignmentEnsemble
Returns the running time of the structure alignment calculation, in milliseconds.- Specified by:
getCalculationTime
in interfaceMultipleAlignmentEnsemble
- Returns:
- long running time of the calculation, or null if unset
- See Also:
-
setCalculationTime
Description copied from interface:MultipleAlignmentEnsemble
Set the running time spent to calculate this alignment.- Specified by:
setCalculationTime
in interfaceMultipleAlignmentEnsemble
-
getStructureIdentifiers
Description copied from interface:MultipleAlignmentEnsemble
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).
- Specified by:
getStructureIdentifiers
in interfaceMultipleAlignmentEnsemble
- Returns:
- List of String names of the structures
- See Also:
-
setStructureIdentifiers
Description copied from interface:MultipleAlignmentEnsemble
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.
- Specified by:
setStructureIdentifiers
in interfaceMultipleAlignmentEnsemble
- Parameters:
structureNames
- names of the structures, structure identifiers- See Also:
-
getAtomArrays
Description copied from interface:MultipleAlignmentEnsemble
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
MultipleAlignmentEnsemble.setAtomArrays(List)
, attempts to load representative atoms based onMultipleAlignmentEnsemble.getStructureIdentifiers()
. If it fails to load the Atoms it gives a NullPointerException before returning null.- Specified by:
getAtomArrays
in interfaceMultipleAlignmentEnsemble
- Returns:
- List of Atom[].
- See Also:
-
setAtomArrays
Description copied from interface:MultipleAlignmentEnsemble
Sets the List of Atom arrays. Every structure has an Atom array associated. Note that this should be called in conjunction withMultipleAlignmentEnsemble.setStructureIdentifiers(List)
.Setting the atom arrays to null will cause them to be automatically regenerated based on
MultipleAlignmentEnsemble.getStructureIdentifiers()
during the next call toMultipleAlignmentEnsemble.getAtomArrays()
.- Specified by:
setAtomArrays
in interfaceMultipleAlignmentEnsemble
- Parameters:
atomArrays
- the List of representative (C-alpha) atom arrays- See Also:
-
updateAtomArrays
Force the atom arrays to regenerate based ongetStructureIdentifiers()
.- Throws:
IOException
StructureException
-
getDistanceMatrix
Description copied from interface:MultipleAlignmentEnsemble
Returns the List containing the interatomic distance Matrix of each structure.- Specified by:
getDistanceMatrix
in interfaceMultipleAlignmentEnsemble
- Returns:
- List of Matrix interatomic distance matrices.
- See Also:
-
#updateDistanceMatrix()
-
updateDistanceMatrix
public void updateDistanceMatrix()Force recalculation of the distance matrices. -
getMultipleAlignments
Description copied from interface:MultipleAlignmentEnsemble
Returns the List of MultipleAlignments in the ensemble.- Specified by:
getMultipleAlignments
in interfaceMultipleAlignmentEnsemble
- Returns:
- List of MultipleAlignment in the ensemble.
- See Also:
-
#setMultipleAlignments()
-
getMultipleAlignment
Description copied from interface:MultipleAlignmentEnsemble
Returns the MultipleAlignments at the specified index in the ensemble. Throws an exception equivalently to accessing an index of a List- Specified by:
getMultipleAlignment
in interfaceMultipleAlignmentEnsemble
- Returns:
- MultipleAlignment at the index in the ensemble.
- See Also:
-
#setMultipleAlignments()
-
setMultipleAlignments
Description copied from interface:MultipleAlignmentEnsemble
Set the List of MultipleAlignments in the ensemble.- Specified by:
setMultipleAlignments
in interfaceMultipleAlignmentEnsemble
- Parameters:
alignments
- List of MultipleAlignments that are part of the ensemble.- See Also:
-
addMultipleAlignment
Description copied from interface:MultipleAlignmentEnsemble
Add a new MultipleAlignment to the end of the ensemble and set its parent ensemble to this.- Specified by:
addMultipleAlignment
in interfaceMultipleAlignmentEnsemble
-
size
public int size()Description copied from interface:MultipleAlignmentEnsemble
Returns the number of aligned structures in the MultipleAlignments.- Specified by:
size
in interfaceMultipleAlignmentEnsemble
- Returns:
- int number of aligned structures.
- See Also:
-
clear
public void clear()Description copied from class:AbstractScoresCache
Clear the cached scores. This frees memory after the alignment changed.- Specified by:
clear
in interfaceMultipleAlignmentEnsemble
- Overrides:
clear
in classAbstractScoresCache
-