Package task

Class ExecutorExpand

java.lang.Object
task.ExecutorExpand

public class ExecutorExpand extends Object
The ExecutorExpand class is responsible for executing the expand task to extend existing genomic data.

This class orchestrates the process of expanding an existing storage with new variant call files (VCF), updating sample attributes, annotating variants, inferring sequence types, and recomputing statistics.

  • Constructor Details

    • ExecutorExpand

      public ExecutorExpand(CLIExpand cli) throws IOException
      Constructs an instance of the ExecutorExpand class.

      This constructor initializes the necessary components for the expand task, including:

      • Storage for genomic data, created based on the command-line interface (CLI) input.
      • A StorageUpdater to manage updates to the storage.
      • A VariantAnnotator to annotate genetic variants.
      Parameters:
      cli - The CLIExpand instance containing the command-line arguments and options.
      Throws:
      IOException - If an I/O error occurs during the initialization of storage or other components.
  • Method Details

    • run

      public void run() throws IOException, MusialException
      Executes the main logic of the expand task.

      This method performs the following steps:

      • Processes VCF files to load variants into the storage.
      • Reloads existing variant calls from the storage.
      • Detaches samples already present in the storage to avoid duplication.
      • Updates variants and sample attributes based on the processed VCF data.
      • Determines the output path for writing the updated storage data.
      • Runs variant annotation using SnpEff if applicable.
      • Performs sequence typing if reference sequences are available.
      • Recomputes statistics for the storage.
      • Writes the updated storage data to the specified output file or logs the changes in dry-run mode.
      Throws:
      IOException - If an I/O error occurs during file processing or storage operations.
      MusialException - If an error specific to the application logic occurs.