Class BlockSetImpl
java.lang.Object
org.biojava.nbio.structure.align.multiple.AbstractScoresCache
org.biojava.nbio.structure.align.multiple.BlockSetImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,BlockSet
,ScoresCache
A general implementation of a BlockSet to store a flexible part of a multiple
alignment.
- Since:
- 4.1.0
- Author:
- Aleix Lafita
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the cached scores.clone()
Creates and returns an identical copy of this blockset, including a deep copy of all constituentBlock
s.Returns the number of non null positions (residues) of each structure in the alignment Block Set.Returns the List of alignment Blocks of the BlockSet.int
Returns the number of aligned residues (columns) without gaps in the alignment: the sum of all Block core lengths.Returns the parent MultipleAlignment of the BlockSet.List<javax.vecmath.Matrix4d>
Returns a transformation matrix for each structure giving the 3D superimposition information of the multiple structure alignment.int
length()
Returns the total number of aligned residues (columns) in the alignment: the sum of all Block lengths.void
Set the List of alignment Blocks of the BlockSet.void
Set the back-reference to its parent MultipleAlignment.void
setTransformations
(List<javax.vecmath.Matrix4d> transformations) Set a new superposition for the structures.int
size()
Returns the number of aligned structures in the BlockSet.toString()
protected void
protected void
protected void
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, wait, wait, wait
Methods inherited from interface org.biojava.nbio.structure.align.multiple.ScoresCache
getScore, getScores, putScore
-
Constructor Details
-
BlockSetImpl
Constructor. Links also the parent to this instance by adding the BlockSet to the parent's List.- Parameters:
alignment
- MultipleAlignment parent of the BlockSet.
-
BlockSetImpl
Copy constructor. Makes also a deep copy of all constituentBlock
s.- Parameters:
bs
- BlockSet object to be copied.
-
-
Method Details
-
clear
public void clear()Description copied from class:AbstractScoresCache
Clear the cached scores. This frees memory after the alignment changed.- Specified by:
clear
in interfaceBlockSet
- Overrides:
clear
in classAbstractScoresCache
-
clone
Description copied from interface:BlockSet
Creates and returns an identical copy of this blockset, including a deep copy of all constituentBlock
s. -
toString
-
getMultipleAlignment
Description copied from interface:BlockSet
Returns the parent MultipleAlignment of the BlockSet. Returns null if there is no referenced object.- Specified by:
getMultipleAlignment
in interfaceBlockSet
- Returns:
- MultipleAlignment the parent MultipleAlignment of the BlockSet, or null.
- See Also:
-
setMultipleAlignment
Description copied from interface:BlockSet
Set the back-reference to its parent MultipleAlignment.Neither removes this BlockSet from its previous alignment, 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.
- Specified by:
setMultipleAlignment
in interfaceBlockSet
- Parameters:
parent
- the parent MultipleAlignment.- See Also:
-
getBlocks
Description copied from interface:BlockSet
Returns the List of alignment Blocks of the BlockSet. It initializes a new List of Blocks if it is null. -
setBlocks
Description copied from interface:BlockSet
Set the List of alignment Blocks of the BlockSet.Also calls
Block.setBlockSet(BlockSet)
for each argument -
getTransformations
Description copied from interface:BlockSet
Returns a transformation matrix for each structure giving the 3D superimposition information of the multiple structure alignment.- Specified by:
getTransformations
in interfaceBlockSet
- Returns:
- the 3D superimposition information of the alignment
-
setTransformations
Description copied from interface:BlockSet
Set a new superposition for the structures. This may trigger other properties to update which depend on the superposition.- Specified by:
setTransformations
in interfaceBlockSet
-
length
public int length()Description copied from interface:BlockSet
Returns the total number of aligned residues (columns) in the alignment: the sum of all Block lengths. -
size
public int size()Description copied from interface:BlockSet
Returns the number of aligned structures in the BlockSet. -
getCoreLength
public int getCoreLength()Description copied from interface:BlockSet
Returns the number of aligned residues (columns) without gaps in the alignment: the sum of all Block core lengths.- Specified by:
getCoreLength
in interfaceBlockSet
- Returns:
- int the total number of aligned residues.
- See Also:
-
updateLength
protected void updateLength() -
updateCoreLength
protected void updateCoreLength() -
updateCache
protected void updateCache() -
getAlignResCounts
Description copied from interface:BlockSet
Returns the number of non null positions (residues) of each structure in the alignment Block Set. The values can be used to compute the coverages.- Specified by:
getAlignResCounts
in interfaceBlockSet
- Returns:
- List of residue counts for each structure
-