{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bedtools_makewindows",
  "description": "Create adjacent or sliding windows across a genome or BED file.\n\nThis tool generates genomic windows either across entire chromosomes (using a genome file)\nor within specific intervals (using a BED file). Windows can be fixed-size or variable-size,\nand can be non-overlapping (adjacent) or overlapping (sliding). Useful for creating\ngenomic bins for analysis, tiling genomes, or generating sliding windows for statistics.\n",
  "type": "object",
  "$defs": {
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output file with generated windows.\n\n**Format:** BED format with chromosome, start, end coordinates\n**Optional:** Fourth column with window names (if ID naming option used)\n**Sorting:** Output is sorted by chromosome and start position\n",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.bed\"`, direction: `output`, example: `\"windows.bed\"`. ",
          "default": "$id.$key.output.bed"
        }
      }
    },
    "input options": {
      "title": "Input Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "genome": {
          "type": "string",
          "format": "path",
          "description": "Genome file defining chromosome names and sizes.\n\n**Format:** Tab-delimited file with chromosome name and size\n**Example line:** chr1  249250621\n**Usage:** Windows will be created for each chromosome in the file\n**Sources:** samtools faidx output or UCSC Table Browser\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"genome.txt\"`. "
        },
        "input": {
          "type": "string",
          "format": "path",
          "description": "BED file with genomic intervals.\n\n**Format:** BED file with chrom, start, end fields (minimum)\n**Usage:** Windows will be created for each interval in the file\n**Alternative:** Use instead of genome file to create windows within specific regions\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"intervals.bed\"`. "
        }
      }
    },
    "window size options": {
      "title": "Window Size Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "window_size": {
          "type": "integer",
          "description": "Fixed window size in base pairs.\n\n**Effect:** Divide input intervals into fixed-sized windows\n**Units:** Base pairs (nucleotides)\n**Usage:** Cannot be used with --num_windows\n**Example:** 1000000 creates 1MB windows\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `1000000`. "
        },
        "step_size": {
          "type": "integer",
          "description": "Step size for sliding windows in base pairs.\n\n**Default:** Same as window size (non-overlapping windows)\n**Effect:** Distance between start positions of consecutive windows  \n**Usage:** Must be used with --window_size\n**Overlap:** Window size minus step size gives overlap amount\n**Example:** With -w 1000 -s 500, creates 500bp overlapping windows\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `500000`. "
        },
        "num_windows": {
          "type": "integer",
          "description": "Number of windows to create per input interval.\n\n**Effect:** Divide each interval into fixed number of windows\n**Result:** Window sizes vary to fit exactly within each interval\n**Usage:** Cannot be used with --window_size\n**Example:** 10 creates 10 equal-sized windows per interval\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `1000`. "
        }
      }
    },
    "id naming options": {
      "title": "ID Naming Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "id_type": {
          "type": "string",
          "description": "Add name column with specified ID type.\n\n**Options:**\n- `src`: Use source interval's name (requires named input intervals)\n- `winnum`: Use window number as ID (1, 2, 3, ...)\n- `srcwinnum`: Combine source name with window number (name_1, name_2, ...)\n\n**Default:** No name column (3 columns: chrom, start, end)\n**With option:** 4 columns including name column\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"winnum\"`, choices: ``src`, `winnum`, `srcwinnum``. ",
          "enum": [
            "src",
            "winnum",
            "srcwinnum"
          ]
        },
        "reverse": {
          "type": "boolean",
          "description": "Reverse window numbering order.\n\n**Effect:** Report windows in decreasing numerical order\n**Usage:** Only applies when --id_type includes window numbering\n**Example:** With 3 windows, output 3, 2, 1 instead of 1, 2, 3\n**Default:** false (ascending order)\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/outputs"
    },
    {
      "$ref": "#/$defs/input options"
    },
    {
      "$ref": "#/$defs/window size options"
    },
    {
      "$ref": "#/$defs/id naming options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
