org.utgenome.gwt.utgb.client.bio
Class Interval

java.lang.Object
  extended by org.utgenome.gwt.utgb.client.bio.Interval
All Implemented Interfaces:
Serializable, Comparable<Interval>, GenomeRange
Direct Known Subclasses:
CDS, ChrInterval, Exon, Gap, Read, ReadCoverage, ReadList, ReferenceSequence, RepeatChainFinder.FlippedInterval2D, RepeatChainFinder.Interval2D, SAMReadLight, SAMReadPair, SAMReadPairFragment

public class Interval
extends Object
implements GenomeRange, Comparable<Interval>, Serializable

An interval in a genome sequence.

Author:
leo
See Also:
Serialized Form

Constructor Summary
Interval()
           
Interval(Interval other)
           
Interval(int start, int end)
           
 
Method Summary
 void accept(GenomeRangeVisitor visitor)
           
 void adjustToOneOrigin()
           
 void atomicSetStartAndEnd(int start, int end)
           
 int compareTo(Interval other)
           
 boolean contains(int pos)
           
 boolean contains(Interval other)
           
protected  void correctInterval()
           
 boolean follows(Interval other)
           
 String getColor()
           
 int getEnd()
          Get the end position of the locus (start <= end)
 String getName()
           
 int getStart()
          Get the start position of the locus.
 boolean hasOverlap(GenomeRange other)
           
 Interval intersect(Interval other)
          Return the intersected interval with the other
 boolean intersectsWith(Interval other)
           
 boolean isAntiSense()
           
 boolean isSense()
           
 int length()
          return the length of the data
 boolean precedes(Interval other)
           
 void setEnd(int end)
           
 void setStart(int start)
           
 String toJSONArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Interval

public Interval()

Interval

public Interval(int start,
                int end)

Interval

public Interval(Interval other)
Method Detail

getName

public String getName()
Specified by:
getName in interface GenomeRange

adjustToOneOrigin

public void adjustToOneOrigin()

isSense

public boolean isSense()
Specified by:
isSense in interface GenomeRange

isAntiSense

public boolean isAntiSense()
Specified by:
isAntiSense in interface GenomeRange

getColor

public String getColor()

getStart

public int getStart()
Get the start position of the locus. (start <= end)

Specified by:
getStart in interface GenomeRange
Returns:
the start position

setStart

public void setStart(int start)

atomicSetStartAndEnd

public void atomicSetStartAndEnd(int start,
                                 int end)

correctInterval

protected void correctInterval()

getEnd

public int getEnd()
Get the end position of the locus (start <= end)

Specified by:
getEnd in interface GenomeRange
Returns:
the end position

setEnd

public void setEnd(int end)

length

public int length()
Description copied from interface: GenomeRange
return the length of the data

Specified by:
length in interface GenomeRange
Returns:

hasOverlap

public boolean hasOverlap(GenomeRange other)

intersectsWith

public boolean intersectsWith(Interval other)

intersect

public Interval intersect(Interval other)
Return the intersected interval with the other

Parameters:
other -
Returns:

contains

public boolean contains(int pos)

contains

public boolean contains(Interval other)

precedes

public boolean precedes(Interval other)

follows

public boolean follows(Interval other)

accept

public void accept(GenomeRangeVisitor visitor)
Specified by:
accept in interface GenomeRange

compareTo

public int compareTo(Interval other)
Specified by:
compareTo in interface Comparable<Interval>

toJSONArray

public String toJSONArray()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012 utgenome.org. All Rights Reserved.