Package htsjdk.samtools
Class SRAFileReader
- java.lang.Object
-
- htsjdk.samtools.SamReader.ReaderImplementation
-
- htsjdk.samtools.SRAFileReader
-
- All Implemented Interfaces:
SamReader.Indexing,SamReader.PrimitiveSamReader
public class SRAFileReader extends SamReader.ReaderImplementation implements SamReader.Indexing
-
-
Constructor Summary
Constructors Constructor Description SRAFileReader(SRAAccession acc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()BrowseableBAMIndexgetBrowseableIndex()Gets an index tagged with the BrowseableBAMIndex interface.SAMFileHeadergetFileHeader()SAMFileSpangetFilePointerSpanningReads()Gets a pointer spanning all reads in the BAM file.BAMIndexgetIndex()Retrieves the index for the given file type.CloseableIterator<SAMRecord>getIterator()CloseableIterator<SAMRecord>getIterator(SAMFileSpan chunks)protected SRAIterator.RecordRangeInfogetRecordsRangeInfo()ValidationStringencygetValidationStringency()booleanhasBrowseableIndex()Returns true if the supported index is browseable, meaning the bins in it can be traversed and chunk data inspected and retrieved.booleanhasIndex()SAMRecordIteratoriterator(SAMFileSpan chunks)Iterate through the given chunks in the file.CloseableIterator<SAMRecord>query(QueryInterval[] intervals, boolean contained)CloseableIterator<SAMRecord>queryAlignmentStart(String sequence, int start)CloseableIterator<SAMRecord>queryUnmapped()SamReader.Typetype()-
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 Detail
-
SRAFileReader
public SRAFileReader(SRAAccession acc)
-
-
Method Detail
-
type
public SamReader.Type type()
- Specified by:
typein interfaceSamReader.PrimitiveSamReader
-
hasIndex
public boolean hasIndex()
- Specified by:
hasIndexin interfaceSamReader.PrimitiveSamReader
-
getIndex
public BAMIndex getIndex()
Description copied from interface:SamReader.IndexingRetrieves the index for the given file type. Ensure that the index is of the specified type.- Specified by:
getIndexin interfaceSamReader.Indexing- Specified by:
getIndexin interfaceSamReader.PrimitiveSamReader- Returns:
- An index of the given type.
-
getFileHeader
public SAMFileHeader getFileHeader()
- Specified by:
getFileHeaderin interfaceSamReader.PrimitiveSamReader
-
getIterator
public CloseableIterator<SAMRecord> getIterator()
- Specified by:
getIteratorin interfaceSamReader.PrimitiveSamReader
-
getIterator
public CloseableIterator<SAMRecord> getIterator(SAMFileSpan chunks)
- Specified by:
getIteratorin interfaceSamReader.PrimitiveSamReader
-
getFilePointerSpanningReads
public SAMFileSpan getFilePointerSpanningReads()
Description copied from interface:SamReader.IndexingGets a pointer spanning all reads in the BAM file.- Specified by:
getFilePointerSpanningReadsin interfaceSamReader.Indexing- Specified by:
getFilePointerSpanningReadsin interfaceSamReader.PrimitiveSamReader- Returns:
- Unbounded pointer to the first record, in chunk format.
-
query
public CloseableIterator<SAMRecord> query(QueryInterval[] intervals, boolean contained)
- Specified by:
queryin interfaceSamReader.PrimitiveSamReader
-
queryAlignmentStart
public CloseableIterator<SAMRecord> queryAlignmentStart(String sequence, int start)
- Specified by:
queryAlignmentStartin interfaceSamReader.PrimitiveSamReader
-
queryUnmapped
public CloseableIterator<SAMRecord> queryUnmapped()
- Specified by:
queryUnmappedin interfaceSamReader.PrimitiveSamReader
-
close
public void close()
- Specified by:
closein interfaceSamReader.PrimitiveSamReader
-
getValidationStringency
public ValidationStringency getValidationStringency()
- Specified by:
getValidationStringencyin 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:
hasBrowseableIndexin interfaceSamReader.Indexing- Returns:
- True if the index supports the BrowseableBAMIndex interface. False otherwise.
-
getBrowseableIndex
public BrowseableBAMIndex getBrowseableIndex()
Gets an index tagged with the BrowseableBAMIndex interface. Throws an exception if no such index is available.- Specified by:
getBrowseableIndexin interfaceSamReader.Indexing- Returns:
- An index with a browseable interface, if possible.
- Throws:
SAMException- if no such index is available.
-
iterator
public SAMRecordIterator iterator(SAMFileSpan chunks)
Iterate through the given chunks in the file.- Specified by:
iteratorin interfaceSamReader.Indexing- Parameters:
chunks- List of chunks for which to retrieve data.- Returns:
- An iterator over the given chunks.
-
getRecordsRangeInfo
protected SRAIterator.RecordRangeInfo getRecordsRangeInfo()
-
-