A workflow can be created using the web interface or it can be built in the CLI using tools provided by DNAnexus SDK. This page focuses on creating a workflow in a terminal. It will walk you through important features of the DNAnexus workflow build infrastructure that will help you build your workflows programmatically.
: The DNAnexus SDK
, dx-toolkit, is required to build workflows from JSON definitions.
Workflow Directory Structure
DNAnexus workflows can be built using the
dx build command, which takes the workflow JSON representation from your local workstation and uploads it to a workflow object on the platform. The DNAnexus SDK expects the workflow definition to reside in a directory with the following structure:
dxworkflow.json (Workflow metadata)
dxworkflow.json is a DNAnexus workflow metadata file. If it is detected in the directory provided to
dx build, the dx-toolkit will attempt to build a workflow in the platform according to the workflow specification in the JSON file. See dxworkflow.json for a complete description of the workflow metadata format.
Readme.md file, if present, is inlined into the
description field of the workflow.
Building a workflow
Having placed the workflow metadata in
MyWorkflow, you can load your workflow on the DNAnexus platform:
dx build MyWorkflow
The built workflow will be in a closed, immutable state.
Getting a workflow
Similarly to apps and applets, developers can use the command
dx get to download the workflow description from the platform, for example:
dx get MyWorkflow
It will create a directory
MyWorkflow (after the workflow's name) containing the workflow representation in the working directory. It can be used again to create a new workflow with
The Intro to Building Workflows tutorial will guide you to create a workflow from
workflow.json step by step.
See the API Specification for a complete reference to the API methods that create and handle workflows on the DNAnexus platform.