
Workflow Description Language (WDL) has been gaining ground in the bioinformatics community as an alternative to Nextflow for reproducible computational pipelines. If you have worked with Nextflow and want to explore WDL, many concepts are familiar, and some differences in syntax and execution model are worth noting. This guide walks through setting up WDL with miniWDL and Sprocket, two modern WDL executors, while drawing parallels to Nextflow.
The key difference between WDL and Nextflow is not only syntax—it is also how workflows are executed. That distinction matters when choosing a tool.
Nextflow is both a language and a runtime executor. You write in Nextflow DSL2 and execute directly using the nextflow CLI, which abstracts away infrastructure differences:
nextflow run workflow.nf -profile slurm # HPC with SLURMnextflow run workflow.nf -profile aws # AWS Batchnextflow run workflow.nf -profile k8s # Kubernetesnextflow run workflow.nf -profile azure # AzureWDL is a language only—you need a separate executor to run it. Common executors include Cromwell, miniWDL, and Sprocket, each with its own configuration and capabilities:
miniwdl run workflow.wdl -i inputs.json # Local/Simplesprocket run workflow.wdl inputs.json # Modern CLIjava -jar cromwell.jar run workflow.wdl # Enterprise| Aspect | WDL | Nextflow |
|---|---|---|
| Language vs Runtime | Language only (requires separate executor) | Language + Integrated runtime (nextflow CLI) |
| Execution Paradigm | Declarative tasks + workflow composition | Dataflow-based channels |
| Type System | Strongly typed, compile-time validation | Weakly typed, runtime flexible |
| Origin & Community | Broad Institute (US), growing community | European origins, now globally widely used |
| Cloud Support | Cromwell/Sprocket on AWS, GCP, Azure (emerging) | Mature support across major clouds |
| HPC Support | Cromwell/miniWDL on SLURM, PBS, etc. | Native support for SLURM, PBS, SGE |
| Kubernetes | Limited support | Mature K8s support |
| Production Deployment | Enterprise-grade on Cromwell/Terra | Widely adopted in production |
| Community Workflows | ~500+ (GATK, WILDS) | 10,000+ public workflows |
| Learning Curve | Steeper (more structured) | Gentler (more intuitive) |
| Infrastructure Flexibility | Multi-executor approach (less unified) | Single CLI with profile abstraction (highly flexible) |
Choose WDL when:
Choose Nextflow when:
-profile)miniWDL is a lightweight WDL executor aimed at local development and testing:
# Using pip (Python 3.8+)pip install miniwdl
# Verify installationminiwdl --version
# Or using condaconda install -c bioconda miniwdlSprocket is a modern WDL executor with a CLI-oriented interface:
# Install using curlcurl -L https://releases.sprocket.bio/sprocket/latest/sprocket-linux-x86_64 -o sprocketchmod +x sprocketmv sprocket /usr/local/bin/
# Or download from: https://sprocket.bio/
# Verify installationsprocket --versionWDL workflows rely on containerized environments. Choose one:
# Docker (recommended for local development)curl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.sh
# Or Apptainer (HPC environments)sudo apt-get install apptainerA simple "Hello World" WDL workflow illustrates the basic structure:
version 1.0
task greet { input { String name }
command <<< echo "Hello, ~{name}!" >>>
output { String greeting = read_string(stdout()) }
runtime { docker: "ubuntu:22.04" memory: "512 MB" cpu: 1 }}
workflow hello_world { input { String person_name = "World" }
call greet { input: name = person_name }
output { String message = greet.greeting }}version 1.0: WDL specification version (similar to Nextflow's manifest)task: equivalent to a Nextflow process, defines an atomic computationworkflow: orchestrates tasks and data flow (like Nextflow workflow blocks)input: explicitly typed input parameters (strong typing, unlike Nextflow)command: the shell command (similar to Nextflow's script: block)runtime: container and resource specifications (like Nextflow's container and resources)output: explicitly declared outputs with typesCreate hello_inputs.json:
{ "hello_world.person_name": "WDL User"}Note the syntax: workflow_name.input_parameter.
# Run the workflowminiwdl run hello_world.wdl -i hello_inputs.json
# Check outputs in the generated directorycd hello_world_*/cat outputs.json# Run with Sprocketsprocket run hello_world.wdl hello_inputs.json
# Sprocket provides a summarysprocket run hello_world.wdl hello_inputs.json --watchA practical example is the ww-sra-salmon pipeline from the WILDS WDL Library, which downloads RNA-seq data from NCBI's Sequence Read Archive and quantifies transcript abundance using Salmon.
sra_salmon workflow:├── Download FASTQ from SRA (scattered across samples)├── Detect paired-end vs single-end├── Build Salmon index (once)├── Quantify transcripts (scattered quantification)└── Merge results into expression matricesversion 1.0
import "https://raw.githubusercontent.com/getwilds/wilds-wdl-library/refs/heads/main/modules/ww-sra/ww-sra.wdl" as sra_tasksimport "https://raw.githubusercontent.com/getwilds/wilds-wdl-library/refs/heads/main/modules/ww-salmon/ww-salmon.wdl" as salmon_tasks
workflow sra_salmon { meta { author: "Taylor Firman" description: "Download RNA-seq from SRA and quantify with Salmon" }
input { Array[String] sra_id_list File transcriptome_fasta Int ncpu = 8 Int memory_gb = 16 Int? max_reads }
# Build Salmon index (single task, not scattered) call salmon_tasks.build_index { input: transcriptome_fasta = transcriptome_fasta, cpu_cores = ncpu, memory_gb = memory_gb }
# Process each SRA sample in parallel (scatter) scatter ( id in sra_id_list ){ call sra_tasks.fastqdump { input: sra_id = id, ncpu = ncpu, max_reads = max_reads }
# Conditional: paired-end vs single-end handling if (fastqdump.is_paired_end) { call salmon_tasks.quantify as quantify_paired { input: salmon_index_dir = build_index.salmon_index, sample_name = id, fastq_r1 = fastqdump.r1_end, fastq_r2 = fastqdump.r2_end, cpu_cores = ncpu, memory_gb = memory_gb } }
if (!fastqdump.is_paired_end) { call salmon_tasks.quantify as quantify_single { input: salmon_index_dir = build_index.salmon_index, sample_name = id, fastq_r1 = fastqdump.r1_end, cpu_cores = ncpu, memory_gb = memory_gb } }
# Select output from appropriate branch File quant_dir = select_first([quantify_paired.salmon_quant_dir, quantify_single.salmon_quant_dir]) }
# Merge quantification across all samples call salmon_tasks.merge_results { input: salmon_quant_dirs = quant_dir }
output { Array[File] salmon_quant_dirs = quant_dir File tpm_matrix = merge_results.tpm_matrix File counts_matrix = merge_results.counts_matrix }}The same logic in Nextflow DSL2:
// Nextflow equivalent (simplified)workflow sra_salmon { input_ch = Channel.fromList(params.sra_id_list)
build_index(file(params.transcriptome_fasta))
input_ch | fastqdump | quantify | collect | merge_results}Key differences:
scatter is explicit and limited in scope; Nextflow's channels are more dynamicif for conditionals is explicit; Nextflow uses when and branchingimport pulls remote tasks directly; Nextflow uses include and local paths{ "sra_salmon.sra_id_list": ["SRR3589956", "SRR3589957"], "sra_salmon.transcriptome_fasta": "/path/to/gencode.v43.transcripts.fa", "sra_salmon.ncpu": 8, "sra_salmon.memory_gb": 16}# Using miniWDLminiwdl run ww-sra-salmon.wdl -i inputs.json
# Using Sprocketsprocket run ww-sra-salmon.wdl inputs.json
# Watch execution progress (Sprocket)sprocket run ww-sra-salmon.wdl inputs.json --watchWDL's scatter is explicit and type-safe:
scatter (sample in sample_list) { call process_sample { input: sample_name = sample }}# Output is automatically collected into an ArrayArray[File] results = process_sample.output_fileCompared to Nextflow:
sample_ch = Channel.fromList(sample_list)sample_ch | process_sampleif (fastqdump.is_paired_end) { call quantify_paired { ... }}
# Select output safelyFile result = select_first([quantify_paired.output, quantify_single.output])WDL enforces strict typing:
# These won't compileInt my_int = "string" # ERRORFile f = my_int # ERROR
# CorrectInt number = 42File input_file = "/path/to/file.txt"Array[File] files = ["/file1.txt", "/file2.txt"]# Import tasks from GitHubimport "https://raw.githubusercontent.com/getwilds/wilds-wdl-library/refs/heads/main/modules/ww-salmon/ww-salmon.wdl" as salmon_tasks
# Use imported tasks with namespacecall salmon_tasks.build_index { ... }This section covers an architectural difference that is easy to overlook.
Nextflow: single CLI, many backends
With Nextflow, you switch between infrastructure backends using profiles—same code, different execution environment:
# Define once, run anywherenextflow run workflow.nf -profile slurm # Local HPCnextflow run workflow.nf -profile aws # AWS Batch + S3nextflow run workflow.nf -profile azure # Azure Batchnextflow run workflow.nf -profile gcp # Google Cloudnextflow run workflow.nf -profile k8s # KubernetesWDL: language plus separate executors
WDL separates concerns: write the workflow in WDL, then choose an executor that supports your infrastructure:
Each executor requires its own configuration.
Best for: local development, quick iteration, learning
Advantages:
--empty-secondaries)Limitations:
Usage:
miniwdl run workflow.wdl -i inputs.json -d output_dirminiwdl check workflow.wdl # Syntax validationBest for: enterprise deployments, HPC clusters, large-scale genomics
Advantages:
Limitations:
Usage:
java -jar cromwell.jar run workflow.wdl --inputs inputs.jsonBackend configuration example (Cromwell):
backend { default = "slurm"
providers { slurm { actor-factory = "cromwell.backend.impl.sfs.config.ConfigBackendLifecycleActorFactory" config { runtime_attributes = """ Int cpu = 1 Int? memory_gb String? docker """ } } }}Best for: modern cloud deployments, interactive development
Advantages:
Limitations:
Usage:
sprocket run workflow.wdl inputs.json --watchsprocket validate workflow.wdl # Type checking| Feature | miniWDL | Cromwell | Sprocket | Nextflow |
|---|---|---|---|---|
| Local Dev | ✓ Excellent | ○ Works | ✓ Good | ✓ Excellent |
| HPC (SLURM) | ✗ No | ✓ Yes | ○ Limited | ✓ Native |
| AWS Batch | ✗ No | ✓ Yes | ✓ Yes | ✓ Native |
| Google Cloud | ✗ No | ✓ Yes | ✓ Yes | ✓ Native |
| Azure | ✗ No | ✓ Yes | ✓ Yes | ✓ Native |
| Kubernetes | ✗ No | ○ Limited | ✓ Yes | ✓ Native |
| Installation | ✓ Simple (pip) | ○ Requires Java | ✓ Simple | ✓ Simple |
| Configuration | ○ JSON | ✗ Complex | ✓ Simple | ✓ Config files |
| Learning Curve | ✓ Gentle | ○ Steep | ✓ Gentle | ✓ Gentlest |
Key insight: Nextflow handles executor abstraction in one place—you define the execution environment in a config file, not in the executor. WDL requires choosing an executor that matches your infrastructure needs.
# Good: Reusable, single responsibilitytask align_reads { input { File reads File reference Int threads } # ... implementation}
# Bad: Too many responsibilitiestask process_and_qc_and_align { # ...}struct Sample { String name File r1_fastq File r2_fastq}
workflow my_workflow { input { Array[Sample] samples }
scatter (sample in samples) { call process_sample { input: sample_data = sample } }}# Compile-time validation catches errors earlyFile my_file = "/path/to/file.txt" # Clear intentInt threads = 8 # Not a stringtask my_task { meta { description: "What this task does" author: "Your Name" email: "your@email.com" }
parameter_meta { input_file: "Description of input" output_name: "Description of output" }
input { ... } command { ... } output { ... }}The decision between WDL and Nextflow often comes down to infrastructure, team, and community needs rather than language features alone.
-profile flag over executor-specific setupDoes your organization use Cromwell/Terra? ├─ YES → Consider WDL + Cromwell └─ NO → Consider Nextflow
Do you need to run on multiple infrastructure types from same code? ├─ YES → Nextflow (built-in abstraction) └─ NO → Either works, consider other factors
Do you want community workflows? ├─ YES → Nextflow (10,000+ available) └─ NO → WDL or Nextflow
Is infrastructure compatibility your main challenge? ├─ YES → Nextflow (cleaner abstraction) └─ NO → Choose based on other factorsWDL and Nextflow represent two different approaches to workflow automation:
The key architectural insight: Nextflow's executor abstraction makes multi-platform deployment simpler—just change a profile. WDL requires selecting an executor that matches your infrastructure needs. For organizations running across diverse platforms, Nextflow's unified CLI is an advantage; for Broad Institute-centric teams, WDL's formal structure and Terra integration may justify the executor complexity.
Practical recommendation:
The WILDS WDL Library provides production-ready modules that can accelerate WDL development, while the nf-core project offers 100+ peer-reviewed Nextflow pipelines. Whichever you choose, the workflow infrastructure landscape has mature tools for reproducible, scalable genomics.



