{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "featurecounts",
  "description": "featureCounts is a read summarization program for counting reads generated from either RNA or genomic DNA sequencing experiments by implementing highly efficient chromosome hashing and feature blocking techniques. It works with either single or paired-end reads and provides a wide range of options appropriate for different sequencing applications.\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "annotation": {
          "type": "string",
          "format": "path",
          "exists": true,
          "description": "Name of an annotation file",
          "help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"annotation.gtf\"`. "
        },
        "input": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "exists": true,
          "description": "A list of SAM or BAM format files separated by semi-colon (;)",
          "help_text": "Type: `file`, multiple: `True`, required, direction: `input`, example: `[\"input_file1.bam\"]`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "counts": {
          "type": "string",
          "format": "path",
          "description": "Name of output file including read counts in tab delimited format.\n",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.counts.tsv\"`, direction: `output`, example: `\"features.tsv\"`. ",
          "default": "$id.$key.counts.tsv"
        },
        "summary": {
          "type": "string",
          "format": "path",
          "description": "Summary statistics of counting results in tab delimited format.\n",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.summary.tsv\"`, direction: `output`, example: `\"summary.tsv\"`. ",
          "default": "$id.$key.summary.tsv"
        },
        "junctions": {
          "type": "string",
          "format": "path",
          "description": "Count number of reads supporting each exon-exon junction",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.junctions.txt\"`, direction: `output`, example: `\"junctions.txt\"`. ",
          "default": "$id.$key.junctions.txt"
        }
      }
    },
    "annotation": {
      "title": "Annotation",
      "type": "object",
      "description": "No description",
      "properties": {
        "format": {
          "type": "string",
          "description": "Specify format of the provided annotation file",
          "help_text": "Type: `string`, multiple: `False`, example: `\"GTF\"`, choices: ``GTF`, `GFF`, `SAF``. ",
          "enum": [
            "GTF",
            "GFF",
            "SAF"
          ]
        },
        "feature_type": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Specify feature type(s) in a GTF annotation",
          "help_text": "Type: `string`, multiple: `True`, example: `[\"exon\"]`. "
        },
        "attribute_type": {
          "type": "string",
          "description": "Specify attribute type in GTF annotation",
          "help_text": "Type: `string`, multiple: `False`, example: `\"gene_id\"`. "
        },
        "extra_attributes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Extract extra attribute types from the provided GTF annotation and include them in the counting output",
          "help_text": "Type: `string`, multiple: `True`. "
        },
        "chrom_alias": {
          "type": "string",
          "format": "path",
          "description": "Provide a chromosome name alias file to match chr names in annotation with those in the reads",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"chrom_alias.csv\"`. "
        }
      }
    },
    "level of summarization": {
      "title": "Level of summarization",
      "type": "object",
      "description": "No description",
      "properties": {
        "feature_level": {
          "type": "boolean",
          "description": "Perform read counting at feature level (eg",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "overlap between reads and features": {
      "title": "Overlap between reads and features",
      "type": "object",
      "description": "No description",
      "properties": {
        "overlapping": {
          "type": "boolean",
          "description": "Assign reads to all their overlapping meta-features (or features if '--feature_level' is specified).\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "min_overlap": {
          "type": "integer",
          "description": "Minimum number of overlapping bases in a read that is required for read assignment",
          "help_text": "Type: `integer`, multiple: `False`, example: `1`. "
        },
        "frac_overlap": {
          "type": "number",
          "description": "Minimum fraction of overlapping bases in a read that is required for read assignment",
          "help_text": "Type: `double`, multiple: `False`, example: `0.0`. "
        },
        "frac_overlap_feature": {
          "type": "number",
          "description": "Minimum fraction of overlapping bases in a feature that is required for read assignment",
          "help_text": "Type: `double`, multiple: `False`, example: `0.0`. "
        },
        "largest_overlap": {
          "type": "boolean",
          "description": "Assign reads to a meta-feature/feature that has the largest number of overlapping bases.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "non_overlap": {
          "type": "integer",
          "description": "Maximum number of non-overlapping bases in a read (or a read pair) that is allowed when being assigned to a feature",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "non_overlap_feature": {
          "type": "integer",
          "description": "Maximum number of non-overlapping bases in a feature that is allowed in read assignment",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "read_extension5": {
          "type": "integer",
          "description": "Reads are extended upstream by <int> bases from their 5' end.\n",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "read_extension3": {
          "type": "integer",
          "description": "Reads are extended upstream by <int> bases from their 3' end.\n",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "read2pos": {
          "type": "integer",
          "description": "Reduce reads to their 5' most base or 3' most base",
          "help_text": "Type: `integer`, multiple: `False`, choices: ``3`, `5``. ",
          "enum": [
            3,
            5
          ]
        }
      }
    },
    "multi-mapping reads": {
      "title": "Multi-mapping reads",
      "type": "object",
      "description": "No description",
      "properties": {
        "multi_mapping": {
          "type": "boolean",
          "description": "Multi-mapping reads will also be counted",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "fractional counting": {
      "title": "Fractional counting",
      "type": "object",
      "description": "No description",
      "properties": {
        "fraction": {
          "type": "boolean",
          "description": "Assign fractional counts to features",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "read filtering": {
      "title": "Read filtering",
      "type": "object",
      "description": "No description",
      "properties": {
        "min_map_quality": {
          "type": "integer",
          "description": "The minimum mapping quality score a read must satisfy in order to be counted",
          "help_text": "Type: `integer`, multiple: `False`, example: `0`. "
        },
        "split_only": {
          "type": "boolean",
          "description": "Count split alignments only (ie",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "non_split_only": {
          "type": "boolean",
          "description": "If specified, only non-split alignments (CIGAR strings do not contain letter 'N') will be counted",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "primary": {
          "type": "boolean",
          "description": "Count primary alignments only",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "ignore_dup": {
          "type": "boolean",
          "description": "Ignore duplicate reads in read counting",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "strandedness": {
      "title": "Strandedness",
      "type": "object",
      "description": "No description",
      "properties": {
        "strand": {
          "type": "integer",
          "description": "Perform strand-specific read counting",
          "help_text": "Type: `integer`, multiple: `False`, example: `0`, choices: ``0`, `1`, `2``. ",
          "enum": [
            0,
            1,
            2
          ]
        }
      }
    },
    "exon-exon junctions": {
      "title": "Exon-exon junctions",
      "type": "object",
      "description": "No description",
      "properties": {
        "ref_fasta": {
          "type": "string",
          "format": "path",
          "description": "Provide the name of a FASTA-format file that contains the reference sequences used in read mapping that produced the provided SAM/BAM files.\n",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"reference.fasta\"`. "
        }
      }
    },
    "parameters specific to paired end reads": {
      "title": "Parameters specific to paired end reads",
      "type": "object",
      "description": "No description",
      "properties": {
        "paired": {
          "type": "boolean",
          "description": "Specify that input data contain paired-end reads",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "count_read_pairs": {
          "type": "boolean",
          "description": "Count read pairs (fragments) instead of reads",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "both_aligned": {
          "type": "boolean",
          "description": "Count read pairs (fragments) instead of reads",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "check_pe_dist": {
          "type": "boolean",
          "description": "Check validity of paired-end distance when counting read pairs",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "min_length": {
          "type": "integer",
          "description": "Minimum fragment/template length, 50 by default.\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `50`. "
        },
        "max_length": {
          "type": "integer",
          "description": "Maximum fragment/template length, 600 by default.\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `600`. "
        },
        "same_strand": {
          "type": "boolean",
          "description": "Do not count read pairs that have their two ends mapping to different chromosomes or mapping to same chromosome but on different strands.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "donotsort": {
          "type": "boolean",
          "description": "Do not sort reads in BAM/SAM input",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "read groups": {
      "title": "Read groups",
      "type": "object",
      "description": "No description",
      "properties": {
        "by_read_group": {
          "type": "boolean",
          "description": "Assign reads by read group",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "long reads": {
      "title": "Long reads",
      "type": "object",
      "description": "No description",
      "properties": {
        "long_reads": {
          "type": "boolean",
          "description": "Count long reads such as Nanopore and PacBio reads",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "assignment results for each read": {
      "title": "Assignment results for each read",
      "type": "object",
      "description": "No description",
      "properties": {
        "detailed_results": {
          "type": "string",
          "format": "path",
          "description": "Directory to save the detailed assignment results",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.detailed_results\"`, direction: `output`, example: `\"detailed_results\"`. ",
          "default": "$id.$key.detailed_results"
        },
        "detailed_results_format": {
          "type": "string",
          "description": "Output detailed assignment results for each read or read-pair",
          "help_text": "Type: `string`, multiple: `False`, choices: ``CORE`, `SAM`, `BAM``. ",
          "enum": [
            "CORE",
            "SAM",
            "BAM"
          ]
        }
      }
    },
    "miscellaneous": {
      "title": "Miscellaneous",
      "type": "object",
      "description": "No description",
      "properties": {
        "max_M_op": {
          "type": "integer",
          "description": "Maximum number of 'M' operations allowed in a CIGAR string",
          "help_text": "Type: `integer`, multiple: `False`, example: `10`. "
        },
        "verbose": {
          "type": "boolean",
          "description": "Output verbose information for debugging, such as un-matched chromosome/contig names.\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/annotation"
    },
    {
      "$ref": "#/$defs/level of summarization"
    },
    {
      "$ref": "#/$defs/overlap between reads and features"
    },
    {
      "$ref": "#/$defs/multi-mapping reads"
    },
    {
      "$ref": "#/$defs/fractional counting"
    },
    {
      "$ref": "#/$defs/read filtering"
    },
    {
      "$ref": "#/$defs/strandedness"
    },
    {
      "$ref": "#/$defs/exon-exon junctions"
    },
    {
      "$ref": "#/$defs/parameters specific to paired end reads"
    },
    {
      "$ref": "#/$defs/read groups"
    },
    {
      "$ref": "#/$defs/long reads"
    },
    {
      "$ref": "#/$defs/assignment results for each read"
    },
    {
      "$ref": "#/$defs/miscellaneous"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
