# 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. Check the [Running Batch Jobs Tutorial](/user/running-apps-and-workflows/running-batch-jobs.md) for more information on how to run a workflow or an application on many inputs automatically.

Alternatively, you can use the [`dx run`](/user/helpstrings-of-sdk-command-line-utilities.md#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 this way:

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

{% hint style="info" %}
The backslash `\` character is required to escape the colon `:` character in the workflow name.
{% endhint %}

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:

```shell
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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.dnanexus.com/faqs/automating-analysis-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
