|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javagene.seq.SeqStranded
public class SeqStranded
A SeqI wrapper that presents a stranded coordinate system
mapped to an underlying SeqI object.
The bounds of a SeqStranded object can be set to an arbitrary location;
they do not necessarily start at 0, and they may be on the reverse
strand.
In JavaGene's coordinate system a numerical increase
is always upstream. The direction (strand) of the underlying sequence
is indicated by the strand of the bounding location.
The sequence type (RNA or DNA) is always set in constructor.
Constructor Summary | |
---|---|
SeqStranded(SeqI baseSequence,
Location location,
Nucleotide.Type type)
Construct from SeqI using specified location as the bounding location. |
|
SeqStranded(SeqI baseSequence,
Nucleotide.Type type)
Construct from an arbitrary SeqI object. |
|
SeqStranded(SeqStranded baseSequence)
Construct a clone. |
Method Summary | |
---|---|
SeqI |
baseSeq()
Get the base sequence that was specified in the constructor. |
Location |
bounds()
Get the bounding location 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. |
Location |
mapFromBase(Location baseLocation)
Map a location on the base sequence to the equivalent genomic location. |
Location |
mapToBase(Location genomicLocation)
Map a genomic location to the equivalent location on the base sequence. |
SeqStranded |
subseq(Location location)
Create a new sequence containing only the portion specified by the location parameter. |
SeqStranded |
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, as defined by the bounding location. |
java.lang.String |
toString(Location location)
Get the IUPAC character string representation of the subsequence specified by the location parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SeqStranded(SeqI baseSequence, Location location, Nucleotide.Type type)
baseSequence
- A SeqI object.location
- The bounding location.type
- Nucleotide.Type.DNA or Nucleotide.Type.RNA
java.lang.IllegalArgumentException
- The sequence length and location length
were not equal.public SeqStranded(SeqI baseSequence, Nucleotide.Type type)
baseSequence
- A SeqI object.type
- Nucleotide.Type.DNA or Nucleotide.Type.RNA.public SeqStranded(SeqStranded baseSequence)
baseSequence
- A SeqI object.Method Detail |
---|
public SeqI baseSeq()
public Location bounds()
bounds
in interface SeqI
public java.lang.String description()
SeqI
description
in interface SeqI
public java.lang.String id()
SeqI
id
in interface SeqI
public Location mapFromBase(Location baseLocation)
baseLocation
- The location on the base string.
java.lang.IndexOutOfBoundsException
- The specified baseLocation could not
be mapped within the SeqStranded object's location bounds.public Location mapToBase(Location genomicLocation)
genomicLocation
- The location to map. Must be within the location bounds,
though both strands are allowed.
java.lang.IndexOutOfBoundsException
- The genomicLocation did not map
within the base sequence bounds.public SeqStranded subseq(Location location)
subseq
in interface SeqI
location
- The location of the subsequence.
java.lang.IndexOutOfBoundsException
- The bounding location did not
contain the specified location.public SeqStranded subseq(Location location, java.lang.String id, java.lang.String description)
subseq
in interface SeqI
location
- The location of the subsequence.id
- The new single-word id.description
- The new description line.
java.lang.IndexOutOfBoundsException
- The bounding location did not
contain the specified location.public java.lang.String toString()
toString
in interface SeqI
toString
in class java.lang.Object
public java.lang.String toString(Location location)
toString
in interface SeqI
location
- The portion of the sequence to get.
java.lang.IndexOutOfBoundsException
- The location parameter was not within the bounding location
of the sequence.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |