{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bedtools_pairtopair",
  "description": "Report overlaps between two paired-end BED files (BEDPE).\n\nbedtools pairtopair finds overlaps between paired-end intervals in two BEDPE files. \nThis tool is particularly useful for comparing structural variants, chromatin interactions, \nor any paired-end genomic data between different samples or conditions.\n\nThis tool is commonly used for:\n- Comparing structural variants between samples\n- Intersecting Hi-C or ChIA-PET datasets\n- Finding common paired-end features across experiments\n- Analyzing concordance between paired-end calling methods\n- Quality control of structural variant detection pipelines\n- Cross-referencing chromatin interaction datasets\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "bedpe_a": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "First input BEDPE file with paired interval data.\n\n**Format:** BEDPE format with paired genomic coordinates\n**Content:** Each line represents a pair of genomic intervals\n**Columns:** chrom1, start1, end1, chrom2, start2, end2, [name], [score], [strand1], [strand2]\n**Usage:** Primary dataset to find overlaps for\n**Requirements:** Must be in valid BEDPE format\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"dataset_a.bedpe\"`. "
        },
        "bedpe_b": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Second input BEDPE file with paired interval data.\n\n**Format:** BEDPE format with paired genomic coordinates\n**Content:** Each line represents a pair of genomic intervals\n**Columns:** chrom1, start1, end1, chrom2, start2, end2, [name], [score], [strand1], [strand2]\n**Usage:** Reference dataset to intersect with dataset A\n**Requirements:** Must be in valid BEDPE format\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"dataset_b.bedpe\"`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output file with overlapping paired intervals from dataset A.\n\n**Format:** BEDPE format containing overlapping pairs from input A\n**Content:** Only pairs from dataset A that meet overlap criteria with dataset B\n**Filtering:** Results depend on overlap type and threshold parameters\n",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.bedpe\"`, direction: `output`, example: `\"overlapping_pairs.bedpe\"`. ",
          "default": "$id.$key.output.bedpe"
        }
      }
    },
    "overlap options": {
      "title": "Overlap Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "min_overlap": {
          "type": "number",
          "description": "Minimum overlap required as fraction of dataset A intervals.\n\n**Default:** 1E-9 (effectively 1 base pair)\n**Range:** 0.0 to 1.0\n**Usage:** Overlap must be at least this fraction of A's interval length\n**Example:** 0.05 requires 5% overlap\n",
          "help_text": "Type: `double`, multiple: `False`, example: `0.1`. "
        },
        "type": {
          "type": "string",
          "description": "Approach for reporting overlaps between BEDPE datasets.\n\n**both:** Report if both ends of A overlap B (default)\n**either:** Report if either end of A overlaps B\n**neither:** Report if neither end of A overlaps B\n**notboth:** Report if one or neither end of A overlaps B\n\n**Usage:** Defines the overlap stringency requirement\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"both\"`, example: `\"either\"`, choices: ``both`, `either`, `neither`, `notboth``. ",
          "enum": [
            "both",
            "either",
            "neither",
            "notboth"
          ],
          "default": "both"
        },
        "slop": {
          "type": "integer",
          "description": "Amount of slop (in base pairs) to add to each footprint of dataset A.\n\n**Default:** 0 (no slop)\n**Usage:** Extends intervals before overlap detection\n**Effect:** Slop is subtracted from start1/start2 and added to end1/end2\n**Applications:** Finding near-misses or fuzzy overlaps\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `1000`. "
        },
        "strand_slop": {
          "type": "boolean",
          "description": "Add slop based on strand information.\n\n**Plus strand:** Slop only added to end coordinates\n**Minus strand:** Slop only added to start coordinates\n**Default:** Slop added in both directions regardless of strand\n**Requirements:** Requires strand information in BEDPE files\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "filtering options": {
      "title": "Filtering Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "ignore_strand": {
          "type": "boolean",
          "description": "Ignore strand information when searching for overlaps.\n\n**Default:** Strand information is enforced\n**Usage:** Overlaps reported regardless of strand orientation\n**Applications:** When strand doesn't matter for the analysis\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "require_different_names": {
          "type": "boolean",
          "description": "Require overlapping pairs to have different names.\n\n**Default:** Same names are allowed\n**Usage:** Avoids self-hits when datasets contain overlapping entries\n**Applications:** Comparing datasets that might have common entries\n**Effect:** Filters out pairs with identical names between datasets\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "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/filtering options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
