public class TribbleIndexedFeatureReader<T extends Feature,SOURCE> extends AbstractFeatureReader<T,SOURCE>
AbstractFeatureReader.ComponentMethodsBLOCK_COMPRESSED_EXTENSIONS, codec, header| Constructor and Description |
|---|
TribbleIndexedFeatureReader(java.lang.String featurePath,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex) |
TribbleIndexedFeatureReader(java.lang.String featurePath,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> indexWrapper) |
TribbleIndexedFeatureReader(java.lang.String featureFile,
FeatureCodec<T,SOURCE> codec,
Index index) |
TribbleIndexedFeatureReader(java.lang.String featureFile,
java.lang.String indexFile,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex) |
TribbleIndexedFeatureReader(java.lang.String featureFile,
java.lang.String indexFile,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> indexWrapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader
|
java.util.List<java.lang.String> |
getSequenceNames()
Return the sequence (chromosome/contig) names in this file, if known.
|
boolean |
hasIndex()
Whether the reader has an index or not
Default implementation returns false
|
boolean |
isQueryable() |
CloseableTribbleIterator<T> |
iterator()
Provides access to all the features in the reader
|
CloseableTribbleIterator<T> |
query(java.lang.String chr,
int start,
int end)
Return an iterator to iterate over features overlapping the specified interval
Note that TribbleIndexedFeatureReader only supports issuing and manipulating a single query
for each reader.
|
getFeatureReader, getFeatureReader, getFeatureReader, getFeatureReader, getFeatureReader, getHeader, hasBlockCompressedExtension, hasBlockCompressedExtension, hasBlockCompressedExtension, isTabix, setComponentMethodsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitquerypublic TribbleIndexedFeatureReader(java.lang.String featurePath,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex)
throws java.io.IOException
featurePath - - path to the feature file, can be a local file path, http url, or ftp urlcodec - - codec to decode the featuresrequireIndex - - true if the reader will be queries for specific ranges. An index (idx) file must existjava.io.IOExceptionpublic TribbleIndexedFeatureReader(java.lang.String featurePath,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> indexWrapper)
throws java.io.IOException
java.io.IOExceptionpublic TribbleIndexedFeatureReader(java.lang.String featureFile,
java.lang.String indexFile,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex)
throws java.io.IOException
featureFile - - path to the feature file, can be a local file path, http url, or ftp urlindexFile - - path to the index filecodec - - codec to decode the featuresrequireIndex - - true if the reader will be queries for specific ranges. An index (idx) file must existjava.io.IOExceptionpublic TribbleIndexedFeatureReader(java.lang.String featureFile,
java.lang.String indexFile,
FeatureCodec<T,SOURCE> codec,
boolean requireIndex,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> wrapper,
java.util.function.Function<java.nio.channels.SeekableByteChannel,java.nio.channels.SeekableByteChannel> indexWrapper)
throws java.io.IOException
featureFile - - path to the feature file, can be a local file path, http url, or ftp url, or any other
uri supported by a Path pluginindexFile - - path to the index filecodec - - codec to decode the featuresrequireIndex - - true if the reader will be queries for specific ranges. An index (idx) file must existjava.io.IOExceptionpublic TribbleIndexedFeatureReader(java.lang.String featureFile,
FeatureCodec<T,SOURCE> codec,
Index index)
throws java.io.IOException
featureFile - - path to the feature file, can be a local file path, http url, or ftp urlcodec - - codec to decode the featuresindex - - a tribble Index objectjava.io.IOExceptionpublic void close()
throws java.io.IOException
FeatureReaderjava.io.IOExceptionpublic java.util.List<java.lang.String> getSequenceNames()
public boolean hasIndex()
AbstractFeatureReaderhasIndex in class AbstractFeatureReader<T extends Feature,SOURCE>public boolean isQueryable()
isQueryable in interface FeatureReader<T extends Feature>isQueryable in class AbstractFeatureReader<T extends Feature,SOURCE>public CloseableTribbleIterator<T> query(java.lang.String chr, int start, int end) throws java.io.IOException
chr - contigstart - start positionend - end positionjava.io.IOExceptionpublic CloseableTribbleIterator<T> iterator() throws java.io.IOException
FeatureReaderjava.io.IOException