public class TabixFeatureReader<T extends Feature,SOURCE> extends AbstractFeatureReader<T,SOURCE>
AbstractFeatureReader.ComponentMethods
BLOCK_COMPRESSED_EXTENSIONS, codec, header
Constructor and Description |
---|
TabixFeatureReader(java.lang.String featureFile,
AsciiFeatureCodec codec) |
TabixFeatureReader(java.lang.String featureFile,
java.lang.String indexFile,
AsciiFeatureCodec codec) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.util.List<java.lang.String> |
getSequenceNames() |
boolean |
hasIndex()
Whether the reader has an index or not
Default implementation returns false
|
CloseableTribbleIterator<T> |
iterator() |
CloseableTribbleIterator<T> |
query(java.lang.String chr,
int start,
int end)
Return iterator over all features overlapping the given interval
|
getFeatureReader, getFeatureReader, getFeatureReader, getFeatureReader, getHeader, hasBlockCompressedExtension, hasBlockCompressedExtension, hasBlockCompressedExtension, setComponentMethods
public TabixFeatureReader(java.lang.String featureFile, AsciiFeatureCodec codec) throws java.io.IOException
featureFile
- - path to a feature file. Can be a local file, http url, or ftp urlcodec
- java.io.IOException
public TabixFeatureReader(java.lang.String featureFile, java.lang.String indexFile, AsciiFeatureCodec codec) throws java.io.IOException
featureFile
- - path to a feature file. Can be a local file, http url, or ftp urlindexFile
- - path to the index file.codec
- java.io.IOException
public boolean hasIndex()
AbstractFeatureReader
hasIndex
in class AbstractFeatureReader<T extends Feature,SOURCE>
public java.util.List<java.lang.String> getSequenceNames()
public CloseableTribbleIterator<T> query(java.lang.String chr, int start, int end) throws java.io.IOException
chr
- start
- end
- java.io.IOException
public CloseableTribbleIterator<T> iterator() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException