Package htsjdk.samtools.util
Class SolexaQualityConverter
- java.lang.Object
-
- htsjdk.samtools.util.SolexaQualityConverter
-
public class SolexaQualityConverter extends Object
Optimized method for converting Solexa ASCII qualities into Phred scores. Pre-computes all values in order to eliminate repeated computation.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ILLUMINA_TO_PHRED_SUBTRAHEND
This value is removed from an Illumina 1.8 quality score to make it a Phred scorestatic int
PHRED_ADDEND
This value is added to a Phred scord to make it printable ASCIIstatic int
SOLEXA_ADDEND
This value is added to a Solexa quality score to make it printable ASCII
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
convertSolexa_1_3_QualityCharsToPhredBinary(byte[] solexaQuals)
Casava 1.3 stores phred-scaled qualities, but non-standard because they have 64 added to them rather than the standard 33.void
convertSolexa_1_3_QualityCharsToPhredBinary(int offset, int length, byte[] solexaQuals)
void
convertSolexaQualityCharsToPhredBinary(byte[] solexaQuals)
Decodes an array of solexa quality ASCII chars into Phred numeric space.void
convertSolexaQualityCharsToPhredChars(byte[] solexaQuals)
Decodes an array of solexa quality ASCII chars into Phred ASCII space.static SolexaQualityConverter
getSingleton()
byte[]
getSolexaToPhredConversionTable()
byte
solexaCharToPhredBinary(byte solexaQuality)
Convert a solexa quality ASCII character into a phred score.
-
-
-
Field Detail
-
SOLEXA_ADDEND
public static final int SOLEXA_ADDEND
This value is added to a Solexa quality score to make it printable ASCII- See Also:
- Constant Field Values
-
PHRED_ADDEND
public static final int PHRED_ADDEND
This value is added to a Phred scord to make it printable ASCII- See Also:
- Constant Field Values
-
ILLUMINA_TO_PHRED_SUBTRAHEND
public static final int ILLUMINA_TO_PHRED_SUBTRAHEND
This value is removed from an Illumina 1.8 quality score to make it a Phred score- See Also:
- Constant Field Values
-
-
Method Detail
-
getSingleton
public static SolexaQualityConverter getSingleton()
-
solexaCharToPhredBinary
public byte solexaCharToPhredBinary(byte solexaQuality)
Convert a solexa quality ASCII character into a phred score.
-
getSolexaToPhredConversionTable
public byte[] getSolexaToPhredConversionTable()
- Returns:
- a byte array that can be indexed by Solexa ASCII quality, with value of corresponding Phred score. Elements 0-63 are invalid because Solexa qualities should all be >= 64. Do not modify this array!
-
convertSolexaQualityCharsToPhredBinary
public void convertSolexaQualityCharsToPhredBinary(byte[] solexaQuals)
Decodes an array of solexa quality ASCII chars into Phred numeric space. Decode in place in order to avoid extra object allocation.
-
convertSolexaQualityCharsToPhredChars
public void convertSolexaQualityCharsToPhredChars(byte[] solexaQuals)
Decodes an array of solexa quality ASCII chars into Phred ASCII space. Decode in place in order to avoid extra object allocation.
-
convertSolexa_1_3_QualityCharsToPhredBinary
public void convertSolexa_1_3_QualityCharsToPhredBinary(byte[] solexaQuals)
Casava 1.3 stores phred-scaled qualities, but non-standard because they have 64 added to them rather than the standard 33.- Parameters:
solexaQuals
- qualities are converted in place.
-
convertSolexa_1_3_QualityCharsToPhredBinary
public void convertSolexa_1_3_QualityCharsToPhredBinary(int offset, int length, byte[] solexaQuals)
-
-