{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bedtools_overlap",
  "description": "Compute the amount of overlap or distance between genomic features.\n\nbedtools overlap computes the amount of overlap (positive values) or distance \n(negative values) between genome features and reports the result at the end of \nthe same line. This tool is useful for quantifying the precise overlap between \nfeatures from different datasets or for measuring distances between nearby elements.\n\nThis tool is commonly used for:\n- Quantifying overlap between ChIP-seq peaks and genes\n- Measuring distances between regulatory elements\n- Computing precise overlap metrics for comparative genomics\n- Quality control of feature intersection analyses\n- Post-processing results from bedtools window operations\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input file containing genomic features for overlap computation.\n\n**Format:** Tab-delimited file (typically from bedtools window output)\n**Content:** Lines with genomic coordinates for which overlap should be computed\n**Usage:** Each line should contain start/end coordinates for two features\n**Requirements:** Must contain the specified columns for coordinate extraction\n**Special:** Use \"stdin\" for piped input from other bedtools commands\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"windowed_features.bed\"`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output file with overlap/distance values appended.\n\n**Format:** Same as input with additional overlap column\n**Content:** Original lines plus computed overlap (positive) or distance (negative)\n**Values:** Positive numbers indicate overlap, negative indicate distance\n**Position:** Overlap value is appended as the last column\n",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.bed\"`, direction: `output`, example: `\"features_with_overlap.bed\"`. ",
          "default": "$id.$key.output.bed"
        }
      }
    },
    "options": {
      "title": "Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "cols": {
          "type": "string",
          "description": "Specify columns (1-based) for start and end coordinates of features.\n\n**Format:** Comma-separated list: start1,end1,start2,end2\n**Usage:** Defines which columns contain the coordinates for overlap calculation\n**Order:** Must be in the exact order: start1,end1,start2,end2\n**Example:** \"2,3,6,7\" for typical bedtools window output\n**Requirements:** All specified columns must exist in the input\n",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"2,3,6,7\"`. "
        }
      }
    },
    "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/options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
