Package org.broad.igv.bbfile
Class BigBedIterator
- java.lang.Object
-
- org.broad.igv.bbfile.BigBedIterator
-
- All Implemented Interfaces:
java.util.Iterator<BedFeature>
public class BigBedIterator extends java.lang.Object implements java.util.Iterator<BedFeature>
Created by IntelliJ IDEA. User: martind Date: Apr 5, 2010 Time: 3:10:26 PM To change this template use File | Settings | File Templates.
-
-
Constructor Summary
Constructors Constructor Description BigBedIterator()
BigBedIterator(SeekableStream fis, BPTree chromIDTree, RPTree chromDataTree, RPChromosomeRegion selectionRegion, boolean contained)
Constructor for a BigBed iterator over the specified chromosome region Parameters: fis - file input stream handle chromIDTree - B+ index tree returns chromomosme ID's for chromosome names chromDataTree - R+ chromosome data locations tree selectionRegion - chromosome region for selection of Bed feature extraction consists of: startChromID - ID of start chromosome startBase - starting base position for features endChromID - ID of end chromosome endBase - starting base position for features contained - specifies bed features must be contained by region, if true; else return any intersecting region features
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SeekableStream
getBBFis()
RPTree
getChromosomeDataTree()
BPTree
getChromosomeIDTree()
java.util.ArrayList<RPTreeLeafNodeItem>
getLeafItems()
RPChromosomeRegion
getSelectionRegion()
boolean
hasNext()
boolean
isContained()
BedFeature
next()
Method returns the current bed feature and advances to the next bed record.void
remove()
int
setSelectionRegion(RPChromosomeRegion selectionRegion, boolean contained)
-
-
-
Constructor Detail
-
BigBedIterator
public BigBedIterator(SeekableStream fis, BPTree chromIDTree, RPTree chromDataTree, RPChromosomeRegion selectionRegion, boolean contained)
Constructor for a BigBed iterator over the specified chromosome region Parameters: fis - file input stream handle chromIDTree - B+ index tree returns chromomosme ID's for chromosome names chromDataTree - R+ chromosome data locations tree selectionRegion - chromosome region for selection of Bed feature extraction consists of: startChromID - ID of start chromosome startBase - starting base position for features endChromID - ID of end chromosome endBase - starting base position for features contained - specifies bed features must be contained by region, if true; else return any intersecting region features
-
BigBedIterator
public BigBedIterator()
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<BedFeature>
-
next
public BedFeature next()
Method returns the current bed feature and advances to the next bed record. Returns: Bed feature for current BigBed data record. Note: If "next" method is called when a "next item" does not exist, an UnsupportedOperationException will be thrown.- Specified by:
next
in interfacejava.util.Iterator<BedFeature>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<BedFeature>
-
getSelectionRegion
public RPChromosomeRegion getSelectionRegion()
-
setSelectionRegion
public int setSelectionRegion(RPChromosomeRegion selectionRegion, boolean contained)
-
isContained
public boolean isContained()
-
getBBFis
public SeekableStream getBBFis()
-
getChromosomeIDTree
public BPTree getChromosomeIDTree()
-
getChromosomeDataTree
public RPTree getChromosomeDataTree()
-
getLeafItems
public java.util.ArrayList<RPTreeLeafNodeItem> getLeafItems()
-
-