public class BlockImpl extends AbstractScoresCache implements Serializable, Block, Cloneable
Block
that supports any type of
sequential alignment with gaps.Constructor and Description |
---|
BlockImpl(BlockImpl b)
Copy constructor.
|
BlockImpl(BlockSet blockSet)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cached scores.
|
Block |
clone()
Creates and returns an identical copy of this block.
|
List<List<Integer>> |
getAlignRes()
Returns the double List containing the aligned residues for each
structure.
|
List<Integer> |
getAlignResCounts()
Returns the number of non null positions (residues) of each structure in
the alignment Block.
|
BlockSet |
getBlockSet()
Returns the parent BlockSet of the Block.
|
int |
getCoreLength()
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.
|
String |
toString() |
protected void |
updateCoreLength() |
clone, getScore, getScores, putScore
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getScore, getScores, putScore
public BlockImpl(BlockSet blockSet)
blockSet
- the parent BlockSet of the BlockImpl instance.public Block clone()
Block
public void clear()
AbstractScoresCache
clear
in interface Block
clear
in class AbstractScoresCache
public void setBlockSet(BlockSet parent)
Block
setBlockSet
in interface Block
parent
- the parent BlockSet.Block.getBlockSet()
public BlockSet getBlockSet()
Block
getBlockSet
in interface Block
Block.setBlockSet(BlockSet)
public List<List<Integer>> getAlignRes()
Block
alignRes.get(structure).get(residue) = alignRes.get(size).get(length).
getAlignRes
in interface Block
#setAlignRes()
public void setAlignRes(List<List<Integer>> alignRes)
Block
setAlignRes
in interface Block
alignRes
- a double List of Integers with the aligned residues.Block.getAlignRes()
public int length()
Block
length
in interface Block
Block.getCoreLength();
,
Block.size()
public int size()
Block
size
in interface Block
Block.length()
,
Block.getCoreLength()
public int getCoreLength()
Block
getCoreLength
in interface Block
#updateCoreLength()
,
Block.length()
,
Block.size()
protected void updateCoreLength()
public int getStartIndex(int str)
Block
getStartIndex
in interface Block
str
- structure indexpublic int getStartResidue(int str)
Block
getStartResidue
in interface Block
str
- structure indexpublic int getFinalIndex(int str)
Block
getFinalIndex
in interface Block
str
- structure indexpublic int getFinalResidue(int str)
Block
getFinalResidue
in interface Block
str
- structure indexpublic List<Integer> getAlignResCounts()
Block
getAlignResCounts
in interface Block
Copyright © 2000–2018 BioJava. All rights reserved.