Package htsjdk.samtools
Class SRAFileReader
java.lang.Object
htsjdk.samtools.SamReader.ReaderImplementation
htsjdk.samtools.SRAFileReader
- All Implemented Interfaces:
SamReader.Indexing
,SamReader.PrimitiveSamReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Gets an index tagged with the BrowseableBAMIndex interface.Gets a pointer spanning all reads in the BAM file.getIndex()
Retrieves the index for the given file type.getIterator
(SAMFileSpan chunks) protected SRAIterator.RecordRangeInfo
boolean
Returns true if the supported index is browseable, meaning the bins in it can be traversed and chunk data inspected and retrieved.boolean
hasIndex()
iterator
(SAMFileSpan chunks) Iterate through the given chunks in the file.query
(QueryInterval[] intervals, boolean contained) queryAlignmentStart
(String sequence, int start) type()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface htsjdk.samtools.SamReader.PrimitiveSamReader
isQueryable
-
Constructor Details
-
SRAFileReader
-
-
Method Details
-
type
- Specified by:
type
in interfaceSamReader.PrimitiveSamReader
-
hasIndex
public boolean hasIndex()- Specified by:
hasIndex
in interfaceSamReader.PrimitiveSamReader
-
getIndex
Description copied from interface:SamReader.Indexing
Retrieves the index for the given file type. Ensure that the index is of the specified type.- Specified by:
getIndex
in interfaceSamReader.Indexing
- Specified by:
getIndex
in interfaceSamReader.PrimitiveSamReader
- Returns:
- An index of the given type.
-
getFileHeader
- Specified by:
getFileHeader
in interfaceSamReader.PrimitiveSamReader
-
getIterator
- Specified by:
getIterator
in interfaceSamReader.PrimitiveSamReader
-
getIterator
- Specified by:
getIterator
in interfaceSamReader.PrimitiveSamReader
-
getFilePointerSpanningReads
Description copied from interface:SamReader.Indexing
Gets a pointer spanning all reads in the BAM file.- Specified by:
getFilePointerSpanningReads
in interfaceSamReader.Indexing
- Specified by:
getFilePointerSpanningReads
in interfaceSamReader.PrimitiveSamReader
- Returns:
- Unbounded pointer to the first record, in chunk format.
-
query
- Specified by:
query
in interfaceSamReader.PrimitiveSamReader
-
queryAlignmentStart
- Specified by:
queryAlignmentStart
in interfaceSamReader.PrimitiveSamReader
-
queryUnmapped
- Specified by:
queryUnmapped
in interfaceSamReader.PrimitiveSamReader
-
close
public void close()- Specified by:
close
in interfaceSamReader.PrimitiveSamReader
-
getValidationStringency
- Specified by:
getValidationStringency
in interfaceSamReader.PrimitiveSamReader
-
hasBrowseableIndex
public boolean hasBrowseableIndex()Returns true if the supported index is browseable, meaning the bins in it can be traversed and chunk data inspected and retrieved.- Specified by:
hasBrowseableIndex
in interfaceSamReader.Indexing
- Returns:
- True if the index supports the BrowseableBAMIndex interface. False otherwise.
-
getBrowseableIndex
Gets an index tagged with the BrowseableBAMIndex interface. Throws an exception if no such index is available.- Specified by:
getBrowseableIndex
in interfaceSamReader.Indexing
- Returns:
- An index with a browseable interface, if possible.
- Throws:
SAMException
- if no such index is available.
-
iterator
Iterate through the given chunks in the file.- Specified by:
iterator
in interfaceSamReader.Indexing
- Parameters:
chunks
- List of chunks for which to retrieve data.- Returns:
- An iterator over the given chunks.
-
getRecordsRangeInfo
-