Class MultipleAlignmentEnsembleImpl
- All Implemented Interfaces:
Serializable,Cloneable,MultipleAlignmentEnsemble,ScoresCache
MultipleAlignmentEnsemble.- Since:
- 4.1.0
- Author:
- Aleix Lafita
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault 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 TypeMethodDescriptionvoidaddMultipleAlignment(MultipleAlignment alignment) Add a new MultipleAlignment to the end of the ensemble and set its parent ensemble to this.voidclear()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.voidsetAlgorithmName(String algorithmName) Set the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.voidsetAtomArrays(List<Atom[]> atomArrays) Sets the List of Atom arrays.voidsetCalculationTime(Long millis) Set the running time spent to calculate this alignment.voidSet the IO time to load this objectvoidsetMultipleAlignments(List<MultipleAlignment> alignments) Set the List of MultipleAlignments in the ensemble.voidsetStructureIdentifiers(List<StructureIdentifier> structureNames) Set the List containing the names of the structures aligned (i.e.: PDB code, SCOP domain, etc.).voidsetVersion(String version) Sets the version of the algorithm used to generate the MultipleAlignment objects.intsize()Returns the number of aligned structures in the MultipleAlignments.voidForce the atom arrays to regenerate based ongetStructureIdentifiers().voidForce recalculation of the distance matrices.Methods inherited from class org.biojava.nbio.structure.align.multiple.AbstractScoresCache
clone, getScore, getScores, putScoreMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:MultipleAlignmentEnsembleCreates and returns an identical copy of this ensemble, including a deep clone of all constituent alignments.- Specified by:
clonein interfaceMultipleAlignmentEnsemble- Overrides:
clonein classObject- Returns:
- MultipleAlignmentEnsemble identical copy of this object.
-
getAlgorithmName
Description copied from interface:MultipleAlignmentEnsembleReturns the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.- Specified by:
getAlgorithmNamein interfaceMultipleAlignmentEnsemble- Returns:
- String name of the algorithm.
- See Also:
-
setAlgorithmName
Description copied from interface:MultipleAlignmentEnsembleSet the name of the multiple structure alignment algorithm that created the MultipleAlignment objects.- Specified by:
setAlgorithmNamein interfaceMultipleAlignmentEnsemble- Parameters:
algorithmName- name of the algorithm.- See Also:
-
getVersion
Description copied from interface:MultipleAlignmentEnsembleReturns the version of the algorithm used to generate the MultipleAlignment objects.- Specified by:
getVersionin interfaceMultipleAlignmentEnsemble- Returns:
- String version of the algorithm.
- See Also:
-
setVersion
Description copied from interface:MultipleAlignmentEnsembleSets the version of the algorithm used to generate the MultipleAlignment objects.- Specified by:
setVersionin interfaceMultipleAlignmentEnsemble- Parameters:
version- the version of the algorithm.- See Also:
-
getIoTime
Description copied from interface:MultipleAlignmentEnsembleReturns the io time for this object, in milliseconds.- Specified by:
getIoTimein interfaceMultipleAlignmentEnsemble- Returns:
- long creation time, or null if unset
-
setIoTime
Description copied from interface:MultipleAlignmentEnsembleSet the IO time to load this object- Specified by:
setIoTimein interfaceMultipleAlignmentEnsemble- Parameters:
millis-
-
getCalculationTime
Description copied from interface:MultipleAlignmentEnsembleReturns the running time of the structure alignment calculation, in milliseconds.- Specified by:
getCalculationTimein interfaceMultipleAlignmentEnsemble- Returns:
- long running time of the calculation, or null if unset
- See Also:
-
setCalculationTime
Description copied from interface:MultipleAlignmentEnsembleSet the running time spent to calculate this alignment.- Specified by:
setCalculationTimein interfaceMultipleAlignmentEnsemble- Parameters:
millis-
-
getStructureIdentifiers
Description copied from interface:MultipleAlignmentEnsembleReturns 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:
getStructureIdentifiersin interfaceMultipleAlignmentEnsemble- Returns:
- List of String names of the structures
- See Also:
-
setStructureIdentifiers
Description copied from interface:MultipleAlignmentEnsembleSet 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:
setStructureIdentifiersin interfaceMultipleAlignmentEnsemble- Parameters:
structureNames- names of the structures, structure identifiers- See Also:
-
getAtomArrays
Description copied from interface:MultipleAlignmentEnsembleGet 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:
getAtomArraysin interfaceMultipleAlignmentEnsemble- Returns:
- List of Atom[].
- See Also:
-
setAtomArrays
Description copied from interface:MultipleAlignmentEnsembleSets 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:
setAtomArraysin interfaceMultipleAlignmentEnsemble- Parameters:
atomArrays- the List of representative (C-alpha) atom arrays- See Also:
-
updateAtomArrays
Force the atom arrays to regenerate based ongetStructureIdentifiers().- Throws:
IOExceptionStructureException
-
getDistanceMatrix
Description copied from interface:MultipleAlignmentEnsembleReturns the List containing the interatomic distance Matrix of each structure.- Specified by:
getDistanceMatrixin interfaceMultipleAlignmentEnsemble- Returns:
- List of Matrix interatomic distance matrices.
-
updateDistanceMatrix
Force recalculation of the distance matrices. -
getMultipleAlignments
Description copied from interface:MultipleAlignmentEnsembleReturns the List of MultipleAlignments in the ensemble.- Specified by:
getMultipleAlignmentsin interfaceMultipleAlignmentEnsemble- Returns:
- List of MultipleAlignment in the ensemble.
-
getMultipleAlignment
Description copied from interface:MultipleAlignmentEnsembleReturns the MultipleAlignments at the specified index in the ensemble. Throws an exception equivalently to accessing an index of a List- Specified by:
getMultipleAlignmentin interfaceMultipleAlignmentEnsemble- Returns:
- MultipleAlignment at the index in the ensemble.
-
setMultipleAlignments
Description copied from interface:MultipleAlignmentEnsembleSet the List of MultipleAlignments in the ensemble.- Specified by:
setMultipleAlignmentsin interfaceMultipleAlignmentEnsemble- Parameters:
alignments- List of MultipleAlignments that are part of the ensemble.- See Also:
-
addMultipleAlignment
Description copied from interface:MultipleAlignmentEnsembleAdd a new MultipleAlignment to the end of the ensemble and set its parent ensemble to this.- Specified by:
addMultipleAlignmentin interfaceMultipleAlignmentEnsemble- Parameters:
alignment-
-
size
Description copied from interface:MultipleAlignmentEnsembleReturns the number of aligned structures in the MultipleAlignments.- Specified by:
sizein interfaceMultipleAlignmentEnsemble- Returns:
- int number of aligned structures.
- See Also:
-
clear
Description copied from class:AbstractScoresCacheClear the cached scores. This frees memory after the alignment changed.- Specified by:
clearin interfaceMultipleAlignmentEnsemble- Overrides:
clearin classAbstractScoresCache
-