Package picard.util

# Class IlluminaUtil

java.lang.Object
picard.util.IlluminaUtil

public class IlluminaUtil extends Object
Misc utilities for working with Illumina specific files and data

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`IlluminaUtil.IlluminaAdapterPair`
Describes adapters used on each pair of strands

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`BARCODE_DELIMITER`

## Constructor Summary

Constructors
Constructor
Description
`IlluminaUtil()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`barcodeSeqsToString(byte[][] barcodes)`
Concatenates all the barcode sequences with BARCODE_DELIMITER
`static String`
`barcodeSeqsToString(String[] barcodes)`
Concatenates all the barcode sequences with BARCODE_DELIMITER
`static String`
`barcodeSeqsToString(List<String> barcodes)`
Concatenates all the barcode sequences with BARCODE_DELIMITER
`static String`
`byteArrayToString(byte[][] barcodes, String delim)`
Concatenates all the barcode sequences with BARCODE_DELIMITER
`static void`
`convertSolexaQualityAscii_1_1_ToPhredBinary(byte[] solexaQualities)`
Converts from Solexa ASCII to Phred binary in place.
`static byte`
`getSolexaQualityCharFromFourQualities(String[] qualities, int cycleNumber, htsjdk.samtools.util.FormatUtil formatter)`
Get a Solexa ASCII quality value from an array of strings that are integer qualities in this order: [cycle-1-A, cycle-1-C, cycle-1-G, cycle-1-T, cycle-2-A, ...].
`static Integer`
`getTileFromReadName(String readName)`
Parse the tile # from the read name.
`static byte[]`
`makePhredBinaryFromSolexaQualityAscii_1_3(String solexaQualities)`
Convert from Solexa-scaled ASCII qualities to Phred-scaled binary.
`static byte[]`
`makePhredBinaryFromSolexaQualityAscii_1_3(String solexaQualities, int offset, int length)`
Convert from Solexa-scaled ASCII qualities to Phred-scaled binary.
`static String`
`stringSeqsToString(String[] barcodes, String delim)`

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

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

## Field Details

### BARCODE_DELIMITER

public static final String BARCODE_DELIMITER

See Also:
  - Constant Field Values

## Constructor Details

### IlluminaUtil

public IlluminaUtil()

## Method Details

### getTileFromReadName

public static Integer getTileFromReadName(String readName)
Parse the tile # from the read name. If we find that there are other elements needed from the read name, it might be a good idea to put makeReadName() and various get..() methods into a new class.

Parameters:
  `readName` - As produced by IlluminaUtil.makeReadName()
Returns:
  tile number, or null if read name is not in correct format.

### makePhredBinaryFromSolexaQualityAscii_1_3

public static byte[] makePhredBinaryFromSolexaQualityAscii_1_3(String solexaQualities)
Convert from Solexa-scaled ASCII qualities to Phred-scaled binary. The only difference is Solexa qualities have 64 added to the phred binary to make them printable.

Parameters:
  `solexaQualities` - Printable ASCII qualities.
Returns:
  binary Phred-scaled qualities.

### makePhredBinaryFromSolexaQualityAscii_1_3

public static byte[] makePhredBinaryFromSolexaQualityAscii_1_3(String solexaQualities, int offset, int length)
Convert from Solexa-scaled ASCII qualities to Phred-scaled binary. The only difference is Solexa qualities have 64 added to the phred binary to make them printable.

Parameters:
  `solexaQualities` - Printable ASCII qualities.
  `offset` - Character at which to start conversion.
  `length` - Number of characters to convert.
Returns:
  binary Phred-scaled qualities.

### convertSolexaQualityAscii_1_1_ToPhredBinary

public static void convertSolexaQualityAscii_1_1_ToPhredBinary(byte[] solexaQualities)
Converts from Solexa ASCII to Phred binary in place. These are the older-style qualities rather than Phred qualities with a different addend to make them printable.

### getSolexaQualityCharFromFourQualities

public static byte getSolexaQualityCharFromFourQualities(String[] qualities, int cycleNumber, htsjdk.samtools.util.FormatUtil formatter)
Get a Solexa ASCII quality value from an array of strings that are integer qualities in this order: [cycle-1-A, cycle-1-C, cycle-1-G, cycle-1-T, cycle-2-A, ...]. The best quality from the 4 qualities for the cycle is found, and then it is ASCII-ized by adding 64.

Parameters:
  `qualities` - Array of integer quality strings.
  `cycleNumber` - Which cycle to get quality for.
  `formatter` - For converting decimal strings to ints.
Returns:
  best quality for the given cycle.
Throws:
  `PicardException` - if the best quality ASCII value is > 255.

### barcodeSeqsToString

public static String barcodeSeqsToString(List<String> barcodes)
Concatenates all the barcode sequences with BARCODE_DELIMITER

Parameters:
  `barcodes` -
Returns:
  A single string representation of all the barcodes

### barcodeSeqsToString

public static String barcodeSeqsToString(String[] barcodes)
Concatenates all the barcode sequences with BARCODE_DELIMITER

Parameters:
  `barcodes` -
Returns:
  A single string representation of all the barcodes

### barcodeSeqsToString

public static String barcodeSeqsToString(byte[][] barcodes)
Concatenates all the barcode sequences with BARCODE_DELIMITER

Parameters:
  `barcodes` -
Returns:
  A single string representation of all the barcodes

### stringSeqsToString

public static String stringSeqsToString(String[] barcodes, String delim)

### byteArrayToString

public static String byteArrayToString(byte[][] barcodes, String delim)
Concatenates all the barcode sequences with BARCODE_DELIMITER

Parameters:
  `barcodes` -
Returns:
  A single string representation of all the barcodes