Package htsjdk.samtools.util
Class SolexaQualityConverter
java.lang.Object
htsjdk.samtools.util.SolexaQualityConverter
Optimized method for converting Solexa ASCII qualities into Phred scores.
Pre-computes all values in order to eliminate repeated computation.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
This value is removed from an Illumina 1.8 quality score to make it a Phred scorestatic final int
This value is added to a Phred scord to make it printable ASCIIstatic final int
This value is added to a Solexa quality score to make it printable ASCII -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
byte[]
byte
solexaCharToPhredBinary
(byte solexaQuality) Convert a solexa quality ASCII character into a phred score.
-
Field Details
-
SOLEXA_ADDEND
public static final int SOLEXA_ADDENDThis value is added to a Solexa quality score to make it printable ASCII- See Also:
-
PHRED_ADDEND
public static final int PHRED_ADDENDThis value is added to a Phred scord to make it printable ASCII- See Also:
-
ILLUMINA_TO_PHRED_SUBTRAHEND
public static final int ILLUMINA_TO_PHRED_SUBTRAHENDThis value is removed from an Illumina 1.8 quality score to make it a Phred score- See Also:
-
-
Method Details
-
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)
-