javagene.seq
Interface SeqI

All Known Implementing Classes:
SeqBig, SeqFast, SeqStranded

public interface SeqI

A sequence of either nucleotides or amino acids. Sequences are in IUPAC single letter representation, ie A,C,G,T,U etc. Sequences are not mutable (once constructed, cannot be changed).

The sequence objects derived from the SeqI interface have modest functionality; generally speaking, the good stuff is found in the Location, LocIterator, AminoAcid, and Nucleotide classes.


Method Summary
 Location bounds()
          Get the location that specifies the bounds of this sequence.
 java.lang.String description()
          Get the text description of the sequence.
 java.lang.String id()
          Get the (single-word) identifier of the sequence.
 SeqI subseq(Location location)
          Create a new sequence containing only the portion specified by the location parameter.
 SeqI subseq(Location location, java.lang.String id, java.lang.String description)
          Create a new sequence containing only the portion specified by the location parameter, with the specified id and description.
 java.lang.String toString()
          Get the IUPAC character string representation of this entire sequence.
 java.lang.String toString(Location location)
          Get the IUPAC character string representation of the subsequence specified by the location parameter.
 

Method Detail

bounds

Location bounds()
Get the location that specifies the bounds of this sequence.

Returns:
The bounding location.

description

java.lang.String description()
Get the text description of the sequence. This is all the text on the description line of a Fasta file after the id.

Returns:
The text description.

id

java.lang.String id()
Get the (single-word) identifier of the sequence. This is the first identifier in a Fasta file.

Returns:
The single-word identifier.

subseq

SeqI subseq(Location location)
Create a new sequence containing only the portion specified by the location parameter.

Parameters:
location - The portion of the sequence to get.
Returns:
The subsequence.
Throws:
java.lang.IndexOutOfBoundsException - The location parameter was not within the bounding location of the sequence.

subseq

SeqI subseq(Location location,
            java.lang.String id,
            java.lang.String description)
Create a new sequence containing only the portion specified by the location parameter, with the specified id and description.

Parameters:
location - The portion of the sequence to get.
id - The new single-word id.
description - The new description line.
Returns:
The subsequence.
Throws:
java.lang.IndexOutOfBoundsException - The location parameter was not within the bounding location of the sequence.

toString

java.lang.String toString()
Get the IUPAC character string representation of this entire sequence.

Overrides:
toString in class java.lang.Object
Returns:
The text string.

toString

java.lang.String toString(Location location)
Get the IUPAC character string representation of the subsequence specified by the location parameter.

Parameters:
location - The portion of the sequence to get.
Returns:
The string.
Throws:
java.lang.IndexOutOfBoundsException - The location parameter was not within the bounding location of the sequence.