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
ConstructorsConstructorDescriptionBclReader
(File bclFile, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable) BclReader
(List<File> bclsForOneTile, int[] outputLengths, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
close()
static long
getNumberOfClusters
(File file) boolean
hasNext()
static boolean
isBlockGzipped
(File file) static boolean
static BclReader
makeSeekable
(List<File> files, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, int[] outputLengths) next()
void
remove()
int
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
-
isBlockGzipped
-
getNumberOfClusters
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacehtsjdk.samtools.util.CloseableIterator<BclData>
-
hasNext
public boolean hasNext() -
assertProperFileStructure
-
next
-
remove
public void remove() -
makeSeekable
public static BclReader makeSeekable(List<File> files, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, int[] outputLengths) -
seek
-