Interface Block
- All Superinterfaces:
ScoresCache
- All Known Implementing Classes:
BlockImpl
A Block is a Data Structure that stores aligned positions of a
MultipleAlignment
with the condition that residues are in a
sequential order.
A collection of Blocks, named BlockSet
, allows the description of
circular permutations (CP) and non-topological alignments.
Every Block object is part of a BlockSet
instance, its parent, which
has in turn a MultipleAlignment
instance as parent.
- 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 block.Returns the double List containing the aligned residues for each structure.Returns the number of non null positions (residues) of each structure in the alignment Block.Returns the parent BlockSet of the Block.int
Returns the number of aligned positions (columns) without gaps in the Block.int
getFinalIndex
(int str) Calculates and returns the last position of the specified structure in the alignment that is not null.int
getFinalResidue
(int str) Calculates and returns the last residue of the specified structure in the alignment that is not null.int
getStartIndex
(int str) Calculates and returns the first position of the specified structure in the alignment that is not null.int
getStartResidue
(int str) Calculates and returns the first residue of the specified structure in the alignment that is not null.int
length()
Returns the total number of aligned positions (columns) in the Block.void
setAlignRes
(List<List<Integer>> alignRes) Set the double List containing the aligned residues for each structure.void
setBlockSet
(BlockSet parent) Set the back-reference to its parent BlockSet.int
size()
Returns the number of aligned structures (rows) in the Block.Methods inherited from interface org.biojava.nbio.structure.align.multiple.ScoresCache
getScore, getScores, putScore
-
Method Details
-
clone
Block clone()Creates and returns an identical copy of this block.- Returns:
- Block identical copy of this object.
-
setBlockSet
Set the back-reference to its parent BlockSet.- Parameters:
parent
- the parent BlockSet.- See Also:
-
getBlockSet
BlockSet getBlockSet()Returns the parent BlockSet of the Block. Returns null if there is no referenced object.- Returns:
- BlockSet the parent BlockSet of the Block, or null.
- See Also:
-
getAlignRes
Returns the double List containing the aligned residues for each structure.alignRes.get(structure).get(residue) = alignRes.get(size).get(length).
- Returns:
- List a double List of aligned residues for each structure.
- See Also:
-
#setAlignRes()
-
setAlignRes
Set the double List containing the aligned residues for each structure.- Parameters:
alignRes
- a double List of Integers with the aligned residues.- See Also:
-
length
int length()Returns the total number of aligned positions (columns) in the Block.- Returns:
- int number of aligned residues.
- See Also:
-
size
int size()Returns the number of aligned structures (rows) in the Block.- Returns:
- int number of aligned structures.
- See Also:
-
getCoreLength
int getCoreLength()Returns the number of aligned positions (columns) without gaps in the Block. -
getAlignResCounts
Returns the number of non null positions (residues) of each structure in the alignment Block. The values can be used to compute the coverages.- Returns:
- List of residue counts for each structure
-
getStartIndex
int getStartIndex(int str) Calculates and returns the first position of the specified structure in the alignment that is not null. This will return the aligment index, not the reisude aligned in that position.- Parameters:
str
- structure index- Returns:
- the first non null aligned position of the structure
-
getStartResidue
int getStartResidue(int str) Calculates and returns the first residue of the specified structure in the alignment that is not null. This will return the aligned residue, not the alignment index.- Parameters:
str
- structure index- Returns:
- the first non null aligned residue of the structure
-
getFinalIndex
int getFinalIndex(int str) Calculates and returns the last position of the specified structure in the alignment that is not null. This will return the aligment index, not the reisude aligned in that position.- Parameters:
str
- structure index- Returns:
- the last non null aligned position of the structure
-
getFinalResidue
int getFinalResidue(int str) Calculates and returns the last residue of the specified structure in the alignment that is not null. This will return the aligned residue, not the alignment index.- Parameters:
str
- structure index- Returns:
- the last non null aligned residue of the 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.
-