Package task

Class ExecutorProfile

java.lang.Object
task.ExecutorProfile

public class ExecutorProfile extends Object
The ExecutorProfile class is responsible for executing the profile task to profile samples.

This class initializes the CLI profile, loads the storage, and manages the storage table. It provides functionality to apply queries, populate the storage table based on the content type, and either print or write the output to a file.

  • Constructor Details

    • ExecutorProfile

      public ExecutorProfile(CLIProfile cli) throws IOException
      Constructs an instance of the ExecutorProfile class.

      This constructor initializes the CLI profile, loads the storage from the input path, and creates a storage table for managing data.

      Parameters:
      cli - The CLIProfile object containing user input and options.
      Throws:
      IOException - If an error occurs while loading the storage.
  • Method Details

    • run

      public void run()
      Executes the main logic of the ExecutorProfile class.

      This method applies query filters if provided, populates the storage table based on the content type, and either prints the table to the console or writes it to the specified output file.

      The method performs the following steps:

      • Checks if the query is not empty and applies the filters to the storage table.
      • Profiles the storage table based on the content type (VARIANTS, ALLELES, or PROTEOFORMS).
      • Prints the table to the console if no output file is specified, or writes it to the output file.

      If the content type is unexpected, an IllegalStateException is thrown.