{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bedtools_split",
  "description": "Split a BED file into multiple output files using different algorithms.\n\nbedtools split divides a single BED file into multiple smaller BED files \nbased on the specified number of output files and splitting algorithm. This \nis useful for parallelizing analysis workflows, creating balanced datasets, \nor distributing genomic intervals across multiple processing units.\n\nThis tool is commonly used for:\n- Parallelizing genomic analysis workflows by splitting input data\n- Creating balanced datasets for distributed computing\n- Dividing large BED files for memory-efficient processing\n- Preparing input files for parallel execution frameworks\n- Load balancing genomic intervals across multiple processes\n- Creating subsets of genomic data for testing or validation\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Input BED file to split into multiple files.\n\n**Format:** BED file with genomic intervals\n**Content:** Genomic intervals to be distributed across output files\n**Requirements:** Standard BED format with at least 3 columns (chr, start, end)\n**Memory:** File contents are loaded into memory during processing\n**Size limits:** Available system memory determines maximum input size\n",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"large_intervals.bed\"`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "number": {
          "type": "integer",
          "description": "Number of output files to create from the input BED file.\n\n**Range:** Positive integer (typically 2 or more)\n**Distribution:** Input intervals will be distributed across this many files\n**Naming:** Output files numbered sequentially with 5-digit padding (prefix.00001.bed, prefix.00002.bed, etc.)\n**Algorithm dependency:** Distribution method depends on selected algorithm\n",
          "help_text": "Type: `integer`, multiple: `False`, required, example: `4`. "
        },
        "prefix": {
          "type": "string",
          "description": "Prefix for output BED filenames.\n\n**Default:** \"split\" (creates split.00001.bed, split.00002.bed, etc.)\n**Pattern:** Files named as \"{prefix}.{5-digit-number}.bed\"\n**Directory:** Files created in current working directory unless path specified\n**Examples:** \"sample\" → sample.00001.bed, sample.00002.bed\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"my_dataset\"`. "
        },
        "output_dir": {
          "type": "string",
          "description": "Directory where output files should be created.\n\n**Usage:** Specify target directory for all split output files\n**Creation:** Directory will be created if it doesn't exist\n**Path:** Can be relative or absolute path\n**Required:** Must be specified for output file placement\n",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"/path/to/output/\"`. "
        }
      }
    },
    "algorithm options": {
      "title": "Algorithm Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "algorithm": {
          "type": "string",
          "description": "Algorithm used to split the BED file data.\n\n**size (default):** Uses heuristic algorithm to group intervals so all \noutput files contain approximately the same total number of base pairs.\nBest for balanced genomic coverage across files.\n\n**simple:** Routes records so each file has approximately equal number \nof intervals (like Unix split command)",
          "help_text": "Type: `string`, multiple: `False`, example: `\"size\"`, choices: ``size`, `simple``. ",
          "enum": [
            "size",
            "simple"
          ]
        }
      }
    },
    "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/algorithm options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
