SAMRecordIterator, CloseableIterator<SAMRecord>, Closeable, AutoCloseable, Iterator<SAMRecord>public class SRAIterator extends Object implements SAMRecordIterator
| Modifier and Type | Class | Description |
|---|---|---|
static class |
SRAIterator.RecordRangeInfo |
Describes record ranges info needed for emulating BAM index
|
| Constructor | Description |
|---|---|
SRAIterator(SRAAccession accession,
ngs.ReadCollection run,
SAMFileHeader header,
ReferenceCache cachedReferences,
SRAIterator.RecordRangeInfo recordRangeInfo,
List<Chunk> chunks) |
| Modifier and Type | Method | 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) |
stream, toListforEachRemainingpublic SRAIterator(SRAAccession accession, ngs.ReadCollection run, SAMFileHeader header, ReferenceCache cachedReferences, SRAIterator.RecordRangeInfo recordRangeInfo, 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()
public SAMRecord next()
public void close()
CloseableIteratorclose in interface AutoCloseableclose in interface Closeableclose in interface CloseableIterator<SAMRecord>public SAMRecordIterator assertSorted(SAMFileHeader.SortOrder sortOrder)
SAMRecordIteratorassertSorted in interface SAMRecordIteratorsortOrder - The order in which records are expected to be returnedpublic void setValidationStringency(ValidationStringency validationStringency)