Interface MultipleAlignment
- All Superinterfaces:
ScoresCache
- All Known Implementing Classes:
MultipleAlignmentImpl
A MultipleAlignment is a Data Structure to store the core information of a
multiple structure alignment, as a return type.
Each alignment is described as a collection of:
BlockSet
s that define the aligned positions and 3D superposition,- Structure identifiers (i,e. Atom arrays, structure names),
- Creation properties (algorithm, version, etc).
MultipleAlignmentEnsemble
.
Every MultipleAlignment has a MultipleAlignmentEnsemble
as its
parent, which contains the shared meta-information.- Since:
- 4.1.0
- Author:
- Aleix Lafita, Spencer Bliven
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear scores and other properties which depend on the specific alignment.clone()
Creates and returns an identical copy of this alignment, including a deep copy of all constituent BlockSets.Returns the number of non null positions (residues) of each structure in the alignment.Returns the array of Atoms for each structure from its parent Ensemble.getBlock
(int index) Returns the Block with the specified index of the MultipleAlignment.Convenience method to get a List of all Blocks from all BlockSets.getBlockSet
(int index) Returns the BlockSet with the specified index of the MultipleAlignment.Returns the BlockSet List of the multiple structure alignment.int
Returns the number of aligned residues (columns) without gaps in the alignment: the sum of all BlockSet core lengths.Returns the coverage of the alignment for each structure in the alignment as a fraction between 0.0 and 1.0.Returns the parent Ensemble of the MultipleAlignment.getStructureIdentifier
(int index) Returns the StructureIdentifier associated with the structure index from its parent Ensemble.int
length()
Returns the total number of aligned residues (columns) in the multiple alignment: the sum of all BlockSet lengths.void
setBlockSets
(List<BlockSet> blockSets) Sets the List of BlockSet List of the specified alignment.void
setEnsemble
(MultipleAlignmentEnsemble parent) Set the back-reference to its parent Ensemble.int
size()
Returns the number of aligned structures in the MultipleAlignment.toString()
Return a summary of the MultipleAlignment, containing the structures, the lengths and the cached scores.Methods inherited from interface org.biojava.nbio.structure.align.multiple.ScoresCache
getScore, getScores, putScore
-
Method Details
-
clone
MultipleAlignment clone()Creates and returns an identical copy of this alignment, including a deep copy of all constituent BlockSets.- Returns:
- MultipleAlignment identical copy of this object.
-
getEnsemble
MultipleAlignmentEnsemble getEnsemble()Returns the parent Ensemble of the MultipleAlignment. Returns null if there is no referenced object.- Returns:
- MultipleAlignmentEnsemble the parent MultipleAlignment of the BlockSet, or null.
- See Also:
-
setEnsemble
Set the back-reference to its parent Ensemble.Neither removes this alignment from its previous ensemble, if any, nor adds it to the new parent. Calling code should assure that links to and from the ensemble are consistent and free of memory leaks.
- Parameters:
parent
- the parent MultipleAlignmentEnsemble.- See Also:
-
getBlockSets
Returns the BlockSet List of the multiple structure alignment. Initializes the variable if it is null.- Returns:
- List of BlockSets that describe the aligned residues of all the structures.
- See Also:
-
getBlockSet
Returns the BlockSet with the specified index of the MultipleAlignment. Throws an Exception if the index is out of bounds, like accessing a normal List.- Parameters:
index
- of the BlockSet- Returns:
- BlockSets at the specified index
- See Also:
-
setBlockSets
Sets the List of BlockSet List of the specified alignment.- Parameters:
blockSets
- the List of BlockSets that describe the aligned residues.- See Also:
-
getBlocks
Convenience method to get a List of all Blocks from all BlockSets. Modifications of this List will not alter the MultipleAlignment, but modifications to the Blocks will.- Returns:
- List of Blocks
- See Also:
-
getBlock
Returns the Block with the specified index of the MultipleAlignment. Throws an Exception if the index is out of bounds, like accessing a normal List.- Parameters:
index
- of the BlockSet- Returns:
- Block at the specified index
- See Also:
-
getAtomArrays
Returns the array of Atoms for each structure from its parent Ensemble. Throws an Exception if the parent ensemble is null or the Atom variables are not previously set.- Returns:
- List of Atom arrays
- See Also:
-
getStructureIdentifier
Returns the StructureIdentifier associated with the structure index from its parent Ensemble. Throws an Exception if the parent ensemble is null or the StructureIdentifiers are not previously set.- Returns:
- StructureIdentifier
- See Also:
-
size
int size()Returns the number of aligned structures in the MultipleAlignment.- Returns:
- int number of aligned structures
- See Also:
-
length
int length()Returns the total number of aligned residues (columns) in the multiple alignment: the sum of all BlockSet lengths.- Returns:
- int the total number of aligned residues in the alignment.
- See Also:
-
getCoreLength
int getCoreLength()Returns the number of aligned residues (columns) without gaps in the alignment: the sum of all BlockSet core lengths. -
getAlignResCounts
Returns the number of non null positions (residues) of each structure in the alignment. The values can be used to compute the coverages.- Returns:
- List of residue counts for each structure
-
getCoverages
Returns the coverage of the alignment for each structure in the alignment as a fraction between 0.0 and 1.0.- Returns:
- List coverage for each structure
-
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 member BlockSets.
-
toString
String toString()Return a summary of the MultipleAlignment, containing the structures, the lengths and the cached scores. Can be used as a header for the differnt display options.
-