calhoun.seq
Interface FastaSequence

All Known Implementing Classes:
FastaIterator.ReaderSequence, SimpleFastaSequence

public interface FastaSequence

Represents a generic sequence in a fasta file. FastaIterator and FastaReader have different classes that they store the result in, but these methods are common. Unifies the Fasta classes so you can more easily intermix them.


Method Summary
 java.lang.String getHeader()
          Gets the fasta header (with leading and trailing spaces trimmed)
 int getLength()
          The number of sequence characters
 byte[] getQuality()
          Returns the quality scores for this sequence.
 java.lang.String getSequence()
          Returns the entire sequence.
 java.lang.String getSequence(int start, int stop)
          Returns a portions of the sequence.
 

Method Detail

getLength

int getLength()
The number of sequence characters


getHeader

java.lang.String getHeader()
Gets the fasta header (with leading and trailing spaces trimmed)


getSequence

java.lang.String getSequence()
Returns the entire sequence.


getSequence

java.lang.String getSequence(int start,
                             int stop)
Returns a portions of the sequence.

Parameters:
start - 1-based index of the first character to return. Can be from 1 to the length of the sequence.
stop - 1-based index of the last charater to return. Can be from 1 to the length of the sequence.

getQuality

byte[] getQuality()
Returns the quality scores for this sequence. May be null if no quality is present.