{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "nanoplot",
  "description": "Run NanoPlot on nanopore-sequenced reads.\nNanoPlot is a plotting tool for long read sequencing data and alignments.\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "fastq": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input fastq file(s), separated by \";\".",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.fq\"]`. "
        },
        "fasta": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input fasta file(s), separated by \";\".",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.fa\"]`. "
        },
        "fastq_rich": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input fastq file(s) generated by albacore or \nMinKNOW with additional information concerning channel and time, separated by \";\".\n",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.fq\"]`. "
        },
        "fastq_minimal": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input fastq file(s) generated by albacore or MinKNOW with\nadditional information concerning channel and time",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.fq\"]`. "
        },
        "summary": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input summary file(s) generated by albacore or guppy, separated by \";\".\n",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.txt\"]`. "
        },
        "bam": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input sorted bam file(s), separated by \";\".",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.bam\"]`. "
        },
        "ubam": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input unmapped bam file(s), separated by \";\".",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.ubam\"]`. "
        },
        "cram": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input sorted cram file(s), separated by \";\".",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.cram\"]`. "
        },
        "pickle": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input pickle file stored earlier, separated by \";\".",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.pkl\"]`. "
        },
        "feather": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input feather file(s), separated by \";\".",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"read.arrow\"]`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "outdir": {
          "type": "string",
          "format": "path",
          "description": "Specify directory in which output has to be created.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.outdir\"`, direction: `output`. ",
          "default": "$id.$key.outdir"
        }
      }
    },
    "options": {
      "title": "Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "verbose": {
          "type": "boolean",
          "description": "Write log messages also to terminal",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "store": {
          "type": "boolean",
          "description": "Store the extracted data in a pickle file for future plotting.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "raw": {
          "type": "boolean",
          "description": "Store the extracted data in tab separated file.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "huge": {
          "type": "boolean",
          "description": "Input data is one very large file.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "no_static": {
          "type": "boolean",
          "description": "Do not make static (png) plots.",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "prefix": {
          "type": "string",
          "description": "Specify an optional prefix to be used for the output files.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "tsv_stats": {
          "type": "boolean",
          "description": "Output the stats file as a properly formatted TSV.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "only_report": {
          "type": "boolean",
          "description": "Output only the report.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "info_in_report": {
          "type": "boolean",
          "description": "Add NanoPlot run info in the report.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "filtering or transforming input": {
      "title": "Filtering or transforming input",
      "type": "object",
      "description": "No description",
      "properties": {
        "maxlength": {
          "type": "integer",
          "description": "Drop reads longer than length specified.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "minlength": {
          "type": "integer",
          "description": "Drop reads shorter than length specified.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "drop_outliers": {
          "type": "boolean",
          "description": "Drop outlier reads with extreme long length.",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "downsample": {
          "type": "integer",
          "description": "Reduce dataset to N reads by random sampling.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "loglength": {
          "type": "boolean",
          "description": "Logarithmic scaling of lengths in plots.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "percentqual": {
          "type": "boolean",
          "description": "Use qualities as theoretical percent identities.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "alength": {
          "type": "boolean",
          "description": "Use aligned read lengths rather than sequenced length (bam mode).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "minqual": {
          "type": "integer",
          "description": "Drop reads with an average quality lower than specified.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "runtime_until": {
          "type": "integer",
          "description": "Only take the N first hours of a run.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "readtype": {
          "type": "string",
          "description": "Which read type to extract information about from summary.\nOptions are 1D, 2D, 1D2\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "barcoded": {
          "type": "boolean",
          "description": "Use if you want to split the summary file by barcode.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "no_supplementary": {
          "type": "boolean",
          "description": "Use if you want to remove supplementary alignments.",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "customizing plots": {
      "title": "Customizing plots",
      "type": "object",
      "description": "No description",
      "properties": {
        "color": {
          "type": "string",
          "description": "Specify a color for the plots, must be a valid matplotlib color.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "colormap": {
          "type": "string",
          "description": "Specify a valid matplotlib colormap for the heatmap.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "format": {
          "type": "string",
          "description": "Specify the output format of the plots.\n{eps,jpeg,jpg,pdf,pgf,png,ps,raw,rgba,svg,svgz,tif,tiff}\n",
          "help_text": "Type: `string`, multiple: `False`, default: `\"png\"`. ",
          "default": "png"
        },
        "plots": {
          "type": "string",
          "description": "Specify which bivariate plots have to be made.\n[{kde,hex,dot} ...]\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "legacy": {
          "type": "string",
          "description": "Specify which bivariate plots have to be made (legacy mode).\n[{kde,dot,hex} ...]\n",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "listcolors": {
          "type": "boolean",
          "description": "List the colors which are available for plotting and exit.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "listcolormaps": {
          "type": "boolean",
          "description": "List the colormaps which are available for plotting and exit.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "no_N50": {
          "type": "boolean",
          "description": "Hide the N50 mark in the read length histogram.",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "N50": {
          "type": "boolean",
          "description": "Show the N50 mark in the read length histogram.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "title": {
          "type": "string",
          "description": "Add a title to all plots, requires quoting if using spaces.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "font_scale": {
          "type": "number",
          "description": "Scale the font of the plots by a factor.",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "dpi": {
          "type": "integer",
          "description": "Set the dpi for saving images.",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "hide_stats": {
          "type": "boolean",
          "description": "Not adding Pearson R stats in some bivariate plots.",
          "help_text": "Type: `boolean_false`, multiple: `False`, default: `true`. ",
          "default": true
        }
      }
    },
    "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/filtering or transforming input"
    },
    {
      "$ref": "#/$defs/customizing plots"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
