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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
static final float
At least one NextSeq run produced a small negative value for y coordinate (-5), so allow small negative values and see what happens.static final String
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractIlluminaPositionFileReader
(File file, int lane, int tile) Use this ctor if lane and tile are not discernible from file name. -
Method Summary
Modifier and TypeMethodDescriptiongetFile()
int
getLane()
int
getTile()
abstract boolean
hasNext()
Return true if the file has more elements to return, false otherwiseprotected abstract String
Create a string that will be included in any NoSuchElementException thrown by the next() methodnext()
Return the next set of coordinates in a given file.void
remove()
protected abstract AbstractIlluminaPositionFileReader.PositionInfo
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 Details
-
MAX_POS
public static final float MAX_POS- See Also:
-
MIN_POS
public static final float MIN_POSAt least one NextSeq run produced a small negative value for y coordinate (-5), so allow small negative values and see what happens.- See Also:
-
S_LOCS_FILE
- See Also:
-
-
Constructor Details
-
AbstractIlluminaPositionFileReader
-
AbstractIlluminaPositionFileReader
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 Details
-
getTile
public int getTile() -
getLane
public int getLane() -
getFile
-
next
Return the next set of coordinates in a given file.- Specified by:
next
in interfaceIterator<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
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 interfaceIterator<AbstractIlluminaPositionFileReader.PositionInfo>
-
remove
public void remove()- Specified by:
remove
in interfaceIterator<AbstractIlluminaPositionFileReader.PositionInfo>
-