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 Details Link icon

    • getAlignedSequence Link icon

      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
    • getAlignedSequences Link icon

      Returns a List containing the individual Sequences of this alignment.
      Returns:
      list of aligned sequences
    • getCompoundsAt Link icon

      List<C> getCompoundsAt(int alignmentIndex)
      Returns the Compound elements of the original Sequences at the given column.
      Parameters:
      alignmentIndex - column index within an alignment
      Returns:
      the sequence elements
      Throws:
      IndexOutOfBoundsException - if alignmentIndex < 1 or alignmentIndex > getLength()
    • getCompoundSet Link icon

      Returns CompoundSet of all Sequences
      Returns:
      set of Compounds in contained sequences
    • getLength Link icon

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

      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 Link icon

      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 Link icon

      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 Link icon

      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