{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bedtools_jaccard",
  "description": "Calculate Jaccard similarity statistic between two genomic feature files.\n\nThe Jaccard index measures similarity between finite sample sets, defined as\nthe size of the intersection divided by the size of the union. Values range\nfrom 0 (no intersection) to 1 (identical sets). This tool calculates the\nJaccard statistic for genomic intervals, providing a quantitative measure\nof overlap between two interval sets.\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input_a": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "First input file for Jaccard comparison.\n\n**Format:** BED, GFF, VCF file with genomic intervals\n**Requirement:** Must be sorted by chromosome, then start position\n**Usage:** File A for Jaccard similarity calculation\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"intervals_a.bed\"`. "
        },
        "input_b": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Second input file for Jaccard comparison.\n\n**Format:** BED, GFF, VCF file with genomic intervals\n**Requirement:** Must be sorted by chromosome, then start position\n**Usage:** File B for Jaccard similarity calculation\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"intervals_b.bed\"`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output file with Jaccard similarity statistics.\n\n**Format:** Tab-delimited with intersection, union, and Jaccard values\n**Columns:** intersection, union, jaccard\n**Range:** Jaccard values from 0.0 to 1.0\n",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.txt\"`, direction: `output`, example: `\"jaccard_results.txt\"`. ",
          "default": "$id.$key.output.txt"
        }
      }
    },
    "overlap options": {
      "title": "Overlap Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "min_overlap_a": {
          "type": "number",
          "description": "Minimum overlap required as fraction of A.\n\n**Range:** 0.0 to 1.0\n**Default:** 1E-9 (effectively 1bp)\n**Example:** 0.50 requires 50% of A to be overlapped\n",
          "help_text": "Type: `double`, multiple: `False`, example: `0.5`. "
        },
        "min_overlap_b": {
          "type": "number",
          "description": "Minimum overlap required as fraction of B.\n\n**Range:** 0.0 to 1.0\n**Default:** 1E-9 (effectively 1bp)\n**Example:** 0.50 requires 50% of B to be overlapped\n",
          "help_text": "Type: `double`, multiple: `False`, example: `0.5`. "
        },
        "reciprocal": {
          "type": "boolean",
          "description": "Require reciprocal overlap for A overlapping B.\n\n**Requirement:** Must be used solely with -f (min_overlap_a)\n**Effect:** Requires B overlaps specified fraction of A AND A overlaps same fraction of B\n**Example:** With -f 0.90 -r, requires B overlaps 90% of A AND A overlaps 90% of B\n**Default:** false\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "either": {
          "type": "boolean",
          "description": "Require minimum fraction satisfied for A OR B.\n\n**Effect:** Only one of -f or -F thresholds needs to be satisfied\n**Alternative:** Without -e, both fractions must be satisfied\n**Default:** false (both required)\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "strand options": {
      "title": "Strand Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "same_strand": {
          "type": "boolean",
          "description": "Require same strandedness for overlaps.\n\n**Effect:** Only consider overlaps on the same strand\n**Default:** false (strand-independent)\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "opposite_strand": {
          "type": "boolean",
          "description": "Require different strandedness for overlaps.\n\n**Effect:** Only consider overlaps on opposite strands\n**Default:** false (strand-independent)\n**Note:** May have issues in some bedtools versions requiring strand specification\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "format options": {
      "title": "Format Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "split": {
          "type": "boolean",
          "description": "Treat split BAM or BED12 entries as distinct intervals.\n\n**Effect:** Split multi-block entries into individual intervals\n**Usage:** For BAM alignments with gaps or BED12 entries\n**Default:** false\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "bed_output": {
          "type": "boolean",
          "description": "Write output in BED format when using BAM input.\n\n**Effect:** Forces BED output format for BAM inputs\n**Default:** false\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "header": {
          "type": "boolean",
          "description": "Print header from file A prior to results.\n\n**Effect:** Includes original header from input file A\n**Default:** false\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "advanced options": {
      "title": "Advanced Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "genome": {
          "type": "string",
          "format": "path",
          "description": "Genome file for consistent chromosome sorting.\n\n**Format:** Tab-delimited file with chromosome name and size\n**Usage:** Only applies when used with sorted data\n**Purpose:** Enforces consistent chromosome sort order\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"genome.txt\"`. "
        },
        "no_name_check": {
          "type": "boolean",
          "description": "Skip chromosome naming convention checks for sorted data.\n\n**Effect:** Allows different naming (e.g., \"chr1\" vs \"chr01\")\n**Usage:** For files with inconsistent chromosome naming\n**Default:** false (strict checking)\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "no_buffer": {
          "type": "boolean",
          "description": "Disable buffered output.\n\n**Effect:** Print each line immediately instead of buffering\n**Usage:** For real-time processing or piping\n**Trade-off:** Slower performance but immediate output\n**Default:** false (buffered output)\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "io_buffer": {
          "type": "string",
          "description": "Specify input buffer memory size.\n\n**Format:** Integer with optional K/M/G suffix\n**Example:** \"128M\" for 128 megabytes\n**Note:** No effect with compressed files\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"128M\"`. "
        }
      }
    },
    "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/inputs"
    },
    {
      "$ref": "#/$defs/outputs"
    },
    {
      "$ref": "#/$defs/overlap options"
    },
    {
      "$ref": "#/$defs/strand options"
    },
    {
      "$ref": "#/$defs/format options"
    },
    {
      "$ref": "#/$defs/advanced options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
