Class ClocsFileReader

All Implemented Interfaces:
htsjdk.samtools.util.CloseableIterator<AbstractIlluminaPositionFileReader.PositionInfo>, Closeable, AutoCloseable, Iterator<AbstractIlluminaPositionFileReader.PositionInfo>

public class ClocsFileReader extends AbstractIlluminaPositionFileReader
The clocs file format is one of 3 Illumina formats(pos, locs, and clocs) that stores position data exclusively. clocs files store position data for successive clusters, compressed in bins as follows: Byte 0 : unused Byte 1-4 : unsigned int numBins The rest of the file consists of bins/blocks, where a bin consists of an integer indicating number of blocks, followed by that number of blocks and a block consists of an x-y coordinate pair. In otherwords: for each bin byte 1: Unsigned int numBlocks for each block: byte 1 : byte xRelativeCoordinate byte 2 : byte yRelativeCoordinate Actual x and y values are computed using the following algorithm xOffset = yOffset = 0 imageWidth = 2048 blockSize = 25 maxXbins:Int = Math.Ceiling((double)ImageWidth/(double)blockSize) for each bin: for each location: x = convert.ToSingle(xRelativeCoordinate/10f + xoffset) y = convert.toSingle(yRelativeCoordinate/10f + yoffset) if (binIndex > 0 invalid input: '&'invalid input: '&' ((binIndex + 1) % maxXbins == 0)) { xOffset = 0; yOffset += blockSize } else xOffset += blockSize