apollo.datamodel
Interface RangeI

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Subinterfaces:
AnnotatedFeatureI, ExonI, FeaturePairI, FeatureSetI, SeqFeatureI, StrandedFeatureSetI
All Known Implementing Classes:
AnnotatedFeature, AssemblyFeature, CurationSet, CutSite, Exon, FeaturePair, FeatureSet, GenomicRange, Protein, Range, SeqFeature, SequenceEdit, StrandedFeatureSet, Transcript

public interface RangeI
extends java.io.Serializable, java.lang.Cloneable


Field Summary
static java.lang.String NO_NAME
          The type String to use for features that have no other name.
static java.lang.String NO_TYPE
          The type String to use for features that have no other type.
 
Method Summary
 boolean canHaveChildren()
          If RangeI is an instanceof FeatureSetI and FeatureSetI.hasChildFeatures is true then return true.
 boolean contains(int position)
           
 boolean contains(RangeI sf)
          Returns true if range of sf is entierly within this RangeI
 void convertFromBaseOrientedToInterbase()
          Converts base oriented range to interbase range
 void convertFromInterbaseToBaseOriented()
          Converts interbase range to base oriented range
 int getEnd()
           
 java.lang.String getFeatureType()
          getType is not the "visual" type, ie the type one sees in the EvidencePanel.
 int getHigh()
           
 int getLeftOverlap(RangeI sf)
           
 int getLow()
           
 java.lang.String getName()
          In the case where the range is chromosomal the name is the chromosome name
 RangeI getRangeClone()
          Returns clone of self
 SequenceI getRefSequence()
          Retrieve the SequenceI that this feature annotates.
 java.lang.String getResidues()
           
 int getRightOverlap(RangeI sf)
           
 int getStart()
           
 int getStrand()
           
 boolean hasFeatureType()
          convenience method returns !getType()==NO_TYPE
 boolean hasName()
          return true if name !equal NO_NAME
 boolean hasRefSequence()
          return false if no ref seq, ranges should generally have ref seq, only during initialization might it not
 boolean isContainedByRefSeq()
          Return true if ref seq contains this range
 boolean isExactOverlap(RangeI sf)
           
 boolean isForwardStrand()
           
 boolean isIdentical(RangeI range)
          Returns true if same start,end,type and name.
 boolean isSequenceAvailable(int position)
           
 int length()
           
 boolean overlaps(RangeI sf)
           
 boolean rangeIsUnassigned()
          Return true if range has been assigned high & low
 boolean sameRange(RangeI r)
          Return true if start and end are equal
 void setEnd(int end)
           
 void setFeatureType(java.lang.String type)
           
 void setHigh(int high)
           
 void setLow(int low)
           
 void setName(java.lang.String name)
           
 void setRefSequence(SequenceI refSeq)
          Set the SequenceI that this feature annotates.
 void setStart(int start)
           
 void setStrand(int strand)
           
 

Field Detail

NO_NAME

static final java.lang.String NO_NAME
The type String to use for features that have no other name.

See Also:
Constant Field Values

NO_TYPE

static final java.lang.String NO_TYPE
The type String to use for features that have no other type.

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
In the case where the range is chromosomal the name is the chromosome name


setName

void setName(java.lang.String name)

hasName

boolean hasName()
return true if name !equal NO_NAME


getFeatureType

java.lang.String getFeatureType()
getType is not the "visual" type, ie the type one sees in the EvidencePanel. getType returns the "logical" type(the type from the data). These are the types in the squiggly brackets in the tiers file that map to the visual type listed before the squigglies. gui.scheme.FeatureProperty maps logical types to visual types (convenience function in DetailInfo.getPropertyType)


setFeatureType

void setFeatureType(java.lang.String type)

hasFeatureType

boolean hasFeatureType()
convenience method returns !getType()==NO_TYPE


getStart

int getStart()

setStart

void setStart(int start)

getEnd

int getEnd()

setEnd

void setEnd(int end)

getLow

int getLow()

setLow

void setLow(int low)

getHigh

int getHigh()

setHigh

void setHigh(int high)

isSequenceAvailable

boolean isSequenceAvailable(int position)

getRefSequence

SequenceI getRefSequence()
Retrieve the SequenceI that this feature annotates.

Returns:
the current parent SequenceI

hasRefSequence

boolean hasRefSequence()
return false if no ref seq, ranges should generally have ref seq, only during initialization might it not


setRefSequence

void setRefSequence(SequenceI refSeq)
Set the SequenceI that this feature annotates.

Parameters:
refSeq - the new parent SequenceI

isContainedByRefSeq

boolean isContainedByRefSeq()
Return true if ref seq contains this range


getResidues

java.lang.String getResidues()

getStrand

int getStrand()
Returns:
1 for forward strand, -1 for reverse strand, 0 for strandless

setStrand

void setStrand(int strand)

isForwardStrand

boolean isForwardStrand()

length

int length()

getLeftOverlap

int getLeftOverlap(RangeI sf)

getRightOverlap

int getRightOverlap(RangeI sf)

isExactOverlap

boolean isExactOverlap(RangeI sf)

contains

boolean contains(RangeI sf)
Returns true if range of sf is entierly within this RangeI


contains

boolean contains(int position)

overlaps

boolean overlaps(RangeI sf)

sameRange

boolean sameRange(RangeI r)
Return true if start and end are equal


canHaveChildren

boolean canHaveChildren()
If RangeI is an instanceof FeatureSetI and FeatureSetI.hasChildFeatures is true then return true. Basically convenience method that does the awkward instanceof for you.


getRangeClone

RangeI getRangeClone()
Returns clone of self


isIdentical

boolean isIdentical(RangeI range)
Returns true if same start,end,type and name. This could potentially be changed to equals, theres implications there for hashing. A range and its clone will be identical barring modifications.


rangeIsUnassigned

boolean rangeIsUnassigned()
Return true if range has been assigned high & low


convertFromBaseOrientedToInterbase

void convertFromBaseOrientedToInterbase()
Converts base oriented range to interbase range


convertFromInterbaseToBaseOriented

void convertFromInterbaseToBaseOriented()
Converts interbase range to base oriented range