Running Parabricks on DNAnexus
This guide shows how to run Parabricks on a compute instance on DNAnexus using both the GUI and the CLI.
Nvidia Clara Parabricks is an accelerated compute framework that supports applications across the genomics industry, primarily supporting analytical workflows for DNA, RNA, and somatic mutation detection applications. With industry leading compute times, Parabricks rapidly converts a FASTQ file to a VCF using multiple, industry validated variant callers and also includes the ability to QC and annotate those variants. As Parabricks is based upon publicly available tools, results are easy to verify and combine with other publicly available datasets.
More information is available on the Clara Parabricks Product Page.
Detailed installation, usage, and tuning information is available in the Parabricks user guide.
In this section we will show how to find all the available Parabricks pipelines on DNAnexus.
Start on the DNAnexus homepage and click “Tools” from the toolbar at the top.
![image_homepage.png](https://docscontent.nvidia.com/dims4/default/b3dd04f/2147483647/strip/true/crop/572x144+0+0/resize/572x144!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_homepage.png)
This will take you to the Tools Library, which shows all workflows you can run on DNAnexus. We can filter for just the Parabricks tools by clicking on “Name” and typing “Parabricks”. The list should look something like this:
![image_tool_list.png](https://docscontent.nvidia.com/dims4/default/c15c34b/2147483647/strip/true/crop/565x561+0+0/resize/565x561!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_tool_list.png)
In this guide, we will run FQ-to-BAM as an example to show how to get started. All the workflows run in a similar way, so this information is transferable to any pipeline.
Let’s start by clicking on FQ-to-BAM which will take us to the landing page for that tool.
Each tool has a page like this which includes information such as a README, instructions for running on the command line, and input/outputs for this specific tool.
Let’s start by using the GUI to run FQ-to-BAM. Click “Run” in the top left corner.
![image_fq2bam_tool.png](https://docscontent.nvidia.com/dims4/default/50ae4d4/2147483647/strip/true/crop/557x185+0+0/resize/557x185!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_fq2bam_tool.png)
This will open a new page and prompt us to select a project that has data for this run. You can use any fastq and reference files that you like, or you can download Parabricks sample files from using:
wget -O parabricks_sample.tar.gz \
"https://s3.amazonaws.com/parabricks.sample/parabricks_sample.tar.gz"
and upload them to DNAnexus as we have done for this tutorial. Note that the reference files must be zipped together in one folder.
Once we’ve selected our project we are shown a graphical representation of the file inputs and outputs for this pipeline on the left side of the page:
![image_inputs_and_outputs.png](https://docscontent.nvidia.com/dims4/default/6026a9a/2147483647/strip/true/crop/824x495+0+0/resize/824x495!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_inputs_and_outputs.png)
The Parabricks FQ-to-BAM pipeline accepts a reference and input fastq pairs as required files, with the option to add interval and known indel files as well. The output will be a bam with option recall file.
Other options can be found on the right side of the page under “Analysis Inputs 2”:
![image_options.png](https://docscontent.nvidia.com/dims4/default/b9c8e32/2147483647/strip/true/crop/936x897+0+0/resize/936x897!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_options.png)
Here you can see inputs that are not files, for example boolean and integer inputs. Clicking the question mark next to each option will pull up a dialogue box explaining how to use each option. For example, clicking the question mark next to “Interval” results in the following:
![image_interval_help.png](https://docscontent.nvidia.com/dims4/default/d16cb9c/2147483647/strip/true/crop/377x236+0+0/resize/377x236!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_interval_help.png)
For this tutorial, we will click on “Select File” to select our reference zip file:
![image_select_file.png](https://docscontent.nvidia.com/dims4/default/9f7ad89/2147483647/strip/true/crop/936x218+0+0/resize/936x218!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_select_file.png)
We will do the same for our fastq pairs. At this point you can set any other options we’d like, however we will leave the default values for everything else for the sake of simplicity in this tutorial.
Now that we have our files selected, we can click “Start Analysis” in the top right corner. This takes us to a page where we can monitor the status of our job. Let’s click on “View Log” and watch as the job runs.
![image_view_log.png](https://docscontent.nvidia.com/dims4/default/2251f8c/2147483647/strip/true/crop/1124x73+0+0/resize/1124x73!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_view_log.png)
It should take a few minutes for the job to start, and a few more minutes for the job to run to completion.
When the job is done we can check the logs by clicking on View Log. At the bottom of the log we can see the Parabricks terminal output and the confirmation text that the job successfully completed:
![image_terminal1.png](https://docscontent.nvidia.com/dims4/default/46fb0a7/2147483647/strip/true/crop/787x383+0+0/resize/787x383!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_terminal1.png)
You can click on View all Inputs/Outputs to see the output files as well as the input arguments:
![image_view_inputs_and_outputs.png](https://docscontent.nvidia.com/dims4/default/745cb76/2147483647/strip/true/crop/968x226+0+0/resize/968x226!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_view_inputs_and_outputs.png)
Congratulations! We have successfully run a Parabricks job on DNAnexus.
For users who prefer to use the terminal as opposed to a GUI, that option exists as well, provided you have the DNAnexus SDK installed. We can use the following command to run FQ-to-BAM with the same data we used in the previous section:
dx run fq2bam \
-iref=<project-id:reference-file-id> \
-iin_fq=<project-id:fastq1-file-id> \
-iin_fq=<project-id:fastq2-file-id>
For this we need the ID for the project and files that we plan to use. One way to get these is to go to the GUI, click on the file, and copy the ID from the right sidebar:
![image_view_project_id.png](https://docscontent.nvidia.com/dims4/default/dab627d/2147483647/strip/true/crop/323x256+0+0/resize/323x256!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F00000189-041a-d4ec-adab-2d1e05050000%2Fclara%2Fparabricks%2F4.1.0%2F_images%2Fimage_view_project_id.png)
Once we have our project and file IDs ready, we can run the command and it should come up in the Monitor tab for the project just like using the GUI.