Interface MultipleAlignment

  • All Superinterfaces:
    ScoresCache
    All Known Implementing Classes:
    MultipleAlignmentImpl

    public interface MultipleAlignment
    extends ScoresCache
    A MultipleAlignment is a Data Structure to store the core information of a multiple structure alignment, as a return type.

    Each alignment is described as a collection of:

    • BlockSets that define the aligned positions and 3D superposition,
    • Structure identifiers (i,e. Atom arrays, structure names),
    • Creation properties (algorithm, version, etc).
    A collection of MultipleAlignments that share the same structures and creation properties are part of the same MultipleAlignmentEnsemble. Every MultipleAlignment has a MultipleAlignmentEnsemble as its parent, which contains the shared meta-information.
    Since:
    4.1.0
    Author:
    Aleix Lafita, Spencer Bliven
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Clear scores and other properties which depend on the specific alignment.
      MultipleAlignment 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.
    • Method Detail

      • clone

        MultipleAlignment clone()
        Creates and returns an identical copy of this alignment, including a deep copy of all constituent BlockSets.
        Returns:
        MultipleAlignment identical copy of this object.
      • setEnsemble

        void setEnsemble​(MultipleAlignmentEnsemble parent)
        Set the back-reference to its parent Ensemble.

        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.

        Parameters:
        parent - the parent MultipleAlignmentEnsemble.
        See Also:
        getEnsemble()
      • getBlockSets

        List<BlockSetgetBlockSets()
        Returns the BlockSet List of the multiple structure alignment. Initializes the variable if it is null.
        Returns:
        List of BlockSets that describe the aligned residues of all the structures.
        See Also:
        getBlocks(), setBlockSets(List)
      • getBlockSet

        BlockSet getBlockSet​(int index)
        Returns the BlockSet with the specified index of the MultipleAlignment. Throws an Exception if the index is out of bounds, like accessing a normal List.
        Parameters:
        index - of the BlockSet
        Returns:
        BlockSets at the specified index
        See Also:
        getBlocks(), getBlockSets()
      • setBlockSets

        void setBlockSets​(List<BlockSet> blockSets)
        Sets the List of BlockSet List of the specified alignment.
        Parameters:
        blockSets - the List of BlockSets that describe the aligned residues.
        See Also:
        getBlockSets()
      • getBlocks

        List<BlockgetBlocks()
        Convenience method to get a List of all Blocks from all BlockSets. Modifications of this List will not alter the MultipleAlignment, but modifications to the Blocks will.
        Returns:
        List of Blocks
        See Also:
        getBlockSets()
      • getBlock

        Block getBlock​(int index)
        Returns the Block with the specified index of the MultipleAlignment. Throws an Exception if the index is out of bounds, like accessing a normal List.
        Parameters:
        index - of the BlockSet
        Returns:
        Block at the specified index
        See Also:
        getBlocks(), getBlockSets()
      • getAtomArrays

        List<Atom[]> getAtomArrays()
        Returns the array of Atoms for each structure from its parent Ensemble. Throws an Exception if the parent ensemble is null or the Atom variables are not previously set.
        Returns:
        List of Atom arrays
        See Also:
        getEnsemble()
      • getStructureIdentifier

        StructureIdentifier getStructureIdentifier​(int index)
        Returns the StructureIdentifier associated with the structure index from its parent Ensemble. Throws an Exception if the parent ensemble is null or the StructureIdentifiers are not previously set.
        Returns:
        StructureIdentifier
        See Also:
        getEnsemble()
      • size

        int size()
        Returns the number of aligned structures in the MultipleAlignment.
        Returns:
        int number of aligned structures
        See Also:
        length(), getCoreLength()
      • length

        int length()
        Returns the total number of aligned residues (columns) in the multiple alignment: the sum of all BlockSet lengths.
        Returns:
        int the total number of aligned residues in the alignment.
        See Also:
        getCoreLength(), size()
      • getCoreLength

        int getCoreLength()
        Returns the number of aligned residues (columns) without gaps in the alignment: the sum of all BlockSet core lengths.
        Returns:
        int the total number of aligned residues.
        See Also:
        length(), size()
      • getAlignResCounts

        List<IntegergetAlignResCounts()
        Returns the number of non null positions (residues) of each structure in the alignment. The values can be used to compute the coverages.
        Returns:
        List of residue counts for each structure
      • getCoverages

        List<DoublegetCoverages()
        Returns the coverage of the alignment for each structure in the alignment as a fraction between 0.0 and 1.0.
        Returns:
        List coverage for each 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.

        Recursively clears member BlockSets.

      • toString

        String toString()
        Return a summary of the MultipleAlignment, containing the structures, the lengths and the cached scores. Can be used as a header for the differnt display options.
        Overrides:
        toString in class Object
        Returns:
        String header summary of the MultipleAlignment