Package picard.illumina.parser

## Class ReadStructure

- java.lang.Object
- - picard.illumina.parser.ReadStructure

-     public class ReadStructure
      extends Object

  Describes the intended logical output structure of clusters of an Illumina run. (e.g. If the input data consists of 80 base clusters and we provide a read structure of "28T8M8B8S28T" then those bases should be split into 4 reads: read one should be 28 cycles of template, read two should be 8 cycles of molecular barcode, read three should be 8 cycles of sample barcode, 8 cycles are skipped, read four should be another 36 cycle template read.) Note: In future releases, ReadStructures will be specified by clients of IlluminaDataProvider(currently read structures are detected by IlluminaDataProviderFactory via the structure of QSeq files). When working with QSeq formats, while the individual reads need not fall on QSeq end file boundaries the total number of cycles should equal the total number of cycles found in all end files for one tile. (e.g. if I have 80 reads and 3 end files per tile, those end files should have a total of 80 reads in them regardless of how many reads appear in each individual file)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `ReadStructure.Substructure` | Represents a subset of ReadDescriptors in the containing ReadStructure, they ARE NOT necessarily contiguous in the containing ReadStructure but they ARE in the order they appear in the containing ReadStructure

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `List<ReadDescriptor>` | `descriptors` |
    `ReadStructure.Substructure` | `molecularBarcode` |
    `ReadStructure.Substructure` | `nonSkips` |
    `static String` | `PARAMETER_DOC` |
    `int[]` | `readLengths` |
    `ReadStructure.Substructure` | `sampleBarcodes` |
    `ReadStructure.Substructure` | `skips` |
    `ReadStructure.Substructure` | `templates` |
    `int` | `totalCycles` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ReadStructure​(String readStructureString)` | Converts readStructureString into a List<ReadDescriptor> and calls the primary constructor using this List as it's argument.
    `ReadStructure​(List<ReadDescriptor> collection)` | Copies collection into descriptors (making descriptors unmodifiable) and then calculates relevant statistics about descriptors.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object thatObj)` |
    `int` | `getNumDescriptors()` |
    `int` | `hashCode()` |
    `String` | `toString()` | Converts this object into a String using rules complementary to the single string constructor above.

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### PARAMETER_DOC

          public static final String PARAMETER_DOC

      See Also:
        Constant Field Values

    - #### descriptors

          public final List<ReadDescriptor> descriptors

    - #### totalCycles

          public final int totalCycles

    - #### readLengths

          public final int[] readLengths

    - #### sampleBarcodes

          public final ReadStructure.Substructure sampleBarcodes

    - #### templates

          public final ReadStructure.Substructure templates

    - #### molecularBarcode

          public final ReadStructure.Substructure molecularBarcode

    - #### skips

          public final ReadStructure.Substructure skips

    - #### nonSkips

          public final ReadStructure.Substructure nonSkips

  - ### Constructor Detail

    - #### ReadStructure

          public ReadStructure​(List<ReadDescriptor> collection)

      Copies collection into descriptors (making descriptors unmodifiable) and then calculates relevant statistics about descriptors.
      Parameters:
        `collection` - A collection of ReadDescriptors that describes this ReadStructure

    - #### ReadStructure

          public ReadStructure​(String readStructureString)

      Converts readStructureString into a List<ReadDescriptor> and calls the primary constructor using this List as it's argument.
      Parameters:
        `readStructureString` - A string of the format <number of bases><type><number of bases><type>...<number of bases><type> describing this read structure

  - ### Method Detail

    - #### getNumDescriptors

          public int getNumDescriptors()

    - #### toString

          public String toString()

      Converts this object into a String using rules complementary to the single string constructor above.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string of the form <number of bases><type><number of bases><type>...<number of bases><type> with one <number of bases><type> per ReadDescriptor in descriptors.

    - #### equals

          public boolean equals​(Object thatObj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`