Class BlockImpl

    • Constructor Detail

      • BlockImpl

        public BlockImpl​(BlockSet blockSet)
        Constructor. Links also the parent to this instance, by adding the Block to the parent's list.
        Parameters:
        blockSet - the parent BlockSet of the BlockImpl instance.
      • BlockImpl

        public BlockImpl​(BlockImpl b)
        Copy constructor.
        Parameters:
        b - BlockImpl object to be copied.
    • Method Detail

      • clone

        public Block clone()
        Description copied from interface: Block
        Creates and returns an identical copy of this block.
        Specified by:
        clone in interface Block
        Overrides:
        clone in class Object
        Returns:
        Block identical copy of this object.
      • getAlignRes

        public List<List<Integer>> getAlignRes()
        Description copied from interface: Block
        Returns the double List containing the aligned residues for each structure.

        alignRes.get(structure).get(residue) = alignRes.get(size).get(length).

        Specified by:
        getAlignRes in interface Block
        Returns:
        List a double List of aligned residues for each structure.
        See Also:
        #setAlignRes()
      • setAlignRes

        public void setAlignRes​(List<List<Integer>> alignRes)
        Description copied from interface: Block
        Set the double List containing the aligned residues for each structure.
        Specified by:
        setAlignRes in interface Block
        Parameters:
        alignRes - a double List of Integers with the aligned residues.
        See Also:
        Block.getAlignRes()
      • length

        public int length()
        Description copied from interface: Block
        Returns the total number of aligned positions (columns) in the Block.
        Specified by:
        length in interface Block
        Returns:
        int number of aligned residues.
        See Also:
        Block.size()
      • getCoreLength

        public int getCoreLength()
        Description copied from interface: Block
        Returns the number of aligned positions (columns) without gaps in the Block.
        Specified by:
        getCoreLength in interface Block
        Returns:
        int number of aligned residues.
        See Also:
        #updateCoreLength(), Block.length(), Block.size()
      • getStartIndex

        public int getStartIndex​(int str)
        Description copied from interface: Block
        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.
        Specified by:
        getStartIndex in interface Block
        Parameters:
        str - structure index
        Returns:
        the first non null aligned position of the structure
      • getStartResidue

        public int getStartResidue​(int str)
        Description copied from interface: Block
        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.
        Specified by:
        getStartResidue in interface Block
        Parameters:
        str - structure index
        Returns:
        the first non null aligned residue of the structure
      • getFinalIndex

        public int getFinalIndex​(int str)
        Description copied from interface: Block
        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.
        Specified by:
        getFinalIndex in interface Block
        Parameters:
        str - structure index
        Returns:
        the last non null aligned position of the structure
      • getFinalResidue

        public int getFinalResidue​(int str)
        Description copied from interface: Block
        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.
        Specified by:
        getFinalResidue in interface Block
        Parameters:
        str - structure index
        Returns:
        the last non null aligned residue of the structure
      • getAlignResCounts

        public List<IntegergetAlignResCounts()
        Description copied from interface: Block
        Returns the number of non null positions (residues) of each structure in the alignment Block. The values can be used to compute the coverages.
        Specified by:
        getAlignResCounts in interface Block
        Returns:
        List of residue counts for each structure