{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "htseq_count",
  "description": "Quantify gene expression for subsequent testing for differential expression.\n\nThis script takes one or more alignment files in SAM/BAM format and a feature file in GFF format and calculates for each feature the number of reads mapping to it. \n\nSee http://htseq.readthedocs.io/en/master/count.html for details.\n",
  "type": "object",
  "$defs": {
    "arguments": {
      "title": "Arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "order": {
          "type": "string",
          "description": "Sorting order of <alignment_file>",
          "help_text": "Type: `string`, multiple: `False`, default: `\"name\"`, choices: ``pos`, `name``. ",
          "enum": [
            "pos",
            "name"
          ],
          "default": "name"
        },
        "stranded": {
          "type": "string",
          "description": "Whether the data is from a strand-specific assay",
          "help_text": "Type: `string`, multiple: `False`, default: `\"yes\"`, choices: ``yes`, `no`, `reverse``. ",
          "enum": [
            "yes",
            "no",
            "reverse"
          ],
          "default": "yes"
        },
        "minimum_alignment_quality": {
          "type": "integer",
          "description": "Skip all reads with MAPQ alignment quality lower than the given minimum value",
          "help_text": "Type: `integer`, multiple: `False`, default: `10`. ",
          "default": 10
        },
        "type": {
          "type": "string",
          "description": "Feature type (3rd column in GTF file) to be used, all features of other type are ignored (default, suitable for Ensembl GTF files: exon)",
          "help_text": "Type: `string`, multiple: `False`, example: `\"exon\"`. "
        },
        "id_attribute": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "GTF attribute to be used as feature ID (default, suitable for Ensembl GTF files: gene_id).\nAll feature of the right type (see -t option) within the same GTF attribute will be added\ntogether",
          "help_text": "Type: `string`, multiple: `True`, example: `[\"gene_id\"]`. "
        },
        "additional_attributes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Additional feature attributes (suitable for Ensembl GTF files: gene_name)",
          "help_text": "Type: `string`, multiple: `True`, example: `[\"gene_name\"]`. "
        },
        "add_chromosome_info": {
          "type": "boolean",
          "description": "Store information about the chromosome of each feature as an additional attribute\n(e.g",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "mode": {
          "type": "string",
          "description": "Mode to handle reads overlapping more than one feature.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"union\"`, choices: ``union`, `intersection-strict`, `intersection-nonempty``. ",
          "enum": [
            "union",
            "intersection-strict",
            "intersection-nonempty"
          ],
          "default": "union"
        },
        "non_unique": {
          "type": "string",
          "description": "Whether and how to score reads that are not uniquely aligned or ambiguously assigned to features.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"none\"`, choices: ``none`, `all`, `fraction`, `random``. ",
          "enum": [
            "none",
            "all",
            "fraction",
            "random"
          ],
          "default": "none"
        },
        "secondary_alignments": {
          "type": "string",
          "description": "Whether to score secondary alignments (0x100 flag).",
          "help_text": "Type: `string`, multiple: `False`, choices: ``score`, `ignore``. ",
          "enum": [
            "score",
            "ignore"
          ]
        },
        "supplementary_alignments": {
          "type": "string",
          "description": "Whether to score supplementary alignments (0x800 flag).",
          "help_text": "Type: `string`, multiple: `False`, choices: ``score`, `ignore``. ",
          "enum": [
            "score",
            "ignore"
          ]
        },
        "counts_output_sparse": {
          "type": "boolean",
          "description": "Store the counts as a sparse matrix (mtx, h5ad, loom).",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "input": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "exists": true,
          "description": "Path to the SAM/BAM files containing the mapped reads.",
          "help_text": "Type: `file`, multiple: `True`, required, direction: `input`, example: `[\"mysample1.BAM\";\"mysample2.BAM\"]`. "
        },
        "reference": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Path to the GTF file containing the features.",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"reference.gtf\"`. "
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Filename to output the counts to.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.tsv\"`, direction: `output`, example: `\"htseq-count.tsv\"`. ",
          "default": "$id.$key.output.tsv"
        },
        "output_delimiter": {
          "type": "string",
          "description": "Column delimiter in output.",
          "help_text": "Type: `string`, multiple: `False`, example: `\"\t\"`. "
        },
        "output_sam": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Write out all SAM alignment records into SAM/BAM files (one per input file needed), \nannotating each line with its feature assignment (as an optional field with tag 'XF')",
          "help_text": "Type: `file`, multiple: `True`, default: `\"$id.$key.output_sam_*.SAM\"`, direction: `output`, example: `[\"mysample1_out.SAM\";\"mysample2_out.SAM\"]`. ",
          "default": "$id.$key.output_sam_*.SAM"
        },
        "output_sam_format": {
          "type": "string",
          "description": "Format to use with the --output_sam argument.",
          "help_text": "Type: `string`, multiple: `False`, choices: ``sam`, `bam``. ",
          "enum": [
            "sam",
            "bam"
          ]
        }
      }
    },
    "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/arguments"
    },
    {
      "$ref": "#/$defs/input"
    },
    {
      "$ref": "#/$defs/output"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
