    001    package calhoun.seq;
    002
    003    /**
    004     * Represents a generic sequence in a fasta file.  FastaIterator and FastaReader
    005     * have different classes that they store the result in, but these methods are
    006     * common.  Unifies the Fasta classes so you can more easily intermix them.
    007     */
    008    public interface FastaSequence {
    009            /** The number of sequence characters */
    010            public int getLength();
    011
    012            /** Gets the fasta header (with leading and trailing spaces trimmed) */
    013            public String getHeader();
    014
    015            /** Returns the entire sequence.  */
    016            public String getSequence();
    017
    018            /** Returns a portions of the sequence.
    019             * @param start 1-based index of the first character to return.  Can be from 1 to the length of the sequence.
    020             * @param stop 1-based index of the last charater to return.  Can be from 1 to the length of the sequence.
    021             */
    022            public String getSequence(int start, int stop);
    023
    024            /** Returns the quality scores for this sequence.  May be null if no quality is present. */
    025            public byte[] getQuality();
    026    }