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 final int`
`ILLUMINA_TO_PHRED_SUBTRAHEND`
This value is removed from an Illumina 1.8 quality score to make it a Phred score
`static final int`
`PHRED_ADDEND`
This value is added to a Phred scord to make it printable ASCII
`static final int`
`SOLEXA_ADDEND`
This value is added to a Solexa quality score to make it printable ASCII

## Method Summary

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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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:
  - 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 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)