Running Clara Parabricks on Azure
This guide shows how to run Parabricks on a compute instance on Azure.
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 start a Compute Instance on Azure.
Begin by navigating to the Azure Portal homepage and from the menu on the top left, select Virtual machines. This will take us to the Virtual machines page.
![image_starting_a_compute_instance.png](https://docscontent.nvidia.com/dims4/default/2d5a0b8/2147483647/strip/true/crop/1999x611+0+0/resize/1440x440!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_starting_a_compute_instance.png)
At the top of the page, select Create, and Azure virtual machine. Here we can configure all the settings for our Virtual machine. You will need to choose your Subscription, then choose or create a new Resource group. For our example we will create a Resource group called “Parabricks”.
![image_create_pb_resource.png](https://docscontent.nvidia.com/dims4/default/02aa256/2147483647/strip/true/crop/1400x1054+0+0/resize/1400x1054!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_create_pb_resource.png)
We then add the instance details, we will name our VM “Parabricks”, and select an appropriate region. We then choose the Security type as “Standard” as shown below.
![image_set_instance_details.png](https://docscontent.nvidia.com/dims4/default/5dddc48/2147483647/strip/true/crop/1400x798+0+0/resize/1400x798!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_set_instance_details.png)
We choose an image by clicking on See all images. You can search for nvidia, and choose “NVIDIA GPU-Optimized VMI with vGPU driver” that will take care of the GPU Driver, and docker installation.
![image_select_image.png](https://docscontent.nvidia.com/dims4/default/3e6a883/2147483647/strip/true/crop/1358x1308+0+0/resize/1358x1308!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_select_image.png)
We then choose the Size for the GPUs that we want to be using.
![image_choose_size.png](https://docscontent.nvidia.com/dims4/default/2e1333a/2147483647/strip/true/crop/1358x736+0+0/resize/1358x736!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_choose_size.png)
For the Administrator account, You can either use an SSH public key, or as shown below, use a Username and Password.
![image_admin_acct.png](https://docscontent.nvidia.com/dims4/default/dbe7525/2147483647/strip/true/crop/1358x424+0+0/resize/1358x424!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_admin_acct.png)
If you need Disks, Networking or other specifications related to your work, click on “Next:Disks >”. However, if you don’t need any of these click on “Review + create”. If everything is configured well you will have a page to review, and the message “Validation passed” at the top.
![image_validation_passed.png](https://docscontent.nvidia.com/dims4/default/6b5d512/2147483647/strip/true/crop/904x1160+0+0/resize/904x1160!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_validation_passed.png)
Review the details and click Create at the bottom of the page. You will land on a page saying “… Deployment in progress”. When it is complete, click the “Go to resource” button.
![image_go_to_resource.png](https://docscontent.nvidia.com/dims4/default/2fbb8e3/2147483647/strip/true/crop/736x288+0+0/resize/736x288!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_go_to_resource.png)
You should see a page like below. Click on Connect.
![image_connect.png](https://docscontent.nvidia.com/dims4/default/c7ddbfc/2147483647/strip/true/crop/904x372+0+0/resize/904x372!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_connect.png)
Once the instance is running click on Connect and use the IP information to ssh into your instance.
Verify that the driver is installed using nvidia-smi.
We will install Parabricks into our instance that we just created. To do this, we will use the NVIDIA GPU Cloud (NGC) to download the Parabricks Docker image.
Visit the Parabricks page on NGC to get the Docker pull command for the latest version of Parabricks.
![image_ngc1.png](https://docscontent.nvidia.com/dims4/default/c15fc4c/2147483647/strip/true/crop/1337x777+0+0/resize/1337x777!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_ngc1.png)
Back in our EC2 instance, let’s run the docker pull command:
$ docker pull nvcr.io/nvidia/clara/clara-parabricks:4.2-1
![image_docker_pull.png](https://docscontent.nvidia.com/dims4/default/2953432/2147483647/strip/true/crop/1146x340+0+0/resize/1146x340!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_docker_pull.png)
Parabricks is now installed. Let’s run some sample data to test it.
Parabricks provides a small sample dataset as a test for the installation and hardware which can be downloaded using:
$ wget -O parabricks_sample.tar.gz \
"https://s3.amazonaws.com/parabricks.sample/parabricks_sample.tar.gz"
![image_wget_sample_data.png](https://docscontent.nvidia.com/dims4/default/22e2376/2147483647/strip/true/crop/1504x230+0+0/resize/1440x220!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_wget_sample_data.png)
When the download completes we can untar the data using:
$ tar xvf parabricks_sample.tar.gz
And you should see something like below:
![image_untar.png](https://docscontent.nvidia.com/dims4/default/b0fa9f4/2147483647/strip/true/crop/1146x454+0+0/resize/1146x454!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_untar.png)
Finally, we can run any of the Parabricks pipelines on it. Let’s run the germline pipeline using the following command:
$ docker run \
--rm \
--gpus all \
--volume `pwd`:`pwd` \
--workdir `pwd`/parabricks_sample \
nvcr.io/nvidia/clara/clara-parabricks:4.2-1 \
pbrun germline \
--ref Ref/Homo_sapiens_assembly38.fasta \
--in-fq Data/sample_1.fq.gz Data/sample_2.fq.gz \
--knownSites Ref/Homo_sapiens_assembly38.known_indels.vcf.gz.tbi \
--out-bam output.bam \
--out-variants germline.vcf \
--out-recal-file recal.txt
We can tell that Parabricks started correctly when we see the Parabricks banner and the ProgressMeter begins to populate with values:
![image_output.png](https://docscontent.nvidia.com/dims4/default/50eca3e/2147483647/strip/true/crop/1622x774+0+0/resize/1440x687!/quality/90/?url=https%3A%2F%2Fk3-prod-nvidia-docs.s3.us-west-2.amazonaws.com%2Fbrightspot%2Fsphinx%2F0000018b-6753-d717-adef-ffffd61b0000%2Fclara%2Fparabricks%2F4.2.0%2F_images%2Fimage_output.png)
This should take ~10 minutes to finish running. When it’s done, we should see the output files in the sample data directory.
We encourage you to expand on the demo in this guide by using your own data, trying other pipelines, and generally exploring what Parabricks has to offer. Check out the documentation for more information about the different pipelines available. You can also find our online developer community on the Parabricks forum, where you can ask questions and search through answers while you are learning how to use Parabricks.