Package cli

Class CLIBuild

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

public class CLIBuild extends Object implements CLI
Handles the build task CLI parameters.

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

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final org.biojava.nbio.genome.parsers.gff.FeatureList
    The list of features parsed from the annotation file.
    A map containing the features to be matched, with the feature ID as the key and another map of at least a `key` and `value` attribute to match the feature with.
    A map containing the masked positions, with the contig ID as the key and a set of excluded positions as the value.
    final boolean
    If filtered variants should be treated as missing data (masked) or ignored.
    final int
    The minimal depth of coverage wrt.
    final double
    The minimal frequency wrt.
    final Path
    The output path where the MUSIAL storage will be saved.
    final htsjdk.samtools.reference.IndexedFastaSequenceFile
    The reference sequence file used for variant annotation and typing.
    final boolean
    If annotation of variants is skipped during the build process.
    final boolean
    If typing of samples is skipped during the build process.
    final List<Path>
    The list of VCF files to be processed.
    A map containing the VCF metadata, with the sample ID as the key and another map of metadata attributes and their values as the
  • Constructor Summary

    Constructors
    Constructor
    Description
    CLIBuild(org.apache.commons.cli.CommandLine arguments)
    Constructs a CLIBuild instance by parsing and initializing configuration parameters.
  • Method Summary

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

    Methods inherited from class java.lang.Object

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

    • minimalCoverage

      public final int minimalCoverage
      The minimal depth of coverage wrt. reads of a variant to be accepted.
    • minimalFrequency

      public final double minimalFrequency
      The minimal frequency wrt. reads supporting a nucleotide variant call for a variant to be accepted.
    • maskFiltered

      public final boolean maskFiltered
      If filtered variants should be treated as missing data (masked) or ignored.
    • skipAnnotation

      public final boolean skipAnnotation
      If annotation of variants is skipped during the build process.
    • skipTyping

      public final boolean skipTyping
      If typing of samples is skipped during the build process.
    • maskedPositions

      public final Map<String,Set<Integer>> maskedPositions
      A map containing the masked positions, with the contig ID as the key and a set of excluded positions as the value.
    • reference

      public final htsjdk.samtools.reference.IndexedFastaSequenceFile reference
      The reference sequence file used for variant annotation and typing.
    • featureList

      public final org.biojava.nbio.genome.parsers.gff.FeatureList featureList
      The list of features parsed from the annotation file.
    • output

      public final Path output
      The output path where the MUSIAL storage will be saved.
    • vcfFiles

      public final List<Path> vcfFiles
      The list of VCF files to be processed.
    • vcfMeta

      public final Map<String,Map<String,String>> vcfMeta
      A map containing the VCF metadata, with the sample ID as the key and another map of metadata attributes and their values as the
    • features

      public final Map<String,Map<String,String>> features
      A map containing the features to be matched, with the feature ID as the key and another map of at least a `key` and `value` attribute to match the feature with.
  • Constructor Details

    • CLIBuild

      public CLIBuild(org.apache.commons.cli.CommandLine arguments) throws IOException, MusialException, com.github.fge.jsonschema.core.exceptions.ProcessingException
      Constructs a CLIBuild instance by parsing and initializing configuration parameters.

      This constructor processes the command-line arguments to extract and validate the build task configuration.

      Parameters:
      arguments - The CommandLine object containing the parsed command-line arguments.
      Throws:
      IOException - If an I/O error occurs during file reading.
      MusialException - If the configuration validation fails or required parameters are missing.
      com.github.fge.jsonschema.core.exceptions.ProcessingException - If the JSON schema validation fails.
  • Method Details

    • options

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

      The options include:

      • -C, --configuration: Path to a JSON file specifying the build task parameter configuration for MUSIAL (required).
      Returns:
      An Options object containing the defined command-line options.