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 Details

    • SOLEXA_ADDEND

      public static final int SOLEXA_ADDEND
      This value is added to a Solexa quality score to make it printable ASCII
      See Also:
    • PHRED_ADDEND

      public static final int PHRED_ADDEND
      This 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_SUBTRAHEND
      This value is removed from an Illumina 1.8 quality score to make it a Phred score
      See Also:
  • Method Details

    • 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)