public class MultipleAlignmentImpl extends AbstractScoresCache implements Serializable, MultipleAlignment, Cloneable
MultipleAlignment
.Constructor and Description |
---|
MultipleAlignmentImpl()
Default Constructor.
|
MultipleAlignmentImpl(MultipleAlignmentEnsemble ensemble)
Constructor linking to an existing ensemble.
|
MultipleAlignmentImpl(MultipleAlignmentImpl ma)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cached scores.
|
MultipleAlignmentImpl |
clone()
Creates and returns an identical copy of this alignment, including a deep
copy of all constituent BlockSets.
|
List<Integer> |
getAlignResCounts()
Returns the number of non null positions (residues) of each structure in
the alignment.
|
List<Atom[]> |
getAtomArrays()
Returns the array of Atoms for each structure from its parent Ensemble.
|
Block |
getBlock(int index)
Returns the Block with the specified index of the MultipleAlignment.
|
List<Block> |
getBlocks()
Convenience method to get a List of all Blocks from all BlockSets.
|
BlockSet |
getBlockSet(int index)
Returns the BlockSet with the specified index of the MultipleAlignment.
|
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.
|
List<Double> |
getCoverages()
Returns the coverage of the alignment for each structure in the
alignment as a fraction between 0.0 and 1.0.
|
MultipleAlignmentEnsemble |
getEnsemble()
Returns the parent Ensemble of the MultipleAlignment.
|
StructureIdentifier |
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.
|
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
BlockSet core lengths.
|
protected void |
updateLength()
Force recalculation of the length (aligned columns) based on the BlockSet
lengths.
|
clone, getScore, getScores, putScore
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getScore, getScores, putScore
public MultipleAlignmentImpl()
public MultipleAlignmentImpl(MultipleAlignmentEnsemble ensemble)
ensemble
- parent MultipleAlignmentEnsemble.public MultipleAlignmentImpl(MultipleAlignmentImpl ma)
ma
- MultipleAlignmentImpl to copy.public void clear()
AbstractScoresCache
clear
in interface MultipleAlignment
clear
in class AbstractScoresCache
public MultipleAlignmentImpl clone()
MultipleAlignment
clone
in interface MultipleAlignment
clone
in class Object
public String toString()
MultipleAlignment
toString
in interface MultipleAlignment
toString
in class Object
public List<BlockSet> getBlockSets()
MultipleAlignment
getBlockSets
in interface MultipleAlignment
MultipleAlignment.getBlocks()
,
MultipleAlignment.setBlockSets(List)
public List<Block> getBlocks()
MultipleAlignment
getBlocks
in interface MultipleAlignment
MultipleAlignment.getBlockSets()
public void setBlockSets(List<BlockSet> blockSets)
MultipleAlignment
setBlockSets
in interface MultipleAlignment
blockSets
- the List of BlockSets that describe the aligned residues.MultipleAlignment.getBlockSets()
public BlockSet getBlockSet(int index)
MultipleAlignment
getBlockSet
in interface MultipleAlignment
index
- of the BlockSetMultipleAlignment.getBlocks()
,
MultipleAlignment.getBlockSets()
public Block getBlock(int index)
MultipleAlignment
getBlock
in interface MultipleAlignment
index
- of the BlockSetMultipleAlignment.getBlocks()
,
MultipleAlignment.getBlockSets()
public List<Atom[]> getAtomArrays()
MultipleAlignment
getAtomArrays
in interface MultipleAlignment
MultipleAlignment.getEnsemble()
public StructureIdentifier getStructureIdentifier(int index)
MultipleAlignment
getStructureIdentifier
in interface MultipleAlignment
MultipleAlignment.getEnsemble()
public int size()
MultipleAlignment
size
in interface MultipleAlignment
MultipleAlignment.length()
,
MultipleAlignment.getCoreLength()
public int length()
MultipleAlignment
length
in interface MultipleAlignment
MultipleAlignment.getCoreLength()
,
MultipleAlignment.size()
public int getCoreLength()
MultipleAlignment
getCoreLength
in interface MultipleAlignment
MultipleAlignment.length()
,
MultipleAlignment.size()
protected void updateLength()
protected void updateCoreLength()
protected void updateCache()
StructureException
public MultipleAlignmentEnsemble getEnsemble()
MultipleAlignment
getEnsemble
in interface MultipleAlignment
MultipleAlignment.setEnsemble(MultipleAlignmentEnsemble)
public void setEnsemble(MultipleAlignmentEnsemble parent)
MultipleAlignment
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.
setEnsemble
in interface MultipleAlignment
parent
- the parent MultipleAlignmentEnsemble.MultipleAlignment.getEnsemble()
public List<Integer> getAlignResCounts()
MultipleAlignment
getAlignResCounts
in interface MultipleAlignment
public List<Double> getCoverages()
MultipleAlignment
getCoverages
in interface MultipleAlignment
Copyright © 2000–2016 BioJava. All rights reserved.