public class SRAIterator extends java.lang.Object implements SAMRecordIterator
| Modifier and Type | Class and Description |
|---|---|
static class |
SRAIterator.RecordRangeInfo
Describes record ranges info needed for emulating BAM index
|
| Constructor and Description |
|---|
SRAIterator(SRAAccession accession,
ngs.ReadCollection run,
SAMFileHeader header,
ReferenceCache cachedReferences,
SRAIterator.RecordRangeInfo recordRangeInfo,
java.util.List<Chunk> chunks) |
| Modifier and Type | Method and Description |
|---|---|
SAMRecordIterator |
assertSorted(SAMFileHeader.SortOrder sortOrder)
Establishes that records returned by this iterator are expected to
be in the specified sort order.
|
void |
close()
Should be implemented to close/release any underlying resources.
|
static SRAIterator.RecordRangeInfo |
getRecordsRangeInfo(ngs.ReadCollection run)
Loads record ranges needed for emulating BAM index
|
boolean |
hasNext()
NGS iterators implement a single method "nextObject" which return true if the operation was successful or
false if there are no more objects available.
|
SAMRecord |
next()
Call hasNext to make sure that one of inner iterators points to the next record, the retrieve the record from
one of them.
|
void |
remove() |
void |
setValidationStringency(ValidationStringency validationStringency) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstream, toListpublic SRAIterator(SRAAccession accession, ngs.ReadCollection run, SAMFileHeader header, ReferenceCache cachedReferences, SRAIterator.RecordRangeInfo recordRangeInfo, java.util.List<Chunk> chunks)
run - opened read collectionheader - sam headercachedReferences - list of cached references shared among all iterators from a single SRAFileReaderrecordRangeInfo - info about record ranges withing SRA archivechunks - used to determine which records the iterator should returnpublic static SRAIterator.RecordRangeInfo getRecordsRangeInfo(ngs.ReadCollection run)
run - read collectionpublic boolean hasNext()
hasNext in interface java.util.Iterator<SAMRecord>public SAMRecord next()
next in interface java.util.Iterator<SAMRecord>public void remove()
remove in interface java.util.Iterator<SAMRecord>public void close()
CloseableIteratorclose in interface CloseableIterator<SAMRecord>close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic SAMRecordIterator assertSorted(SAMFileHeader.SortOrder sortOrder)
SAMRecordIteratorassertSorted in interface SAMRecordIteratorsortOrder - The order in which records are expected to be returnedpublic void setValidationStringency(ValidationStringency validationStringency)