{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "rsem_calculate_expression",
  "description": "Calculate expression with RSEM. \n",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "id": {
          "type": "string",
          "description": "Sample ID.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "strandedness": {
          "type": "string",
          "description": "Sample strand-specificity",
          "help_text": "Type: `string`, multiple: `False`, choices: ``forward`, `reverse`, `unstranded``. ",
          "enum": [
            "forward",
            "reverse",
            "unstranded"
          ]
        },
        "paired": {
          "type": "boolean",
          "description": "Paired-end reads or not?",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "input": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Input reads for quantification.",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`. "
        },
        "index": {
          "type": "string",
          "format": "path",
          "description": "RSEM index.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "extra_args": {
          "type": "string",
          "description": "Extra rsem-calculate-expression arguments in addition to the examples.",
          "help_text": "Type: `string`, multiple: `False`. "
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "counts_gene": {
          "type": "string",
          "format": "path",
          "description": "Expression counts on gene level",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.counts_gene.results\"`, direction: `output`, example: `\"$id.genes.results\"`. ",
          "default": "$id.$key.counts_gene.results"
        },
        "counts_transcripts": {
          "type": "string",
          "format": "path",
          "description": "Expression counts on transcript level",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.counts_transcripts.results\"`, direction: `output`, example: `\"$id.isoforms.results\"`. ",
          "default": "$id.$key.counts_transcripts.results"
        },
        "stat": {
          "type": "string",
          "format": "path",
          "description": "RSEM statistics",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.stat.stat\"`, direction: `output`, example: `\"$id.stat\"`. ",
          "default": "$id.$key.stat.stat"
        },
        "logs": {
          "type": "string",
          "format": "path",
          "description": "RSEM logs",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.logs.log\"`, direction: `output`, example: `\"$id.log\"`. ",
          "default": "$id.$key.logs.log"
        },
        "bam_star": {
          "type": "string",
          "format": "path",
          "description": "BAM file generated by STAR (optional)",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.bam_star.bam\"`, direction: `output`, example: `\"$id.STAR.genome.bam\"`. ",
          "default": "$id.$key.bam_star.bam"
        },
        "bam_genome": {
          "type": "string",
          "format": "path",
          "description": "Genome BAM file (optional)",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.bam_genome.bam\"`, direction: `output`, example: `\"$id.genome.bam\"`. ",
          "default": "$id.$key.bam_genome.bam"
        },
        "bam_transcript": {
          "type": "string",
          "format": "path",
          "description": "Transcript BAM file (optional)",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.bam_transcript.bam\"`, direction: `output`, example: `\"$id.transcript.bam\"`. ",
          "default": "$id.$key.bam_transcript.bam"
        },
        "sort_bam_by_read_name": {
          "type": "boolean",
          "description": "Sort BAM file aligned under transcript coordidate by read name",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "no_bam_output": {
          "type": "boolean",
          "description": "Do not output any BAM file.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "sampling_for_bam": {
          "type": "boolean",
          "description": "When RSEM generates a BAM file, instead of outputting all alignments a read has with their posterior \nprobabilities, one alignment is sampled according to the posterior probabilities",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "output_genome_bam": {
          "type": "boolean",
          "description": "Generate a BAM file, 'sample_name.genome.bam', with alignments mapped to genomic coordinates and \nannotated with their posterior probabilities",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "sort_bam_by_coordinate": {
          "type": "boolean",
          "description": "Sort RSEM generated transcript and genome BAM files by coordinates and build associated indices.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "basic options": {
      "title": "Basic Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "no_qualities": {
          "type": "boolean",
          "description": "Input reads do not contain quality scores.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "alignments": {
          "type": "boolean",
          "description": "Input file contains alignments in SAM/BAM/CRAM format",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "fai": {
          "type": "string",
          "format": "path",
          "description": "If the header section of input alignment file does not contain reference sequence information, \nthis option should be turned on",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "bowtie2": {
          "type": "boolean",
          "description": "Use Bowtie 2 instead of Bowtie to align reads",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "star": {
          "type": "boolean",
          "description": "Use STAR to align reads",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "hisat2_hca": {
          "type": "boolean",
          "description": "Use HISAT2 to align reads to the transcriptome according to Human Cell Atlast.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "append_names": {
          "type": "boolean",
          "description": "If gene_name/transcript_name is available, append it to the end of gene_id/transcript_id (separated \nby '_') in files 'sample_name.isoforms.results' and 'sample_name.genes.results'.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "seed": {
          "type": "integer",
          "description": "Set the seed for the random number generators used in calculating posterior mean estimates and \ncredibility intervals",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "single_cell_prior": {
          "type": "boolean",
          "description": "By default, RSEM uses Dirichlet(1) as the prior to calculate posterior mean estimates and credibility \nintervals",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "calc_pme": {
          "type": "boolean",
          "description": "Run RSEM's collapsed Gibbs sampler to calculate posterior mean estimates.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "calc_ci": {
          "type": "boolean",
          "description": "Calculate 95% credibility intervals and posterior mean estimates",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "quiet": {
          "type": "boolean",
          "description": "Suppress the output of logging information.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "aligner options": {
      "title": "Aligner Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "seed_length": {
          "type": "integer",
          "description": "Seed length used by the read aligner",
          "help_text": "Type: `integer`, multiple: `False`, example: `25`. "
        },
        "phred64_quals": {
          "type": "boolean",
          "description": "Input quality scores are encoded as Phred+64 (default for GA Pipeline ver",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "solexa_quals": {
          "type": "boolean",
          "description": "Input quality scores are solexa encoded (from GA Pipeline ver",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "bowtie_n": {
          "type": "integer",
          "description": "(Bowtie parameter) max # of mismatches in the seed",
          "help_text": "Type: `integer`, multiple: `False`, example: `2`, choices: ``0`, `1`, `2`, `3``. ",
          "enum": [
            0,
            1,
            2,
            3
          ]
        },
        "bowtie_e": {
          "type": "integer",
          "description": "(Bowtie parameter) max sum of mismatch quality scores across the alignment",
          "help_text": "Type: `integer`, multiple: `False`, example: `99999999`. "
        },
        "bowtie_m": {
          "type": "integer",
          "description": "(Bowtie parameter) suppress all alignments for a read if > <int> valid alignments exist",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "bowtie_chunkmbs": {
          "type": "integer",
          "description": "(Bowtie parameter) memory allocated for best first alignment calculation (Default: 0 - use Bowtie's default)\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `0`. "
        },
        "bowtie2_mismatch_rate": {
          "type": "number",
          "description": "(Bowtie 2 parameter) The maximum mismatch rate allowed",
          "help_text": "Type: `double`, multiple: `False`, example: `0.1`. "
        },
        "bowtie2_k": {
          "type": "integer",
          "description": "(Bowtie 2 parameter) Find up to <int> alignments per read",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "bowtie2_sensitivity_level": {
          "type": "string",
          "description": "(Bowtie 2 parameter) Set Bowtie 2's preset options in --end-to-end mode",
          "help_text": "Type: `string`, multiple: `False`, example: `\"sensitive\"`, choices: ``very_fast`, `fast`, `sensitive`, `very_sensitive``. ",
          "enum": [
            "very_fast",
            "fast",
            "sensitive",
            "very_sensitive"
          ]
        },
        "star_gzipped_read_file": {
          "type": "boolean",
          "description": "Input read file(s) is compressed by gzip",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "star_bzipped_read_file": {
          "type": "boolean",
          "description": "Input read file(s) is compressed by bzip2",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "star_output_genome_bam": {
          "type": "boolean",
          "description": "Save the BAM file from STAR alignment under genomic coordinate to 'sample_name.STAR.genome.bam'",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "advanced options": {
      "title": "Advanced Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "tag": {
          "type": "string",
          "description": "The name of the optional field used in the SAM input for identifying a read with too many valid \nalignments",
          "help_text": "Type: `string`, multiple: `False`, example: `\"\"`. "
        },
        "fragment_length_min": {
          "type": "integer",
          "description": "Minimum read/insert length allowed",
          "help_text": "Type: `integer`, multiple: `False`, example: `1`. "
        },
        "fragment_length_max": {
          "type": "integer",
          "description": "Maximum read/insert length allowed",
          "help_text": "Type: `integer`, multiple: `False`, example: `1000`. "
        },
        "fragment_length_mean": {
          "type": "integer",
          "description": "(single-end data only) The mean of the fragment length distribution, which is assumed to be a \nGaussian",
          "help_text": "Type: `integer`, multiple: `False`, example: `-1`. "
        },
        "gragment_length_sd": {
          "type": "number",
          "description": "(single-end data only) The standard deviation of the fragment length distribution, which is \nassumed to be a Gaussian",
          "help_text": "Type: `double`, multiple: `False`, example: `0.0`. "
        },
        "estimate_rspd": {
          "type": "boolean",
          "description": "Set this option if you want to estimate the read start position distribution (RSPD) from data.\nOtherwise, RSEM will use a uniform RSPD.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "num_rspd_bins": {
          "type": "integer",
          "description": "Number of bins in the RSPD",
          "help_text": "Type: `integer`, multiple: `False`, example: `20`. "
        },
        "gibbs_burnin": {
          "type": "integer",
          "description": "The number of burn-in rounds for RSEM's Gibbs sampler",
          "help_text": "Type: `integer`, multiple: `False`, example: `200`. "
        },
        "gibbs_number_of_samples": {
          "type": "integer",
          "description": "The total number of count vectors RSEM will collect from its Gibbs samplers",
          "help_text": "Type: `integer`, multiple: `False`, example: `1000`. "
        },
        "gibbs_sampling_gap": {
          "type": "integer",
          "description": "The number of rounds between two succinct count vectors RSEM collects",
          "help_text": "Type: `integer`, multiple: `False`, example: `1`. "
        },
        "ci_credibility_level": {
          "type": "number",
          "description": "The credibility level for credibility intervals",
          "help_text": "Type: `double`, multiple: `False`, example: `0.95`. "
        },
        "ci_number_of_samples_per_count_vector": {
          "type": "integer",
          "description": "The number of read generating probability vectors sampled per sampled count vector",
          "help_text": "Type: `integer`, multiple: `False`, example: `50`. "
        },
        "keep_intermediate_files": {
          "type": "boolean",
          "description": "Keep temporary files generated by RSEM",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "temporary_folder": {
          "type": "string",
          "description": "Set where to put the temporary files generated by RSEM",
          "help_text": "Type: `string`, multiple: `False`, example: `\"sample_name.temp\"`. "
        },
        "time": {
          "type": "boolean",
          "description": "Output time consumed by each step of RSEM to 'sample_name.time'.\n",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "prior-enhanced rsem options": {
      "title": "Prior-Enhanced RSEM Options",
      "type": "object",
      "description": "No description",
      "properties": {
        "run_pRSEM": {
          "type": "boolean",
          "description": "Running prior-enhanced RSEM (pRSEM)",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "chipseq_peak_file": {
          "type": "string",
          "format": "path",
          "description": "Full path to a ChIP-seq peak file in ENCODE's narrowPeak, i.e",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "chipseq_target_read_files": {
          "type": "string",
          "format": "path",
          "description": "Comma-separated full path of FASTQ read file(s) for ChIP-seq target",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "chipseq_control_read_files": {
          "type": "string",
          "format": "path",
          "description": "Comma-separated full path of FASTQ read file(s) for ChIP-seq conrol",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "chipseq_read_files_multi_targets": {
          "type": "string",
          "format": "path",
          "description": "Comma-separated full path of FASTQ read files for multiple ChIP-seq targets",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "chipseq_bed_files_multi_targets": {
          "type": "string",
          "format": "path",
          "description": "Comma-separated full path of BED files for multiple ChIP-seq targets",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`. "
        },
        "cap_stacked_chipseq_reads": {
          "type": "boolean",
          "description": "Keep a maximum number of ChIP-seq reads that aligned to the same genomic interval",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "n_max_stacked_chipseq_reads": {
          "type": "integer",
          "description": "The maximum number of stacked ChIP-seq reads to keep",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "partition_model": {
          "type": "string",
          "description": "A keyword to specify the partition model used by prior-enhanced RSEM",
          "help_text": "Type: `string`, multiple: `False`, example: `\"pk\"`. "
        }
      }
    },
    "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/input"
    },
    {
      "$ref": "#/$defs/output"
    },
    {
      "$ref": "#/$defs/basic options"
    },
    {
      "$ref": "#/$defs/aligner options"
    },
    {
      "$ref": "#/$defs/advanced options"
    },
    {
      "$ref": "#/$defs/prior-enhanced rsem options"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
