{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "freebayes",
  "description": "Freebayes is a Bayesian genetic variant detector designed to\nfind small polymorphisms, specifically SNPs.\n",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "bam": {
          "type": "string",
          "format": "path",
          "description": "Add FILE to the set of BAM files to be analyzed.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "bam_list": {
          "type": "string",
          "format": "path",
          "description": "A file containing a list of BAM files to be analyzed.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "stdin": {
          "type": "boolean",
          "description": "Read BAM input on stdin.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "fasta_reference": {
          "type": "string",
          "format": "path",
          "description": "Use FILE as the reference sequence for analysis",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "fasta_reference_index": {
          "type": "string",
          "format": "path",
          "description": "Use FILE.fai as the index of reference sequence for analysis.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "targets": {
          "type": "string",
          "format": "path",
          "description": "Limit analysis to targets listed in the BED-format FILE.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "region": {
          "type": "string",
          "description": "Limit analysis to the specified region, 0-base coordinates, end_position not included (same as BED format).",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "samples": {
          "type": "string",
          "format": "path",
          "description": "Limit analysis to samples listed (one per line) in the FILE",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "populations": {
          "type": "string",
          "format": "path",
          "description": "Each line of FILE should list a sample and a population which it is part of",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "cnv_map": {
          "type": "string",
          "format": "path",
          "description": "Read a copy number map from the BED file FILE, which has either a sample-level ploidy or a region-specific format.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "gvcf": {
          "type": "boolean",
          "description": "Write gVCF output, which indicates coverage in uncalled regions.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "gvcf_chunk": {
          "type": "integer",
          "description": "When writing gVCF output emit a record for every NUM bases.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "variant_input": {
          "type": "string",
          "format": "path",
          "description": "Use variants reported in VCF file as input to the algorithm",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "only_use_input_alleles": {
          "type": "boolean",
          "description": "Only provide variant calls and genotype likelihoods for sites and alleles which are provided in the VCF input, and provide output in the VCF for all input alleles, not just those which have support in the data.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "haplotype_basis_alleles": {
          "type": "string",
          "format": "path",
          "description": "When specified, only variant alleles provided in this input VCF will be used for the construction of complex or haplotype alleles.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "report_all_haplotype_alleles": {
          "type": "boolean",
          "description": "At sites where genotypes are made over haplotype alleles, provide information about all alleles in output, not only those which are called.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "report_monomorphic": {
          "type": "boolean",
          "description": "Report even loci which appear to be monomorphic, and report all considered alleles, even those which are not in called genotypes.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "pvar": {
          "type": "number",
          "description": "Report sites if the probability that there is a polymorphism at the site is greater than N",
          "help_text": "Type: `double`, multiple: `False`, default: `0.0`. ",
          "default": 0.0
        },
        "strict_vcf": {
          "type": "boolean",
          "description": "Generate strict VCF format (FORMAT/GQ will be an int).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "theta": {
          "type": "number",
          "description": "The expected mutation rate or pairwise nucleotide diversity among the population under analysis",
          "help_text": "Type: `double`, multiple: `False`, default: `0.001`. ",
          "default": 0.001
        },
        "ploidy": {
          "type": "integer",
          "description": "Sets the default ploidy for the analysis to N.",
          "help_text": "Type: `integer`, multiple: `False`, default: `2`. ",
          "default": 2
        },
        "pooled_discrete": {
          "type": "boolean",
          "description": "Assume that samples result from pooled sequencing",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "pooled_continuous": {
          "type": "boolean",
          "description": "Output all alleles which pass input filters, regardles of genotyping outcome or model.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "use_reference_allele": {
          "type": "boolean",
          "description": "This flag includes the reference allele in the analysis as if it is another sample from the same population.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "reference_quality": {
          "type": "string",
          "description": "Assign mapping quality of MQ to the reference allele at each site and base quality of BQ.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"100,60\"`. ",
          "default": "100,60"
        },
        "throw_away_snp_obs": {
          "type": "boolean",
          "description": "Ignore SNP alleles.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "throw_away_mnps_obs": {
          "type": "boolean",
          "description": "Ignore multi-nuceotide polymorphisms, MNPs",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "throw_away_indel_obs": {
          "type": "boolean",
          "description": "Ignore insertion and deletion alleles",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "throw_away_complex_obs": {
          "type": "boolean",
          "description": "Ignore complex events (composites of other classes)",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "use_best_n_alleles": {
          "type": "integer",
          "description": "Evaluate only the best N SNP alleles, ranked by sum of supporting quality scores.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "max_complex_gap": {
          "type": "integer",
          "description": "Allow haplotype calls with contiguous embedded matches of up to this length.",
          "help_text": "Type: `integer`, multiple: `False`, default: `3`. ",
          "default": 3
        },
        "min_repeat_size": {
          "type": "integer",
          "description": "When assembling observations across repeats, require the total repeat length at least this many bp.",
          "help_text": "Type: `integer`, multiple: `False`, default: `5`. ",
          "default": 5
        },
        "min_repeat_entropy": {
          "type": "integer",
          "description": "To detect interrupted repeats, build across sequence until it has entropy > N bits per bp",
          "help_text": "Type: `integer`, multiple: `False`, default: `1`. ",
          "default": 1
        },
        "no_partial_observations": {
          "type": "boolean",
          "description": "Exclude observations which do not fully span the dynamically-determined detection window",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "dont_left_align_indels": {
          "type": "boolean",
          "description": "Turn off left-alignment of indels, which is enabled by default.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "use_duplicate_reads": {
          "type": "boolean",
          "description": "Include duplicate-marked alignments in the analysis",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "min_mapping_quality": {
          "type": "integer",
          "description": "Exclude alignments from analysis if they have a mapping quality less than Q.",
          "help_text": "Type: `integer`, multiple: `False`, default: `1`. ",
          "default": 1
        },
        "min_base_quality": {
          "type": "integer",
          "description": "Exclude alleles from analysis if their supporting base quality is less than Q",
          "help_text": "Type: `integer`, multiple: `False`, default: `1`. ",
          "default": 1
        },
        "min_supporting_allele_qsum": {
          "type": "integer",
          "description": "Consider any allele in which the sum of qualities of supporting observations is at least Q.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "min_supporting_mapping_qsum": {
          "type": "integer",
          "description": "Consider any allele in which and the sum of mapping qualities of supporting reads is at least.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "mismatch_base_quality_threshold": {
          "type": "integer",
          "description": "Count mismatches toward --read-mismatch-limit if the base quality of the mismatch is >= Q.",
          "help_text": "Type: `integer`, multiple: `False`, default: `10`. ",
          "default": 10
        },
        "read_max_mismatch_fraction": {
          "type": "number",
          "description": "Exclude reads with more than N mismatches where each mismatch has base quality >= mismatch-base-quality-threshold.",
          "help_text": "Type: `double`, multiple: `False`, default: `1.0`. ",
          "default": 1.0
        },
        "read_mismatch_limit": {
          "type": "integer",
          "description": "Exclude reads with more than N [0,1] fraction of mismatches where each mismatch has base quality >= mismatch-base-quality-threshold.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "read_snp_limit": {
          "type": "integer",
          "description": "Exclude reads with more than N base mismatches, ignoring gaps with quality >= mismatch-base-quality-threshold.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "read_indel_limit": {
          "type": "integer",
          "description": "Exclude reads with more than N separate gaps.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "standard_filters": {
          "type": "boolean",
          "description": "Use stringent input base and mapping quality filters, equivalent to -m 30 -q 20 -R 0 -S 0",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "min_alternate_fraction": {
          "type": "number",
          "description": "Require at least this fraction of observations supporting an alternate allele within a single individual in order to evaluate the position.",
          "help_text": "Type: `double`, multiple: `False`, default: `0.05`. ",
          "default": 0.05
        },
        "min_alternate_count": {
          "type": "integer",
          "description": "Require at least this count of observations supporting an alternate allele within a single individual in order to evaluate the position.",
          "help_text": "Type: `integer`, multiple: `False`, default: `2`. ",
          "default": 2
        },
        "min_alternate_qsum": {
          "type": "integer",
          "description": "Require at least this sum of quality of observations supporting an alternate allele within a single individual in order to evaluate the position.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "min_alternate_total": {
          "type": "integer",
          "description": "Require at least this count of observations supporting an alternate allele within the total population in order to use the allele in analysis.",
          "help_text": "Type: `integer`, multiple: `False`, default: `1`. ",
          "default": 1
        },
        "min_coverage": {
          "type": "integer",
          "description": "Require at least this coverage to process a site.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "max_coverage": {
          "type": "integer",
          "description": "Do not process sites with greater than this coverage.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "no_population_priors": {
          "type": "boolean",
          "description": "Equivalent to --pooled-discrete --hwe-priors-off and removal of Ewens Sampling Formula component of priors.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "hwe_priors_off": {
          "type": "boolean",
          "description": "Disable estimation of the probability of the combination arising under HWE given the allele frequency as estimated by observation frequency.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "binomial_obs_priors_off": {
          "type": "boolean",
          "description": "Disable incorporation of prior expectations about observations",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "allele_balance_priors_off": {
          "type": "boolean",
          "description": "Disable use of aggregate probability of observation balance between alleles as a component of the priors.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "observation_bias": {
          "type": "string",
          "format": "path",
          "description": "Read length-dependent allele observation biases from FILE",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "base_quality_cap": {
          "type": "integer",
          "description": "Limit estimated observation quality by capping base quality at Q.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "prob_contamination": {
          "type": "number",
          "description": "An estimate of contamination to use for all samples.",
          "help_text": "Type: `double`, multiple: `False`, default: `1.0E-8`. ",
          "default": 1.0E-8
        },
        "legacy_gls": {
          "type": "boolean",
          "description": "Use legacy (polybayes equivalent) genotype likelihood calculations",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "contamination_estimates": {
          "type": "string",
          "format": "path",
          "description": "A file containing per-sample estimates of contamination, such as those generated by VerifyBamID.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "report_genotype_likelihood_max": {
          "type": "boolean",
          "description": "Report genotypes using the maximum-likelihood estimate provided from genotype likelihoods.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "genotyping_max_iterations": {
          "type": "integer",
          "description": "Iterate no more than N times during genotyping step.",
          "help_text": "Type: `integer`, multiple: `False`, default: `1000`. ",
          "default": 1000
        },
        "genotyping_max_banddepth": {
          "type": "integer",
          "description": "Integrate no deeper than the Nth best genotype by likelihood when genotyping.",
          "help_text": "Type: `integer`, multiple: `False`, default: `6`. ",
          "default": 6
        },
        "posterior_integration_limits": {
          "type": "string",
          "description": "Integrate all genotype combinations in our posterior space which include no more than N samples with their Mth best data likelihood.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"1,3\"`. ",
          "default": "1,3"
        },
        "exclude_unobserved_genotypes": {
          "type": "boolean",
          "description": "Skip sample genotypings for which the sample has no supporting reads.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "genotype_variant_threshold": {
          "type": "integer",
          "description": "Limit posterior integration to samples where the second-best genotype likelihood is no more than log(N) from the highest genotype likelihood for the sample.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "use_mapping_quality": {
          "type": "boolean",
          "description": "Use mapping quality of alleles when calculating data likelihoods.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "harmonic_indel_quality": {
          "type": "boolean",
          "description": "Use a weighted sum of base qualities around an indel, scaled by the distance from the indel",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "read_dependence_factor": {
          "type": "number",
          "description": "Incorporate non-independence of reads by scaling successive observations by this factor during data likelihood calculations.",
          "help_text": "Type: `double`, multiple: `False`, default: `0.9`. ",
          "default": 0.9
        },
        "genotype_qualities": {
          "type": "boolean",
          "description": "Calculate the marginal probability of genotypes and report as GQ in each sample field in the VCF output.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "debug": {
          "type": "boolean",
          "description": "Print debugging output.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "dd": {
          "type": "boolean",
          "description": "Print more verbose debugging output",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output directory",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output\"`, direction: `output`, example: `\"freebayes_out\"`. ",
          "default": "$id.$key.output"
        },
        "vcf": {
          "type": "string",
          "description": "Output VCF-format results to FILE.",
          "help_text": "Type: `string`, multiple: `False`, example: `\"snp.vcf\"`. "
        }
      }
    },
    "nextflow input-output arguments": {
      "title": "Nextflow input-output arguments",
      "type": "object",
      "description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.",
      "properties": {
        "publish_dir": {
          "type": "string",
          "description": "Path to an output directory.",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"output/\"`. "
        }
      }
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/input"
    },
    {
      "$ref": "#/$defs/output"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
