Automating Analysis Workflow

How do I batch (apply to multiple inputs) a workflow that I created on the DNAnexus website?

The DNAnexus SDK provides a few dedicated utilities useful for batch processing. Please, check the Running Batch Jobs Tutorial for more information on how to run a workflow or an application on many inputs automatically.

Alternatively, you can use the dx run command to achieve this goal. For example, if you create a workflow called "Trio Exome Workflow - Jan 1st 2020 9:00am" in your project, you can run it from the command line in this way:

dx login
dx run "Trio Exome Workflow - Jan 1st 2020 9\:00am"

Note the \ that is needed to escape the : in the workflow name.

Inputs to the workflow can be specified using dx run <workflow> --input name=stage_id:value, where stage_id is a numeric ID starting at 0. More help can be found by running the commands dx run --help and dx run <workflow> --help.

Batching of multiple inputs can then be done like this:

dx cd /path/to/inputs
for i in $(dx ls); do
    dx run "Trio Exome Workflow - Jan 1st 2020 9\:00am" --input 0.reads="$i"
done

Last updated

Copyright 2024 DNAnexus