Package org.snpeff.interval.tree
Class IntervalForest
java.lang.Object
org.snpeff.interval.tree.IntervalForest
- All Implemented Interfaces:
Serializable
,Iterable<Itree>
A set of interval trees (e.g. one per chromosome, one per transcript ID, etc)
- Author:
- pcingola
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Collection<? extends Marker> intervals) Add all intervalsvoid
Add an intervalvoid
Add all intervalsvoid
build()
Build all treesgetName()
Get (or create) an interval tree for IDgetOrCreateTreeChromo
(String chromo) Get (or create) an interval tree based for "chromo" (chromosome name)Get an interval tree using an IDgetTreeChromo
(String chromo) Get an interval tree using a chromosome nameboolean
Is the tree 'chromo' available?Return the intersection of 'markers' and this IntervalForest For each marker 'm' in 'markers' - query the tree to get all markers intersecting 'm' - create a new interval which is the intersection of 'm' with all the resutls from the previous query.iterator()
keySet()
protected Itree
newItree()
Create new tree.Query all intervals that intersect with 'interval'Query all intervals that intersect with any interval in 'intervals'queryUnique
(Markers markers) Query unique intervals that intersect with any interval in 'markers' I.e.: Return a set of intervals that intersects (at least once) with any interval in 'markers'void
setDebug
(boolean debug) void
int
size()
Obtain all intervals that intersect with 'point'Obtain all intervals that intersect with 'marker.start'toString()
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
-
Constructor Details
-
IntervalForest
public IntervalForest() -
IntervalForest
-
-
Method Details
-
add
Add all intervals -
add
Add an interval -
add
Add all intervals -
build
public void build()Build all trees -
getName
-
getOrCreateTree
Get (or create) an interval tree for ID -
getOrCreateTreeChromo
Get (or create) an interval tree based for "chromo" (chromosome name) -
getTree
Get an interval tree using an ID -
getTreeChromo
Get an interval tree using a chromosome name -
hasTree
Is the tree 'chromo' available? -
intersect
Return the intersection of 'markers' and this IntervalForest For each marker 'm' in 'markers' - query the tree to get all markers intersecting 'm' - create a new interval which is the intersection of 'm' with all the resutls from the previous query. -
iterator
-
keySet
-
newItree
Create new tree. In oder to change the implementation, only this method should be changed. -
query
Query all intervals that intersect with 'interval' -
query
Query all intervals that intersect with any interval in 'intervals' -
queryUnique
Query unique intervals that intersect with any interval in 'markers' I.e.: Return a set of intervals that intersects (at least once) with any interval in 'markers' -
setDebug
public void setDebug(boolean debug) -
setName
-
size
public int size() -
stab
Obtain all intervals that intersect with 'marker.start' -
stab
Obtain all intervals that intersect with 'point' -
toString
-