public class MultipleAlignmentImpl extends AbstractScoresCache implements java.io.Serializable, MultipleAlignment, java.lang.Cloneable
MultipleAlignment.| Constructor and Description |
|---|
MultipleAlignmentImpl()
Default Constructor.
|
MultipleAlignmentImpl(java.util.List<java.lang.String> structureNames)
Constructor that allows creating a MultipleAlignment instance without caring about the ensemble.
|
MultipleAlignmentImpl(MultipleAlignmentEnsemble ensemble)
Constructor linking to an existing ensemble.
|
MultipleAlignmentImpl(MultipleAlignmentImpl ma)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Resets all scores
|
MultipleAlignmentImpl |
clone()
Creates and returns an identical copy of this alignment, including a deep
clone of all constituent blocks sets.
|
java.util.List<Block> |
getBlocks()
Convenience method to get a list of all blocks from all blocksets
|
java.util.List<BlockSet> |
getBlockSets()
Returns the BlockSet List of the multiple structure alignment.
|
int |
getCoreLength()
Returns the number of aligned residues (columns) without gaps in the alignment:
the sum of all BlockSet core lengths.
|
MultipleAlignmentEnsemble |
getEnsemble()
Returns the parent Ensemble of the MultipleAlignment.
|
java.util.List<Matrix4d> |
getTransformations()
Returns a transformation 4D 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 multiple alignment:
the sum of all BlockSet lengths.
|
void |
setBlockSets(java.util.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.
|
void |
setTransformations(java.util.List<Matrix4d> matrices)
Set a new superposition for the structures.
|
int |
size()
Returns the number of aligned structures in the MultipleAlignment.
|
java.lang.String |
toString()
Return a summary of the MultipleAlignment, containing the structures, the lengths and the
cached scores.
|
protected void |
updateCache()
Updates all cached properties
|
protected void |
updateCoreLength()
Force recalculation of the core length (ungapped columns) based on the block core lengths
|
protected void |
updateLength()
Force recalculation of the length (aligned columns) based on the block lengths
|
clone, getScore, getScores, putScoreequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetScore, getScores, putScorepublic MultipleAlignmentImpl()
public MultipleAlignmentImpl(java.util.List<java.lang.String> structureNames)
structureNames - List of Structure identifiers.public MultipleAlignmentImpl(MultipleAlignmentEnsemble ensemble)
ensemble - parent MultipleAlignmentEnsemble.public MultipleAlignmentImpl(MultipleAlignmentImpl ma)
ma - MultipleAlignmentImpl to copy.public void clear()
AbstractScoresCacheclear in interface MultipleAlignmentclear in class AbstractScoresCachepublic MultipleAlignmentImpl clone()
MultipleAlignmentclone in interface MultipleAlignmentclone in class java.lang.Objectpublic java.lang.String toString()
MultipleAlignmenttoString in interface MultipleAlignmenttoString in class java.lang.Objectpublic java.util.List<BlockSet> getBlockSets()
MultipleAlignmentgetBlockSets in interface MultipleAlignment#getBlockSetNum(),
MultipleAlignment.setBlockSets(List)public java.util.List<Block> getBlocks()
MultipleAlignmentgetBlocks in interface MultipleAlignmentpublic void setBlockSets(java.util.List<BlockSet> blockSets)
MultipleAlignmentsetBlockSets in interface MultipleAlignmentblockSets - the List of BlockSets that describe the aligned residues.MultipleAlignment.getBlockSets()public java.util.List<Matrix4d> getTransformations()
MultipleAlignment
Individual BlockSets may override the transformation matrix for particular
substructures. Flexible alignments will generally return null from
this method, while rigid-body methods would typically store the global
matrices here and return null for BlockSet.getTransformations().
getTransformations in interface MultipleAlignmentpublic void setTransformations(java.util.List<Matrix4d> matrices)
MultipleAlignmentThis may trigger other properties to update which depend on the superposition. In particular, the list of scores should be reset by implementations after changing the transformation matrices.
setTransformations in interface MultipleAlignmentpublic int size()
MultipleAlignmentsize in interface MultipleAlignmentMultipleAlignment.length(),
MultipleAlignment.getCoreLength(),
#getBlockSetNum()public int length()
MultipleAlignmentlength in interface MultipleAlignment#updateLength(),
MultipleAlignment.getCoreLength(),
MultipleAlignment.size(),
#getBlockSetNum()public int getCoreLength()
MultipleAlignmentgetCoreLength in interface MultipleAlignment#updateCoreLength(),
MultipleAlignment.length(),
MultipleAlignment.size(),
#getBlockNum()protected void updateLength()
protected void updateCoreLength()
protected void updateCache()
StructureExceptionpublic MultipleAlignmentEnsemble getEnsemble()
MultipleAlignmentgetEnsemble in interface MultipleAlignment#setParent(MultipleAlignmentEnsemble)public void setEnsemble(MultipleAlignmentEnsemble parent)
MultipleAlignmentNeither 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.
setEnsemble in interface MultipleAlignmentparent - the parent MultipleAlignmentEnsemble.MultipleAlignment.getEnsemble()