Class BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD>

  • Type Parameters:
    CLUSTER_OUTPUT_RECORD - The type of records that the built converter will output.

    public class BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD>
    extends Object
    BasecallsConverterBuilder creates and configures BasecallsConverter objects. It builds and returns a BasecallsConverter that includes record sorting.
    • Constructor Detail

      • BasecallsConverterBuilder

        public BasecallsConverterBuilder​(File basecallsDir,
                                         int[] lanes,
                                         ReadStructure readStructure,
                                         Map<String,​? extends htsjdk.io.Writer<CLUSTER_OUTPUT_RECORD>> barcodeRecordWriterMap)
        Constructs a new builder used for creating BasecallsConverter objects.
        Parameters:
        basecallsDir - Where to read basecalls from.
        lanes - What lanes to process.
        readStructure - How to interpret each cluster.
        barcodeRecordWriterMap - Map from barcode to CLUSTER_OUTPUT_RECORD writer. If demultiplex is false, must contain one writer stored with key=null.
    • Method Detail

      • withIgnoreUnexpectedBarcodes

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> withIgnoreUnexpectedBarcodes​(boolean ignoreUnexpectedBarcodes)
        Configures whether or not the converter will ignore unexpected barcodes or throw an exception if one is found.
        Parameters:
        ignoreUnexpectedBarcodes - If true, will ignore reads whose called barcode is not found in barcodeRecordWriterMap.
        Returns:
        A builder that will create a converter with the ignoreUnexpectedBarcodes boolean set.
      • withApplyEamssFiltering

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> withApplyEamssFiltering​(boolean applyEamssFiltering)
        Configures whether or not the converter will apply EAMSS filtering.
        Parameters:
        applyEamssFiltering - If true, apply EAMSS filtering if parsing BCLs for bases and quality scores.
        Returns:
        A builder that will create a converter with the applyEamssFiltering boolean set.
      • withIncludeNonPfReads

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> withIncludeNonPfReads​(boolean includeNonPfReads)
        Configures whether or not the converter will ignore non-PF reads.
        Parameters:
        includeNonPfReads - If true, will include ALL reads (including those which do not have PF set). This option does nothing for instruments that output cbcls (Novaseqs)
        Returns:
        A builder that will create a converter with the includeNonPfReads boolean set.
      • withBclQualityEvaluationStrategy

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> withBclQualityEvaluationStrategy​(BclQualityEvaluationStrategy bclQualityEvaluationStrategy)
        Configures the bcl quality evaluation strategy that the converter will apply.
        Parameters:
        bclQualityEvaluationStrategy - The mechanism for revising and evaluating qualities read from a BCL file
        Returns:
        A builder that will create a converter with the bclQualityEvaluationStrategy set.
      • tileLimit

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> tileLimit​(Integer tileLimit)
        Configures the total number of tiles that the converter will process.
        Parameters:
        tileLimit - If non-null, process no more than this many tiles.
        Returns:
        A builder that will create a converter with tileLimit set.
      • firstTile

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> firstTile​(Integer firstTile)
        Configures the first tile that the converter will begin processing at.
        Parameters:
        firstTile - If non-null, start processing at this tile.
        Returns:
        A builder that will create a converter with firstTile set.
      • numProcessors

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> numProcessors​(int numProcessors)
        Configures how many processors this converter will use.
        Parameters:
        numProcessors - Controls number of threads. If <= 0, the number of threads allocated is available cores - numProcessors.
        Returns:
        A builder that will create a converter with numProcessors set.
      • withDemultiplex

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> withDemultiplex​(boolean demultiplex)
        Configures whether or not the converter will demultiplex reads by barcode.
        Parameters:
        demultiplex - If true, output is split by barcode, otherwise all are written to the same output stream.
        Returns:
        A builder that will create a converter with demultiplex set.
      • withBarcodesDir

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> withBarcodesDir​(File barcodesDir)
        Configure the director used to find barcode files created by ExtractIlluminaBarcodes. These files are used to demultiplex reads.
        Parameters:
        barcodesDir - Where to read barcodes from (optional; use basecallsDir if not specified).
        Returns:
        A builder that will create a converter with barcodesDir set.
      • withMaxRecordsInRam

        public BasecallsConverterBuilder<CLUSTER_OUTPUT_RECORD> withMaxRecordsInRam​(int maxReadsInRam)
        Specify the max number of records in RAM. This is divided by the number of tile processing threads and sets the max number of records in RAM per tile.
        Parameters:
        maxReadsInRam - The maximum number of records in RAM to store for each tile before spilling to disk.
        Returns:
        A builder that will create a converter with the maximum records in RAM set to `maxReadsInRam/numThreads`