Package htsjdk.tribble
Class TabixFeatureReader<T extends Feature,SOURCE>
java.lang.Object
htsjdk.tribble.AbstractFeatureReader<T,SOURCE>
htsjdk.tribble.TabixFeatureReader<T,SOURCE>
- All Implemented Interfaces:
FeatureReader<T>,Closeable,AutoCloseable
- Since:
- 2/11/12
-
Nested Class Summary
Nested classes/interfaces inherited from class htsjdk.tribble.AbstractFeatureReader
AbstractFeatureReader.ComponentMethods -
Field Summary
Fields inherited from class htsjdk.tribble.AbstractFeatureReader
BLOCK_COMPRESSED_EXTENSIONS, codec, header -
Constructor Summary
ConstructorsConstructorDescriptionTabixFeatureReader(String featureFile, AsciiFeatureCodec codec) TabixFeatureReader(String featureFile, String indexFile, AsciiFeatureCodec codec) TabixFeatureReader(String featureFile, String indexFile, AsciiFeatureCodec codec, Function<SeekableByteChannel, SeekableByteChannel> wrapper, Function<SeekableByteChannel, SeekableByteChannel> indexWrapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the readerProvides the list of sequenceNames if known.booleanhasIndex()Whether the reader has an index or not Default implementation returns falseiterator()Provides access to all the features in the readerReturn iterator over all features overlapping the given intervalMethods inherited from class htsjdk.tribble.AbstractFeatureReader
getFeatureReader, getFeatureReader, getFeatureReader, getFeatureReader, getFeatureReader, getHeader, hasBlockCompressedExtension, hasBlockCompressedExtension, hasBlockCompressedExtension, isQueryable, isTabix, setComponentMethodsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface htsjdk.tribble.FeatureReader
query
-
Constructor Details
-
TabixFeatureReader
- Parameters:
featureFile- - path to a feature file. Can be a local file, http url, or ftp urlcodec-- Throws:
IOException
-
TabixFeatureReader
public TabixFeatureReader(String featureFile, String indexFile, AsciiFeatureCodec codec) throws IOException - Parameters:
featureFile- - path to a feature file. Can be a local file, http url, or ftp urlindexFile- - path to the index file.codec-- Throws:
IOException
-
TabixFeatureReader
public TabixFeatureReader(String featureFile, String indexFile, AsciiFeatureCodec codec, Function<SeekableByteChannel, SeekableByteChannel> wrapper, Function<SeekableByteChannel, throws IOExceptionSeekableByteChannel> indexWrapper) - Parameters:
featureFile- path to a feature file. Can be a local file, http url, or ftp urlindexFile- path to the index file.wrapper- a wrapper to apply to the byte stream from the featureResource allowing injecting features like caching and prefetching of the stream, may be null, will only be applied if featureFile is a uri representing aPathindexWrapper- a wrapper to apply to the byte stream from the indexResource, may be null, will only be applied if indexFile is a uri representing aPath- Throws:
IOException
-
-
Method Details
-
hasIndex
public boolean hasIndex()Description copied from class:AbstractFeatureReaderWhether the reader has an index or not Default implementation returns false- Overrides:
hasIndexin classAbstractFeatureReader<T extends Feature,SOURCE> - Returns:
- false
-
getSequenceNames
Description copied from interface:FeatureReaderProvides the list of sequenceNames if known. Otherwise will return an empty list.- Returns:
- the list of sequenceNames if known. Otherwise will return an empty list.
-
query
Return iterator over all features overlapping the given interval- Parameters:
chr-start-end-- Returns:
- Throws:
IOException
-
iterator
Description copied from interface:FeatureReaderProvides access to all the features in the reader- Returns:
- an iterator to all the features in the reader
- Throws:
IOException- If there's a problem reading.
-
close
Description copied from interface:FeatureReaderCloses the reader- Throws:
IOException
-