Package picard.illumina

## Class ClusterDataToSamConverter

- java.lang.Object
- - picard.illumina.ClusterDataToSamConverter

-     public class ClusterDataToSamConverter
      extends Object

  Takes ClusterData provided by an IlluminaDataProvider into one or two SAMRecords, as appropriate, and optionally marking adapter sequence. There is one converter per IlluminaBasecallsToSam run, and all the TileProcessors use the same converter.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClusterDataToSamConverter​(String runBarcode, String readGroupId, ReadStructure readStructure, List<AdapterPair> adapters, picard.illumina.ClusterDataToSamConverter.PopulateBarcode barcodePopulationStrategy, boolean includeQualitiesWithBarcode)` | Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `picard.illumina.IlluminaBasecallsToSam.SAMRecordsForCluster` | `convertClusterToOutputRecord​(ClusterData cluster)` | Creates the SAMRecord for each read in the cluster
    `ClusterDataToSamConverter` | `withMolecularIndexQualityTag​(String molecularIndexQualityTag)` | Sets the SAM tag to use to store the molecular index base qualities.
    `ClusterDataToSamConverter` | `withMolecularIndexTag​(String molecularIndexTag)` | Sets the SAM tag to use to store the molecular index bases.
    `ClusterDataToSamConverter` | `withTagPerMolecularIndex​(List<String> tagPerMolecularIndex)` | Sets the SAM tags to use to store the bases each molecular index.

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

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

- - ### Constructor Detail

    - #### ClusterDataToSamConverter

          public ClusterDataToSamConverter​(String runBarcode,
                                           String readGroupId,
                                           ReadStructure readStructure,
                                           List<AdapterPair> adapters,
                                           picard.illumina.ClusterDataToSamConverter.PopulateBarcode barcodePopulationStrategy,
                                           boolean includeQualitiesWithBarcode)

      Constructor
      Parameters:
        `runBarcode` - Used to construct read names.
        `readGroupId` - If non-null, set RG attribute on SAMRecord to this.
        `readStructure` - The expected structure (number of reads and indexes, and their length) in the read.
        `adapters` - The list of adapters to check for in the read
        `barcodePopulationStrategy` - When to populate BC tag?

  - ### Method Detail

    - #### withMolecularIndexTag

          public ClusterDataToSamConverter withMolecularIndexTag​(String molecularIndexTag)

      Sets the SAM tag to use to store the molecular index bases. If multiple molecular indexes exist, it will concatenate them and store them in this tag.

    - #### withMolecularIndexQualityTag

          public ClusterDataToSamConverter withMolecularIndexQualityTag​(String molecularIndexQualityTag)

      Sets the SAM tag to use to store the molecular index base qualities. If multiple molecular indexes exist, it will concatenate them and store them in this tag.

    - #### withTagPerMolecularIndex

          public ClusterDataToSamConverter withTagPerMolecularIndex​(List<String> tagPerMolecularIndex)

      Sets the SAM tags to use to store the bases each molecular index. This will only be used if there are more than one molecular index. If fewer tags are given than molecular indexes found, then the remaining molecular indexes will be concatenated and stored in the last tag. If more tags are provided than molecular indexes found, the additional tags will not be used.

    - #### convertClusterToOutputRecord

          public picard.illumina.IlluminaBasecallsToSam.SAMRecordsForCluster convertClusterToOutputRecord​(ClusterData cluster)

      Creates the SAMRecord for each read in the cluster