Package org.snpeff.interval.tree
Class IntervalTreeOri
- java.lang.Object
-
- org.snpeff.interval.tree.IntervalTreeOri
-
public class IntervalTreeOri extends java.lang.Object implements Itree, java.io.Serializable
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected IntervalNodeOri
head
protected boolean
inSync
protected Markers
intervals
-
Constructor Summary
Constructors Constructor Description IntervalTreeOri()
Instantiate a new interval tree with no intervalsIntervalTreeOri(Markers intervals)
Instantiate an interval tree with a list of intervals
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Marker interval)
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(Markers markers)
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 syncMarkers
getIntervals()
boolean
isEmpty()
boolean
isInSync()
Determine whether this interval tree is currently a reflection of all intervals in the interval listjava.util.Iterator<Marker>
iterator()
void
load(java.lang.String fileName, Genome genome)
Load intervals from fileMarkers
query(Interval interval)
Perform an interval query, returning the intervals that intersect with 'interval'int
size()
Size: number of entries in the interval listMarkers
stab(int point)
Perform a stabbing query, returning the interval objectsjava.lang.String
toString()
-
-
-
Field Detail
-
head
protected IntervalNodeOri head
-
intervals
protected Markers intervals
-
inSync
protected boolean inSync
-
-
Constructor Detail
-
IntervalTreeOri
public IntervalTreeOri()
Instantiate a new interval tree with no intervals
-
IntervalTreeOri
public IntervalTreeOri(Markers intervals)
Instantiate an interval tree with a list of intervals
-
-
Method Detail
-
add
public void add(Marker interval)
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
public void add(Markers markers)
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
public Markers getIntervals()
- Specified by:
getIntervals
in interfaceItree
-
isInSync
public boolean isInSync()
Determine whether this interval tree is currently a reflection of all intervals in the interval list
-
iterator
public java.util.Iterator<Marker> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Marker>
-
load
public void load(java.lang.String fileName, Genome genome)
Description copied from interface:Itree
Load intervals from file
-
query
public Markers query(Interval interval)
Perform an interval query, returning the intervals that intersect with 'interval'
-
size
public int size()
Size: number of entries in the interval list
-
stab
public Markers stab(int point)
Perform a stabbing query, returning the interval objects
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-