{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bedtools_slop",
  "description": "Extend genomic intervals by adding flanking sequences (slop) to each feature.\n\nbedtools slop increases the size of genomic intervals by adding a specified number\nof base pairs to the start and/or end coordinates. The extension can be symmetric \n(same on both sides) or asymmetric (different amounts on each side), and can be \nstrand-aware for directional features.\n\nThis tool is commonly used for:\n- Creating flanking regions around features of interest\n- Expanding intervals for motif discovery or regulatory analysis\n- Generating extended regions for ChIP-seq peak calling\n- Creating buffer zones around genomic features\n- Preparing regions for downstream intersection analysis\n- Converting point features to intervals with context\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 intervals to extend.\n\n**Format:** BED, GFF, or VCF file\n**Content:** Genomic intervals that will be extended with flanking sequences\n**Requirements:** Must contain valid genomic coordinates\n**Usage:** Each interval will be expanded according to specified parameters\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"features.bed\"`. "
        },
        "genome": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Genome file defining chromosome sizes for boundary constraints.\n\n**Format:** Tab-delimited text file with chromosome names and sizes\n**Content:** Each line contains: <chromName><TAB><chromSize>\n**Usage:** Prevents extended coordinates from exceeding chromosome boundaries\n**Creation:** Can be generated with 'samtools faidx' or UCSC Table Browser\n**Example format:**\n  chr1    249250621\n  chr2    243199373\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"hg19.genome\"`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output file with extended genomic intervals.\n\n**Format:** Same format as input file\n**Content:** Original intervals with extended coordinates\n**Boundaries:** Coordinates clamped to [0, chromosome_length] range\n",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.bed\"`, direction: `output`, example: `\"extended_features.bed\"`. ",
          "default": "$id.$key.output.bed"
        }
      }
    },
    "extension options": {
      "title": "Extension Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "both": {
          "type": "number",
          "description": "Extend intervals by this number of base pairs in both directions.\n\n**Usage:** Symmetric extension - same amount added to start and end\n**Interaction:** Cannot be used together with --left and --right\n**Percentage mode:** When --pct is used, this becomes a fraction (e.g., 0.1 = 10%)\n**Boundary handling:** Results clamped to valid chromosome coordinates\n",
          "help_text": "Type: `double`, multiple: `False`, example: `1000.0`. "
        },
        "left": {
          "type": "number",
          "description": "Number of base pairs to subtract from the start coordinate.\n\n**Usage:** Extends the interval upstream (toward lower coordinates)\n**Requirement:** Must be used together with --right\n**Interaction:** Cannot be used with --both parameter\n**Percentage mode:** When --pct is used, this becomes a fraction\n**Strand behavior:** Modified by --strand option\n",
          "help_text": "Type: `double`, multiple: `False`, example: `500.0`. "
        },
        "right": {
          "type": "number",
          "description": "Number of base pairs to add to the end coordinate.\n\n**Usage:** Extends the interval downstream (toward higher coordinates)\n**Requirement:** Must be used together with --left\n**Interaction:** Cannot be used with --both parameter\n**Percentage mode:** When --pct is used, this becomes a fraction\n**Strand behavior:** Modified by --strand option\n",
          "help_text": "Type: `double`, multiple: `False`, example: `300.0`. "
        },
        "strand_aware": {
          "type": "boolean",
          "description": "Define left and right extensions based on feature strand.\n\n**Effect:** For negative strand features, left extends downstream, right extends upstream\n**Requirements:** Input must contain strand information (6th column in BED)\n**Usage:** Enables directional, strand-specific extension\n**Default:** false (extension based on coordinate direction only)\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "percentage": {
          "type": "boolean",
          "description": "Interpret extension values as fractions of feature length.\n\n**Effect:** Extension distances calculated as fraction × feature_length\n**Example:** -b 0.5 extends each feature by 50% of its length in each direction\n**Applications:** Proportional extensions, relative scaling\n**Default:** false (absolute base pair values)\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "output options": {
      "title": "Output Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "header": {
          "type": "boolean",
          "description": "Include the original file header in output.\n\n**Usage:** Preserves metadata and format information from input\n**Applications:** Maintaining file structure, format compatibility\n**Formats:** Particularly useful for VCF and GFF files\n**Default:** false (no header included)\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/extension options"
    },
    {
      "$ref": "#/$defs/output options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
