Interface LightweightProfile<S extends Sequence<C>,​C extends Compound>

  • Type Parameters:
    S - each element of the alignment profile is of type S
    C - each element of an Sequence is a Compound of type C
    All Known Implementing Classes:
    MultipleSequenceAlignment

    public interface LightweightProfile<S extends Sequence<C>,​C extends Compound>
    Defines a minimal data structure for reading and writing a sequence alignment. The full Profile data structure in the alignment module provides additional functionality.
    Author:
    Mark Chapman
    • Method Detail

      • getAlignedSequence

        S getAlignedSequence​(int listIndex)
        Returns Sequence at given index.
        Parameters:
        listIndex - index of sequence in profile
        Returns:
        desired sequence
        Throws:
        IndexOutOfBoundsException - if listIndex < 1 or listIndex > number of sequences
      • getLength

        int getLength()
        Returns the number of columns in the alignment profile.
        Returns:
        the number of columns
      • getSize

        int getSize()
        Returns the number of rows in this profile. If any Sequences are circular and overlap within the alignment, the returned size will be greater than the number of sequences, otherwise the numbers will be equal.
        Returns:
        number of rows
      • toString

        String toString()
        Returns a simple view of the alignment profile. This shows each sequence on a separate line (or multiple lines, if circular) and nothing more. This should result in getSize() lines with getLength() Compounds per line.
        Overrides:
        toString in class Object
        Returns:
        a simple view of the alignment profile
      • toString

        String toString​(int width)
        Returns a formatted view of the alignment profile. This shows the start and end indices of the profile for each group of lines of the given width. Each line may also be labeled.
        Parameters:
        width - limit on the line length
        Returns:
        a formatted view of the alignment profile
      • toString

        String toString​(LightweightProfile.StringFormat format)
        Returns a formatted view of the alignment profile. Details depend on the format given.
        Parameters:
        format - output format
        Returns:
        a formatted view of the alignment profile