# Nextflow Setup

In order for Nextflow to run correctly on the platform, please do the following:

1. Install dxpy/ dx-toolkit. Details on how to do this is in the Command Line Interface Section under Introduction to the CLI.

   1. As Nextflow on DNAnexus is being updated with bugfixes and improvements on a regular basis, we recommend updating dxpy to the latest version prior to building your Nextflow applet.
   2. You can upgrade dxpy by using the following

   ```
   pip3 install --upgrade dxpy
   ```
2. The version of dxpy that you use controls the version of the DNAnexus Nextflow executor and thus the version of Nextflow that is used for executing your pipeline.
3. Nextflow and dxpy versions
   1. Most nfcore pipelines require versions of Nextflow starting with '23' and you will need to use a recent version of dxpy
   2. [dxpy versions >= v0.368.1 use Nextflow version 23.10.0](https://github.com/dnanexus/dx-toolkit/blob/master/CHANGELOG.md#3681---2024116)
   3. [dxpy version >= 0.343.0 and < 0.368.1 use Nextflow version 22.10.7](https://github.com/dnanexus/dx-toolkit/blob/master/CHANGELOG.md#3430---2023324)
   4. [Nextflow support was initially introduced at dx v0.330.0 and uses a version of Nextflow older than 22.10.7](https://github.com/dnanexus/dx-toolkit/blob/master/CHANGELOG.md#3300---2022104)
   5. For example an Nextflow applet built using v0.370.2 will have Nextflow version 23.10.0 bundled with it and it will use this version of Nextflow and v0.370.2 of dxpy for executing the Nextflow pipeline on the platform.

## Resources

[Full Documentation](https://documentation.dnanexus.com/)

To create a support ticket if there are technical issues:

1. Go to the Help header (same section where Projects and Tools are) inside the platform
2. Select "Contact Support"
3. Fill in the Subject and Message to submit a support ticket.


---

# 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://academy.dnanexus.com/buildingworkflows/nf/nextflowsetup.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.
