Package picard.illumina.parser.readers

# Class BclReader

java.lang.Object
picard.illumina.parser.readers.BaseBclReader
picard.illumina.parser.readers.BclReader

All Implemented Interfaces:
  `htsjdk.samtools.util.CloseableIterator<BclData>`, `Closeable`, `AutoCloseable`, `Iterator<BclData>`

public class BclReader extends BaseBclReader implements htsjdk.samtools.util.CloseableIterator<BclData>
BCL Files are base call and quality score binary files containing a (base,quality) pair for successive clusters. The file is structured as followed: Bytes 1-4 : unsigned int numClusters Bytes 5-numClusters + 5 : 1 byte base/quality score

The base/quality scores are organized as follows (with one exception, SEE BELOW): The right 2 most bits (these are the LEAST significant bits) indicate the base, where A=00(0x00), C=01(0x01), G=10(0x02), and T=11(0x03)

The remaining bytes compose the quality score which is an unsigned int.

EXCEPTION: If a byte is entirely 0 (e.g. byteRead == 0) then it is a no call, the base becomes '.' and the Quality becomes 2, the default illumina masking value

(E.g. if we get a value in binary of 10001011 it gets transformed as follows:

Value read: 10001011(0x8B)

Quality Base

100010 11 00100010 0x03 0x22 T 34 T

So the output base/quality will be a (T/34)

## Nested Class Summary

## Nested classes/interfaces inherited from class picard.illumina.parser.readers.BaseBclReader

`BaseBclReader.CycleData, BaseBclReader.TileData`

## Field Summary

### Fields inherited from class picard.illumina.parser.readers.BaseBclReader

`NO_CALL_BASE`

## Constructor Summary

Constructors
Constructor
Description
`BclReader(File bclFile, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)`
`BclReader(List<File> bclsForOneTile, int[] outputLengths, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`assertProperFileStructure(File file)`
`void`
`close()`
`static long`
`getNumberOfClusters(File file)`
`boolean`
`hasNext()`
`static boolean`
`isBlockGzipped(File file)`
`static boolean`
`isGzipped(File file)`
`static BclReader`
`makeSeekable(List<File> files, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, int[] outputLengths)`
`BclData`
`next()`
`void`
`remove()`
`int`
`seek(List<File> files, TileIndex tileIndex, int currentTile)`

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

### BclReader

public BclReader(List<File> bclsForOneTile, int[] outputLengths, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)

### BclReader

public BclReader(File bclFile, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)

## Method Details

### isGzipped

public static boolean isGzipped(File file)

### isBlockGzipped

public static boolean isBlockGzipped(File file)

### getNumberOfClusters

public static long getNumberOfClusters(File file)

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `htsjdk.samtools.util.CloseableIterator<BclData>`

### hasNext

public boolean hasNext()

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

### assertProperFileStructure

protected void assertProperFileStructure(File file)

### next

public BclData next()

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

### remove

public void remove()

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

### makeSeekable

public static BclReader makeSeekable(List<File> files, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, int[] outputLengths)

### seek

public int seek(List<File> files, TileIndex tileIndex, int currentTile)