Package cli

Class CLIProfile

java.lang.Object
cli.CLIProfile
All Implemented Interfaces:
CLI

public class CLIProfile extends Object implements CLI
Handles the profile task CLI parameters.

This class defines the command-line options and validation logic for the profile task. See options() for details.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    The content type to profile.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The content type specified by the user.
    final Path
    The path to the input storage file.
    final Path
    The path to the output destination.
    final Set<String>
    The set of query filters provided by the user.
    final boolean
    Indicates whether to represent entries in a reduced format.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CLIProfile(org.apache.commons.cli.CommandLine arguments)
    Constructs a CLIView instance by parsing the provided command-line arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.commons.cli.Options
    Defines the command-line options for the view task.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • input

      public final Path input
      The path to the input storage file.
    • content

      public final CLIProfile.Content content
      The content type specified by the user.
    • output

      public final Path output
      The path to the output destination.
    • query

      public final Set<String> query
      The set of query filters provided by the user.
    • reduced

      public final boolean reduced
      Indicates whether to represent entries in a reduced format.

      If true, sequence types are represented as numbers with 0 as the reference or synonymous sequence, and variants are shown without detailed call information.

  • Constructor Details

    • CLIProfile

      public CLIProfile(org.apache.commons.cli.CommandLine arguments) throws MusialException
      Constructs a CLIView instance by parsing the provided command-line arguments.

      This constructor validates and extracts the input storage file path, content type, output destination, and query filters from the provided CommandLine arguments.

      Parameters:
      arguments - The CommandLine object containing the parsed arguments.
      Throws:
      MusialException - If an error occurs while parsing the arguments.
  • Method Details

    • options

      public static org.apache.commons.cli.Options options()
      Defines the command-line options for the view task.

      The options include:

      • -I, --storage: Path to the input storage file (required).
      • -C, --content: The content type to profile (VARIANTS, ALLELES, PROTEOFORMS) (required).
      • -q, --query: One or more identifiers or genomic ranges to query (optional).
      • -x, --reduced: Represent entries in a reduced format, i.e., sequence types as numbers with 0 as the reference or synonymous sequence and variants without detailed call information.
      • -o, --output: Path to the output file or a special value ("print" or "stdout") (optional).
      Returns:
      An Options object containing the defined CLI options.