Class MultipleSequenceAlignment<S extends Sequence<C>,​C extends Compound>

  • All Implemented Interfaces:
    LightweightProfile<S,​C>

    public class MultipleSequenceAlignment<S extends Sequence<C>,​C extends Compound>
    extends java.lang.Object
    implements LightweightProfile<S,​C>
    Implements a minimal data structure for reading and writing a sequence alignment. The full Profile data structure in the alignment module provides additional functionality.
    Author:
    Scooter Willis, Mark Chapman
    • Constructor Detail

      • MultipleSequenceAlignment

        public MultipleSequenceAlignment()
    • Method Detail

      • addAlignedSequence

        public void addAlignedSequence​(S sequence)
        A sequence that has been aligned to other sequences will have inserts.
        Parameters:
        sequence -
      • removeAlignedSequence

        public boolean removeAlignedSequence​(S sequence)
        Remove a sequence
        Parameters:
        sequence -
        Returns:
        flag
      • getCompoundsAt

        public java.util.List<C> getCompoundsAt​(int alignmentIndex)
        Get a list of compounds at a sequence position
        Specified by:
        getCompoundsAt in interface LightweightProfile<S extends Sequence<C>,​C extends Compound>
        Parameters:
        alignmentIndex -
        Returns:
        compounds
      • getLength

        public int getLength()
        Get the length of the MSA where it is assumed that all sequence position
        Specified by:
        getLength in interface LightweightProfile<S extends Sequence<C>,​C extends Compound>
        Returns:
        length of MSA
      • toString

        public java.lang.String toString​(int width)
        Get a string representation of the MSA with a fixed width
        Specified by:
        toString in interface LightweightProfile<S extends Sequence<C>,​C extends Compound>
        Parameters:
        width -
        Returns:
        String
      • toString

        public java.lang.String toString()
        String representation of the MSA
        Specified by:
        toString in interface LightweightProfile<S extends Sequence<C>,​C extends Compound>
        Overrides:
        toString in class java.lang.Object
        Returns:
        String