Package picard.illumina.parser.readers

## Class AbstractIlluminaPositionFileReader

- java.lang.Object
- - picard.illumina.parser.readers.AbstractIlluminaPositionFileReader

- All Implemented Interfaces:
    `htsjdk.samtools.util.CloseableIterator<AbstractIlluminaPositionFileReader.PositionInfo>`, `Closeable`, `AutoCloseable`, `Iterator<AbstractIlluminaPositionFileReader.PositionInfo>`
  Direct Known Subclasses:
    `ClocsFileReader`, `LocsFileReader`, `PosFileReader`

      public abstract class AbstractIlluminaPositionFileReader
      extends Object
      implements htsjdk.samtools.util.CloseableIterator<AbstractIlluminaPositionFileReader.PositionInfo>

  The position files of Illumina are nearly the same form: Pos files consist of text based tabbed x-y coordinate float pairs, locs files are binary x-y float pairs, clocs are compressed binary x-y float pairs. Each of these file types we read sequentially and are really concerned with iterating over the coordinates and returning them as as they would appear in a QSeq file. Therefore, this abstract base class provides the basic functionality for iterating over the values found in these files and converting them into qseq style coordinates.

  Currently these readers also return lane/tile but this will be unnecessary in future releases.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `AbstractIlluminaPositionFileReader.PositionInfo` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static float` | `MAX_POS` |
    `static float` | `MIN_POS` | At least one NextSeq run produced a small negative value for y coordinate (-5), so allow small negative values and see what happens.
    `static String` | `S_LOCS_FILE` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractIlluminaPositionFileReader​(File file)` |
    `AbstractIlluminaPositionFileReader​(File file, int lane, int tile)` | Use this ctor if lane and tile are not discernible from file name.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `File` | `getFile()` |
    `int` | `getLane()` |
    `int` | `getTile()` |
    `abstract boolean` | `hasNext()` | Return true if the file has more elements to return, false otherwise
    `protected abstract String` | `makeExceptionMsg()` | Create a string that will be included in any NoSuchElementException thrown by the next() method
    `AbstractIlluminaPositionFileReader.PositionInfo` | `next()` | Return the next set of coordinates in a given file.
    `void` | `remove()` |
    `protected abstract AbstractIlluminaPositionFileReader.PositionInfo` | `unsafeNextInfo()` | Returns the next position info.

    - ### 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

      `close, stream, toList`

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

      `forEachRemaining`

- - ### Field Detail

    - #### MAX_POS

          public static final float MAX_POS

      See Also:
        Constant Field Values

    - #### MIN_POS

          public static final float MIN_POS

      At least one NextSeq run produced a small negative value for y coordinate (-5), so allow small negative values and see what happens.
      See Also:
        Constant Field Values

    - #### S_LOCS_FILE

          public static final String S_LOCS_FILE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractIlluminaPositionFileReader

          public AbstractIlluminaPositionFileReader​(File file)

    - #### AbstractIlluminaPositionFileReader

          public AbstractIlluminaPositionFileReader​(File file,
                                                    int lane,
                                                    int tile)

      Use this ctor if lane and tile are not discernible from file name.
      Parameters:
        `file` - The position file to read.
        `lane` - The lane to read positions for.
        `tile` - The tile to read positions for.

  - ### Method Detail

    - #### getTile

          public int getTile()

    - #### getLane

          public int getLane()

    - #### getFile

          public File getFile()

    - #### next

          public final AbstractIlluminaPositionFileReader.PositionInfo next()

      Return the next set of coordinates in a given file.
      Specified by:
        `next` in interface `Iterator<AbstractIlluminaPositionFileReader.PositionInfo>`

    - #### unsafeNextInfo

          protected abstract AbstractIlluminaPositionFileReader.PositionInfo unsafeNextInfo()

      Returns the next position info. Implementations of this method do not need to call hasNext since it is called in next()

    - #### makeExceptionMsg

          protected abstract String makeExceptionMsg()

      Create a string that will be included in any NoSuchElementException thrown by the next() method

    - #### hasNext

          public abstract boolean hasNext()

      Return true if the file has more elements to return, false otherwise
      Specified by:
        `hasNext` in interface `Iterator<AbstractIlluminaPositionFileReader.PositionInfo>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<AbstractIlluminaPositionFileReader.PositionInfo>`