Package org.snpeff.interval.tree
Class IntervalTreeOri
java.lang.Object
org.snpeff.interval.tree.IntervalTreeOri
- All Implemented Interfaces:
Serializable
,Iterable<Marker>
,Itree
An Interval Tree is essentially a map from intervals to objects, which
can be queried for all data associated with a particular interval of
point
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a new interval tree with no intervalsIntervalTreeOri
(Markers intervals) Instantiate an interval tree with a list of intervals -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an interval object to the interval tree's list Note: Marks the tree as 'not inSync', but will not rebuild the tree until the next query or call to buildvoid
Add all intervals to interval tree's list Note: Marks the tree as 'not inSync', but will not rebuild the tree until the next query or call to buildvoid
build()
Build the interval tree to reflect the list of intervals, Will not run if this is currently in syncboolean
isEmpty()
boolean
isInSync()
Determine whether this interval tree is currently a reflection of all intervals in the interval listiterator()
void
Load intervals from filePerform an interval query, returning the intervals that intersect with 'interval'int
size()
Size: number of entries in the interval liststab
(int point) Perform a stabbing query, returning the interval objectstoString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
head
-
intervals
-
inSync
protected boolean inSync
-
-
Constructor Details
-
IntervalTreeOri
public IntervalTreeOri()Instantiate a new interval tree with no intervals -
IntervalTreeOri
Instantiate an interval tree with a list of intervals
-
-
Method Details
-
add
Add an interval object to the interval tree's list Note: Marks the tree as 'not inSync', but will not rebuild the tree until the next query or call to build -
add
Add all intervals to interval tree's list Note: Marks the tree as 'not inSync', but will not rebuild the tree until the next query or call to build -
build
public void build()Build the interval tree to reflect the list of intervals, Will not run if this is currently in sync -
getIntervals
- Specified by:
getIntervals
in interfaceItree
-
isEmpty
public boolean isEmpty() -
isInSync
public boolean isInSync()Determine whether this interval tree is currently a reflection of all intervals in the interval list -
iterator
-
load
Description copied from interface:Itree
Load intervals from file -
query
Perform an interval query, returning the intervals that intersect with 'interval' -
size
public int size()Size: number of entries in the interval list -
stab
Perform a stabbing query, returning the interval objects -
toString
-