{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "bd_rhapsody",
  "description": "BD Rhapsody Sequence Analysis CWL pipeline v2.2.1\n\nThis pipeline performs analysis of single-cell multiomic sequence read (FASTQ) data. The supported\nsequencing libraries are those generated by the BD Rhapsody assay kits, including: Whole Transcriptome\nmRNA, Targeted mRNA, AbSeq Antibody-Oligonucleotides, Single-Cell Multiplexing, TCR/BCR, and\nATAC-Seq\n\nThe CWL pipeline file is obtained by cloning 'https://bitbucket.org/CRSwDev/cwl' and removing all objects with class 'DockerRequirement' from the YAML.\n",
  "type": "object",
  "$defs": {
    "inputs": {
      "title": "Inputs",
      "type": "object",
      "description": "No description",
      "properties": {
        "reads": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Reads (optional) - Path to your FASTQ.GZ formatted read files from libraries that may include:\n  \n- WTA mRNA\n- Targeted mRNA\n- AbSeq\n- Sample Multiplexing\n- VDJ\n  \nYou may specify as many R1/R2 read pairs as you want.\n",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"WTALibrary_S1_L001_R1_001.fastq.gz\";\"WTALibrary_S1_L001_R2_001.fastq.gz\"]`. "
        },
        "reads_atac": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Path to your FASTQ.GZ formatted read files from ATAC-Seq libraries.\nYou may specify as many R1/R2/I2 files as you want.\n",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"ATACLibrary_S2_L001_R1_001.fastq.gz\";\"ATACLibrary_S2_L001_R2_001.fastq.gz\";\"ATACLibrary_S2_L001_I2_001.fastq.gz\"]`. "
        }
      }
    },
    "outputs": {
      "title": "Outputs",
      "type": "object",
      "description": "Outputs",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "The processed output file in h5mu format.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.h5mu\"`, direction: `output`, example: `\"output.h5mu\"`. ",
          "default": "$id.$key.output.h5mu"
        },
        "output_raw": {
          "type": "string",
          "format": "path",
          "description": "The unprocessed output directory containing all the outputs from the pipeline.",
          "help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output_raw\"`, direction: `output`, example: `\"output_dir\"`. ",
          "default": "$id.$key.output_raw"
        }
      }
    },
    "references": {
      "title": "References",
      "type": "object",
      "description": "Assay type will be inferred from the provided reference(s).\nDo not provide both reference_archive and targeted_reference at the same time.\n  \nValid reference input combinations:\n  - reference_archive: WTA only\n  - reference_archive & abseq_reference: WTA + AbSeq\n  - reference_archive & supplemental_reference: WTA + extra transgenes\n  - reference_archive & abseq_reference & supplemental_reference: WTA + AbSeq + extra transgenes\n  - reference_archive: WTA + ATAC or ATAC only\n  - reference_archive & supplemental_reference: WTA + ATAC + extra transgenes\n  - targeted_reference: Targeted only\n  - targeted_reference & abseq_reference: Targeted + AbSeq\n  - abseq_reference: AbSeq only\n\nThe reference_archive can be generated with the `reference/build_bdrhap_reference` component.\nAlternatively, BD also provides standard references which can be downloaded from these locations:\n\n  - Human: https://bd-rhapsody-public.s3.amazonaws.com/Rhapsody-WTA/Pipeline-version2.x_WTA_references/RhapRef_Human_WTA_2023-02.tar.gz\n  - Mouse: https://bd-rhapsody-public.s3.amazonaws.com/Rhapsody-WTA/Pipeline-version2.x_WTA_references/RhapRef_Mouse_WTA_2023-02.tar.gz\n",
      "properties": {
        "reference_archive": {
          "type": "string",
          "format": "path",
          "description": "Path to Rhapsody WTA Reference in the tar.gz format.\n\nStructure of the reference archive:\n  \n- `BD_Rhapsody_Reference_Files/`: top level folder\n  - `star_index/`: sub-folder containing STAR index, that is files created with `STAR --runMode genomeGenerate`\n  - GTF for gene-transcript-annotation e.g",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"RhapRef_Human_WTA_2023-02.tar.gz\"`. "
        },
        "targeted_reference": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Path to the targeted reference file in FASTA format.\n",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"BD_Rhapsody_Immune_Response_Panel_Hs.fasta\"]`. "
        },
        "abseq_reference": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Path to the AbSeq reference file in FASTA format",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"AbSeq_reference.fasta\"]`. "
        },
        "supplemental_reference": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "format": "path",
          "description": "Path to the supplemental reference file in FASTA format",
          "help_text": "Type: `file`, multiple: `True`, direction: `input`, example: `[\"supplemental_reference.fasta\"]`. "
        }
      }
    },
    "putative cell calling settings": {
      "title": "Putative Cell Calling Settings",
      "type": "object",
      "description": "No description",
      "properties": {
        "cell_calling_data": {
          "type": "string",
          "description": "Specify the dataset to be used for putative cell calling: mRNA, AbSeq, ATAC, mRNA_and_ATAC\n  \nFor putative cell calling using an AbSeq dataset, please provide an AbSeq_Reference fasta file above.\n  \nFor putative cell calling using an ATAC dataset, please provide a WTA+ATAC-Seq Reference_Archive file above.\n  \nThe default data for putative cell calling, will be determined the following way:\n  \n- If mRNA Reads and ATAC Reads exist: mRNA_and_ATAC\n- If only ATAC Reads exist: ATAC\n- Otherwise: mRNA\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"mRNA\"`, choices: ``mRNA`, `AbSeq`, `ATAC`, `mRNA_and_ATAC``. ",
          "enum": [
            "mRNA",
            "AbSeq",
            "ATAC",
            "mRNA_and_ATAC"
          ]
        },
        "cell_calling_bioproduct_algorithm": {
          "type": "string",
          "description": "Specify the bioproduct algorithm to be used for putative cell calling: Basic or Refined\n  \nBy default, the Basic algorithm will be used for putative cell calling.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"Basic\"`, choices: ``Basic`, `Refined``. ",
          "enum": [
            "Basic",
            "Refined"
          ]
        },
        "cell_calling_atac_algorithm": {
          "type": "string",
          "description": "Specify the ATAC-seq algorithm to be used for putative cell calling: Basic or Refined\n  \nBy default, the Basic algorithm will be used for putative cell calling.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"Basic\"`, choices: ``Basic`, `Refined``. ",
          "enum": [
            "Basic",
            "Refined"
          ]
        },
        "exact_cell_count": {
          "type": "integer",
          "description": "Set a specific number of cells as putative, based on those with the highest error-corrected read count\n",
          "help_text": "Type: `integer`, multiple: `False`, example: `10000`. "
        },
        "expected_cell_count": {
          "type": "integer",
          "description": "Guide the basic putative cell calling algorithm by providing an estimate of the number of cells expected",
          "help_text": "Type: `integer`, multiple: `False`, example: `20000`. "
        }
      }
    },
    "intronic reads settings": {
      "title": "Intronic Reads Settings",
      "type": "object",
      "description": "No description",
      "properties": {
        "exclude_intronic_reads": {
          "type": "boolean",
          "description": "By default, the flag is false, and reads aligned to exons and introns are considered and represented in molecule counts",
          "help_text": "Type: `boolean`, multiple: `False`, example: `false`. "
        }
      }
    },
    "multiplex settings": {
      "title": "Multiplex Settings",
      "type": "object",
      "description": "No description",
      "properties": {
        "sample_tags_version": {
          "type": "string",
          "description": "Specify the version of the Sample Tags used in the run:\n\n* If Sample Tag Multiplexing was done, specify the appropriate version: human, mouse, flex, nuclei_includes_mrna, nuclei_atac_only\n* If this is an SMK + Nuclei mRNA run or an SMK + Multiomic ATAC-Seq (WTA+ATAC-Seq) run (and not an SMK + ATAC-Seq only run), choose the \"nuclei_includes_mrna\" option.\n* If this is an SMK + ATAC-Seq only run (and not SMK + Multiomic ATAC-Seq (WTA+ATAC-Seq)), choose the \"nuclei_atac_only\" option.\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"human\"`, choices: ``human`, `mouse`, `flex`, `nuclei_includes_mrna`, `nuclei_atac_only``. ",
          "enum": [
            "human",
            "mouse",
            "flex",
            "nuclei_includes_mrna",
            "nuclei_atac_only"
          ]
        },
        "tag_names": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Specify the tag number followed by '-' and the desired sample name to appear in Sample_Tag_Metrics.csv\nDo not use the special characters.\n",
          "help_text": "Type: `string`, multiple: `True`, example: `[\"4-mySample\";\"9-myOtherSample\";\"6-alsoThisSample\"]`. "
        }
      }
    },
    "vdj arguments": {
      "title": "VDJ arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "vdj_version": {
          "type": "string",
          "description": "If VDJ was done, specify the appropriate option: human, mouse, humanBCR, humanTCR, mouseBCR, mouseTCR\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"human\"`, choices: ``human`, `mouse`, `humanBCR`, `humanTCR`, `mouseBCR`, `mouseTCR``. ",
          "enum": [
            "human",
            "mouse",
            "humanBCR",
            "humanTCR",
            "mouseBCR",
            "mouseTCR"
          ]
        }
      }
    },
    "atac options": {
      "title": "ATAC options",
      "type": "object",
      "description": "No description",
      "properties": {
        "predefined_atac_peaks": {
          "type": "string",
          "format": "path",
          "description": "An optional BED file containing pre-established chromatin accessibility peak regions for generating the ATAC cell-by-peak matrix.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"predefined_peaks.bed\"`. "
        }
      }
    },
    "additional options": {
      "title": "Additional options",
      "type": "object",
      "description": "No description",
      "properties": {
        "run_name": {
          "type": "string",
          "description": "Specify a run name to use as the output file base name",
          "help_text": "Type: `string`, multiple: `False`, default: `\"sample\"`. ",
          "default": "sample"
        },
        "generate_bam": {
          "type": "boolean",
          "description": "Specify whether to create the BAM file output\n",
          "help_text": "Type: `boolean`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "long_reads": {
          "type": "boolean",
          "description": "Use STARlong (default: undefined - i.e",
          "help_text": "Type: `boolean`, multiple: `False`. "
        }
      }
    },
    "advanced options": {
      "title": "Advanced options",
      "type": "object",
      "description": "NOTE: Only change these if you are really sure about what you are doing\n",
      "properties": {
        "custom_star_params": {
          "type": "string",
          "description": "Modify STAR alignment parameters - Set this parameter to fully override default STAR mapping parameters used in the pipeline.\nFor reference this is the default that is used:\n\n  Short Reads: `--outFilterScoreMinOverLread 0 --outFilterMatchNminOverLread 0 --outFilterMultimapScoreRange 0 --clip3pAdapterSeq AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA --seedSearchStartLmax 50 --outFilterMatchNmin 25 --limitOutSJcollapsed 2000000`\n  Long Reads: Same as Short Reads + `--seedPerReadNmax 10000`\n\nThis applies to fastqs provided in the Reads user input \nDo NOT set any non-mapping related params like `--genomeDir`, `--outSAMtype`, `--outSAMunmapped`, `--readFilesIn`, `--runThreadN`, etc.\nWe use STAR version 2.7.10b\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"--alignIntronMax 6000 --outFilterScoreMinOverLread 0.1 --limitOutSJcollapsed 2000000\"`. "
        },
        "custom_bwa_mem2_params": {
          "type": "string",
          "description": "Modify bwa-mem2 alignment parameters - Set this parameter to fully override bwa-mem2 mapping parameters used in the pipeline\nThe pipeline does not specify any custom mapping params to bwa-mem2 so program default values are used\nThis applies to fastqs provided in the Reads_ATAC user input \nDo NOT set any non-mapping related params like `-C`, `-t`, etc.\nWe use bwa-mem2 version 2.2.1\n",
          "help_text": "Type: `string`, multiple: `False`, example: `\"-k 16 -w 200 -r\"`. "
        }
      }
    },
    "cwl-runner arguments": {
      "title": "CWL-runner arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "parallel": {
          "type": "boolean",
          "description": "Run jobs in parallel.",
          "help_text": "Type: `boolean`, multiple: `False`, default: `true`. ",
          "default": true
        },
        "timestamps": {
          "type": "boolean",
          "description": "Add timestamps to the errors, warnings, and notifications.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        }
      }
    },
    "undocumented arguments": {
      "title": "Undocumented arguments",
      "type": "object",
      "description": "No description",
      "properties": {
        "abseq_umi": {
          "type": "integer",
          "description": "",
          "help_text": "Type: `integer`, multiple: `False`. "
        },
        "target_analysis": {
          "type": "boolean",
          "description": "",
          "help_text": "Type: `boolean`, multiple: `False`. "
        },
        "vdj_jgene_evalue": {
          "type": "number",
          "description": "e-value threshold for J gene",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "vdj_vgene_evalue": {
          "type": "number",
          "description": "e-value threshold for V gene",
          "help_text": "Type: `double`, multiple: `False`. "
        },
        "write_filtered_reads": {
          "type": "boolean",
          "description": "",
          "help_text": "Type: `boolean`, multiple: `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/references"
    },
    {
      "$ref": "#/$defs/putative cell calling settings"
    },
    {
      "$ref": "#/$defs/intronic reads settings"
    },
    {
      "$ref": "#/$defs/multiplex settings"
    },
    {
      "$ref": "#/$defs/vdj arguments"
    },
    {
      "$ref": "#/$defs/atac options"
    },
    {
      "$ref": "#/$defs/additional options"
    },
    {
      "$ref": "#/$defs/advanced options"
    },
    {
      "$ref": "#/$defs/cwl-runner arguments"
    },
    {
      "$ref": "#/$defs/undocumented arguments"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
