Package htsjdk.samtools.sra

# Class SRAAlignmentIterator

java.lang.Object
htsjdk.samtools.sra.SRAAlignmentIterator

All Implemented Interfaces:
  `CloseableIterator<SAMRecord>`, `Closeable`, `AutoCloseable`, `Iterator<SAMRecord>`

public class SRAAlignmentIterator extends Object implements CloseableIterator<SAMRecord>
Iterator for aligned reads. Is used from SRAIterator. Created by andrii.nikitiuk on 9/3/15.

## Constructor Summary

Constructors
Constructor
Description
`SRAAlignmentIterator(SRAAccession accession, ngs.ReadCollection run, SAMFileHeader header, ReferenceCache cachedReferences, SRAIterator.RecordRangeInfo recordRangeInfo, Chunk chunk)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Should be implemented to close/release any underlying resources.
`boolean`
`hasNext()`
`SAMRecord`
`next()`
`void`
`remove()`
`void`
`setValidationStringency(ValidationStringency validationStringency)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface htsjdk.samtools.util.CloseableIterator

`stream, toList`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

## Constructor Details

### SRAAlignmentIterator

public SRAAlignmentIterator(SRAAccession accession, ngs.ReadCollection run, SAMFileHeader header, ReferenceCache cachedReferences, SRAIterator.RecordRangeInfo recordRangeInfo, Chunk chunk)

Parameters:
  `run` - opened read collection
  `header` - sam header
  `cachedReferences` - list of cached references shared among all iterators from a single SRAFileReader
  `recordRangeInfo` - info about record ranges withing SRA archive
  `chunk` - used to determine which alignments the iterator should return

## Method Details

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<SAMRecord>`

### next

public SAMRecord next()

Specified by:
  `next` in interface `Iterator<SAMRecord>`

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<SAMRecord>`

### setValidationStringency

public void setValidationStringency(ValidationStringency validationStringency)

### close

public void close()
Description copied from interface: `CloseableIterator`
Should be implemented to close/release any underlying resources.

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `CloseableIterator<SAMRecord>`