COVID Variant Analysis on Azure using Nextflow

Published Jan 27 2022 12:28 PM 1,747 Views
Microsoft

This is a three-part series example of running Nextflow on Azure.

Part 1: Basics (This blog)

Part 2: Getting started with Nextflow & HAVoC (coming soon)

Part 3: Data analysis & visualization (coming soon)

 

Imagine you were a public health official for your state. As the COVID virus spreads through the community, you not only need to know the number of cases but also the COVID variants that are affecting your community. You are working with a lab that has the capability to quickly turnaround case positivity results and they are adding the capacity to sequence a portion of the samples. We are going to show an example using Nextflow on Azure to run a pipeline called HAVoC, that the lab could use to detect the variants of COVID spreading in your community. This is not the only solution, but an example of how this problem could be solved.

 

Nextflow is a workflow framework that can be used for Genomics analysis. Genomics pipelines are composed of many different interdependent tasks. The output of a task is used as the input of a subsequent downstream task. Each task usually involves running a process that manipulates the data.

 

HAVoC is a bioinformatics pipeline built by a team at the Helsinki University that can be used to analyze variations in the COVID virus genome and assign variant lineage. You could analyze a sample and identify which of the known variants is spreading in your community.

 

Bioinformatic pipelines are compute intensive. The HAVoC pipeline, for example, is made up of more than ten different interdependent tasks. Each task requires an input that might come from a previous step, runs a dedicated process, and generates an output that might be passed to a downstream task or stored for further analysis. Additionally, these pipelines may need to run on multiple samples concurrently. Using the power of Azure, we can dynamically assign the right type and amount of compute for the task, scaling up and down as needed. We can also free up the resources as soon as they are no longer needed. This flexibility and scalability make these pipelines ideal for running on the cloud.

 

To get started, we will install Nextflow on a local compute, this can be your desktop or a VM that you have access to. We’ll call this local compute the client on this blog. The client doesn’t have to run on Azure to get started. You can run Nextflow on any POSIX compatible systems. For Windows users you can either use the WSL (Windows Subsystem for Linux) or use a Linux based VM. The only other dependency is Java, versions should be 8 or greater.  Follow instructions on the “Getting Started” section.

 

Although you can run Nextflow on your client locally, you are limited to the resources that you have available locally. This is a good way to develop and test your pipelines but for production use you want to leverage the power of Azure. Fortunately, Nextflow supports this easily. Just by changing a few attributes on the configuration file, you can use the power and scalability of Azure you run your pipelines.

 

On the next blog, we’ll look at how to set up a Nextflow environment. We’ll show how to execute jobs locally and then using the HAVoC script, we’ll show you how to run jobs on Azure.

%3CLINGO-SUB%20id%3D%22lingo-sub-3074427%22%20slang%3D%22en-US%22%3ECOVID%20Variant%20Analysis%20on%20Azure%20using%20Nextflow%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3074427%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20a%20three-part%20series%20example%20of%20running%20Nextflow%20on%20Azure.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fhealthcare-and-life-sciences%2Fcovid-variant-analysis-on-azure-using-nextflow%2Fba-p%2F3074427%22%20target%3D%22_self%22%3EPart%201%3A%20Basics%20(This%20blog)%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EPart%202%3A%20Getting%20started%20with%20Nextflow%20%26amp%3B%20HAVoC%20(coming%20soon)%3C%2FP%3E%0A%3CP%3EPart%203%3A%20Data%20analysis%20%26amp%3B%20visualization%20(coming%20soon)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EImagine%20you%20were%20a%20public%20health%20official%20for%20your%20state.%20As%20the%20COVID%20virus%20spreads%20through%20the%20community%2C%20you%20not%20only%20need%20to%20know%20the%20number%20of%20cases%20but%20also%20the%20COVID%20variants%20that%20are%20affecting%20your%20community.%20You%20are%20working%20with%20a%20lab%20that%20has%20the%20capability%20to%20quickly%20turnaround%20case%20positivity%20results%20and%20they%20are%20adding%20the%20capacity%20to%20sequence%20a%20portion%20of%20the%20samples.%20We%20are%20going%20to%20show%20an%20example%20using%20Nextflow%20on%20Azure%20to%20run%20a%20pipeline%20called%20HAVoC%2C%20that%20the%20lab%20could%20use%20to%20detect%20the%20variants%20of%20COVID%20spreading%20in%20your%20community.%20This%20is%20not%20the%20only%20solution%2C%20but%20an%20example%20of%20how%20this%20problem%20could%20be%20solved.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20title%3D%22Nextflow%22%20href%3D%22https%3A%2F%2Fnextflow.io%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ENextflow%3C%2FA%3E%20is%20a%20workflow%20framework%20that%20can%20be%20used%20for%20Genomics%20analysis.%20Genomics%20pipelines%20are%20composed%20of%20many%20different%20interdependent%20tasks.%20The%20output%20of%20a%20task%20is%20used%20as%20the%20input%20of%20a%20subsequent%20downstream%20task.%20Each%20task%20usually%20involves%20running%20a%20process%20that%20manipulates%20the%20data.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHAVoC%20is%20a%20bioinformatics%20pipeline%20built%20by%20a%20team%20at%20the%20Helsinki%20University%20that%20can%20be%20used%20to%20analyze%20variations%20in%20the%20COVID%20virus%20genome%20and%20assign%20variant%20lineage.%20You%20could%20analyze%20a%20sample%20and%20identify%20which%20of%20the%20known%20variants%20is%20spreading%20in%20your%20community.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBioinformatic%20pipelines%20are%20compute%20intensive.%20The%20HAVoC%20pipeline%2C%20for%20example%2C%20is%20made%20up%20of%20more%20than%20ten%20different%20interdependent%20tasks.%20Each%20task%20requires%20an%20input%20that%20might%20come%20from%20a%20previous%20step%2C%20runs%20a%20dedicated%20process%2C%20and%20generates%20an%20output%20that%20might%20be%20passed%20to%20a%20downstream%20task%20or%20stored%20for%20further%20analysis.%20Additionally%2C%20these%20pipelines%20may%20need%20to%20run%20on%20multiple%20samples%20concurrently.%20Using%20the%20power%20of%20Azure%2C%20we%20can%20dynamically%20assign%20the%20right%20type%20and%20amount%20of%20compute%20for%20the%20task%2C%20scaling%20up%20and%20down%20as%20needed.%20We%20can%20also%20free%20up%20the%20resources%20as%20soon%20as%20they%20are%20no%20longer%20needed.%20This%20flexibility%20and%20scalability%20make%20these%20pipelines%20ideal%20for%20running%20on%20the%20cloud.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20get%20started%2C%20we%20will%20install%20Nextflow%20on%20a%20local%20compute%2C%20this%20can%20be%20your%20desktop%20or%20a%20VM%20that%20you%20have%20access%20to.%20We%E2%80%99ll%20call%20this%20local%20compute%20the%20client%20on%20this%20blog.%20The%20client%20doesn%E2%80%99t%20have%20to%20run%20on%20Azure%20to%20get%20started.%20You%20can%20run%20Nextflow%20on%20any%20POSIX%20compatible%20systems.%20For%20Windows%20users%20you%20can%20either%20use%20the%20WSL%20(Windows%20Subsystem%20for%20Linux)%20or%20use%20a%20Linux%20based%20VM.%20The%20only%20other%20dependency%20is%20Java%2C%20versions%20should%20be%208%20or%20greater.%26nbsp%3B%20Follow%20instructions%20on%20the%20%E2%80%9C%3CA%20title%3D%22Nextflow%20-%20Getting%20started%22%20href%3D%22https%3A%2F%2Fnextflow.io%2Findex.html%23GetStarted%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGetting%20Started%3C%2FA%3E%E2%80%9D%20section.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlthough%20you%20can%20run%20Nextflow%20on%20your%20client%20locally%2C%20you%20are%20limited%20to%20the%20resources%20that%20you%20have%20available%20locally.%20This%20is%20a%20good%20way%20to%20develop%20and%20test%20your%20pipelines%20but%20for%20production%20use%20you%20want%20to%20leverage%20the%20power%20of%20Azure.%20Fortunately%2C%20Nextflow%20supports%20this%20easily.%20Just%20by%20changing%20a%20few%20attributes%20on%20the%20configuration%20file%2C%20you%20can%20use%20the%20power%20and%20scalability%20of%20Azure%20you%20run%20your%20pipelines.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOn%20the%20next%20blog%2C%20we%E2%80%99ll%20look%20at%20how%20to%20set%20up%20a%20Nextflow%20environment.%20We%E2%80%99ll%20show%20how%20to%20execute%20jobs%20locally%20and%20then%20using%20the%20HAVoC%20script%2C%20we%E2%80%99ll%20show%20you%20how%20to%20run%20jobs%20on%20Azure.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-3074427%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20the%20COVID%20virus%20mutates%2C%20it's%20critical%20to%20detect%20which%20variants%20are%20spreading%20in%20the%20community.%20Using%20Nextflow%20on%20Azure%2C%20we%20show%20how%20you%20can%20analyze%20and%20detect%20different%20variants.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22covid-lineage.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F343097i8573C3A4E4066A4B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22covid-lineage.jpeg%22%20alt%3D%22covid-lineage.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3074427%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHLS_Hack%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELife%20Sciences%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jan 28 2022 12:15 PM
Updated by: