"name": "exome_variant_calling", # (optional for regular, project-based workflows;
# required for global workflows) Workflow name
"title": "Exome Variant Calling", # (optional) Title of a workflow, it is a label used when displaying,
# searching, or listing the workflow in the UI or CLI
"version": "1.0.0", # (optional for regular, project-based workflows; required for global workflows)
# Version of the global workflow
"summary": "A simple exome pipeline",# (optional) A short description of the workflow
"outputFolder": "/output", # (optional) Folder for the workflow's output
"inputs": [ # (optional) Workflow level input specification (see API documentation)
"name": "reads", # Name of the workflow-level input
"class": "array:file", # Class of the workflow-level input
"help": "An array of FASTQ gzipped files"
# (optional) help for this workflow-level input
"outputs": [ # (optional) Workflow level output specification (see API documentation)
"name": "variants", # Name of the workflow-level output
"class": "file", # Class of the workflow-level output
"outputSource": { # Link to the output of the stage which
"$dnanexus_link": { # provides the output of the workflow
"stage": "call_variants",
"outputField": "variants_vcfgz"
"stages": [ # (optional) A list of stages
"id": "align_reads", # Unique ID of the first stage
"name": "BWA MEM", # (optional) Display name of the first stage
"executable": "app-bwa_mem_fastq_read_mapper/2.0.4",
# Name or ID of the app or ID of the applet run in this stage
"folder": "map_reads_output", # The output subfolder into which the outputs of this stage should be cloned
"input": { # (optional) Input of the first stage
"genomeindex_targz": { # Input field name
"$dnanexus_link": { # Link to a reference genome file
"project": "project-BQpp3Y804Y0xbyG4GJPQ01xv",
"id": "file-B6ZY4942J35xX095VZyQBk0v"
"reads_fastqgzs": { # Input field name
"$dnanexus_link": { # Link to the workflow level input; the input passed to "reads" on the
"workflowInputField": "reads" # workflow level will be consumed by the "reads_fastqgz" input
"systemRequirements": { # (optional) Request different instance types for different entry
"main": { # "main" is the name of the entry point called when a stage is run
"instanceType": "mem1_ssd1_v2_x16"
"executionPolicy": { # (optional) Options governing job restart policy
"*": 3 # Restart automatically up to 3 times for all errors
# Unique ID of the second stage
# (optional) Display name of the second stage
"executable": "app-freebayes/2.0.1",
# Name or ID of the app/globalworkflow or ID of the applet/workflow run in this stage
"folder": "call_variants_output", # The output subfolder into which outputs should be cloned for the stage
"input": { # (optional) Input of the second stage which is linked
"sorted_bams": [{ # to the output of "sorted_bam" of the first stage.
"outputField": "sorted_bam"
"project": "project-BQpp3Y804Y0xbyG4GJPQ01xv",
"id": "file-B6ZY7VG2J35Vfvpkj8y0KZ01"