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 TypeMethodDescriptionvoidadd(Collection<? extends Marker> intervals) Add all intervalsvoidAdd an intervalvoidAdd all intervalsvoidbuild()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 namebooleanIs 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 ItreenewItree()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'voidsetDebug(boolean debug) voidintsize()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, waitMethods 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
-