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
-
-
Constructor Summary
Constructors Constructor Description BclReader(File bclFile, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)BclReader(List<File> bclsForOneTile, int[] outputLengths, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertProperFileStructure(File file)voidclose()static longgetNumberOfClusters(File file)booleanhasNext()static booleanisBlockGzipped(File file)static booleanisGzipped(File file)static BclReadermakeSeekable(List<File> files, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, int[] outputLengths)BclDatanext()voidremove()intseek(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 java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
queue
protected BclData queue
-
-
Constructor Detail
-
BclReader
public BclReader(List<File> bclsForOneTile, int[] outputLengths, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)
-
BclReader
public BclReader(File bclFile, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, boolean seekable)
-
-
Method Detail
-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacehtsjdk.samtools.util.CloseableIterator<BclData>
-
assertProperFileStructure
protected void assertProperFileStructure(File file)
-
makeSeekable
public static BclReader makeSeekable(List<File> files, BclQualityEvaluationStrategy bclQualityEvaluationStrategy, int[] outputLengths)
-
-