15 Apr 2026

Getting started with WDL: miniWDL and Sprocket setup guide

Giang Nguyen

Giang Nguyen

Read in Vietnamese
Getting started with WDL: miniWDL and Sprocket setup guide

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.

1. Understanding WDL vs Nextflow: the executor paradigm

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.

1.1 The execution model

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:

Terminal window
nextflow run workflow.nf -profile slurm # HPC with SLURM
nextflow run workflow.nf -profile aws # AWS Batch
nextflow run workflow.nf -profile k8s # Kubernetes
nextflow run workflow.nf -profile azure # Azure

WDL 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:

Terminal window
miniwdl run workflow.wdl -i inputs.json # Local/Simple
sprocket run workflow.wdl inputs.json # Modern CLI
java -jar cromwell.jar run workflow.wdl # Enterprise

1.2 Ecosystem and maturity comparison

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)

1.3 When to choose each

Choose WDL when:

  • ✓ Working within the Broad Institute ecosystem (Terra, FireCloud)
  • ✓ Strict type checking and compile-time validation are priorities
  • ✓ Building modular task libraries for reuse (GATK best practices)
  • ✓ Enterprise governance requires formal workflow validation
  • ✓ Your organization has existing Cromwell infrastructure

Choose Nextflow when:

  • ✓ You need flexibility and rapid iteration
  • ✓ Complex, dynamic data routing is required
  • ✓ You want access to large community-driven workflow collections (10,000+ public workflows)
  • ✓ Running across diverse infrastructure (cloud + HPC + K8s) from one codebase
  • ✓ Your organization is cloud-native or multi-platform
  • ✓ Simpler executor configuration is preferred (just change -profile)
  • ✓ Maximum portability and reproducibility across environments
  • ✓ Building for broad adoption (most researchers use Nextflow)

2. Setting up your environment

2.1 Install miniWDL

miniWDL is a lightweight WDL executor aimed at local development and testing:

Terminal window
# Using pip (Python 3.8+)
pip install miniwdl
# Verify installation
miniwdl --version
# Or using conda
conda install -c bioconda miniwdl

2.2 Install Sprocket

Sprocket is a modern WDL executor with a CLI-oriented interface:

Terminal window
# Install using curl
curl -L https://releases.sprocket.bio/sprocket/latest/sprocket-linux-x86_64 -o sprocket
chmod +x sprocket
mv sprocket /usr/local/bin/
# Or download from: https://sprocket.bio/
# Verify installation
sprocket --version

2.3 Install Docker or Apptainer

WDL workflows rely on containerized environments. Choose one:

Terminal window
# Docker (recommended for local development)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Or Apptainer (HPC environments)
sudo apt-get install apptainer

3. Your first WDL workflow

A 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
}
}

3.1 Key WDL concepts

  • version 1.0: WDL specification version (similar to Nextflow's manifest)
  • task: equivalent to a Nextflow process, defines an atomic computation
  • workflow: 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 types

4. Running your first workflow

4.1 Create an inputs JSON file

Create hello_inputs.json:

{
"hello_world.person_name": "WDL User"
}

Note the syntax: workflow_name.input_parameter.

4.2 Run with miniWDL

Terminal window
# Run the workflow
miniwdl run hello_world.wdl -i hello_inputs.json
# Check outputs in the generated directory
cd hello_world_*/
cat outputs.json

4.3 Run with Sprocket

Terminal window
# Run with Sprocket
sprocket run hello_world.wdl hello_inputs.json
# Sprocket provides a summary
sprocket run hello_world.wdl hello_inputs.json --watch

5. Building a real-world example: RNA-seq quantification

A 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.

5.1 Pipeline architecture

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 matrices

5.2 The main workflow

version 1.0
import "https://raw.githubusercontent.com/getwilds/wilds-wdl-library/refs/heads/main/modules/ww-sra/ww-sra.wdl" as sra_tasks
import "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
}
}

5.3 Comparing to Nextflow

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:

  • WDL's scatter is explicit and limited in scope; Nextflow's channels are more dynamic
  • WDL's if for conditionals is explicit; Nextflow uses when and branching
  • WDL's import pulls remote tasks directly; Nextflow uses include and local paths
  • WDL requires explicit input/output typing; Nextflow is more implicit

6. Inputs configuration

6.1 Create your inputs file

{
"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
}

6.2 Run the pipeline

Terminal window
# Using miniWDL
miniwdl run ww-sra-salmon.wdl -i inputs.json
# Using Sprocket
sprocket run ww-sra-salmon.wdl inputs.json
# Watch execution progress (Sprocket)
sprocket run ww-sra-salmon.wdl inputs.json --watch

7. Key WDL features

7.1 Scattering (parallelization)

WDL'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 Array
Array[File] results = process_sample.output_file

Compared to Nextflow:

sample_ch = Channel.fromList(sample_list)
sample_ch | process_sample

7.2 Conditionals

if (fastqdump.is_paired_end) {
call quantify_paired { ... }
}
# Select output safely
File result = select_first([quantify_paired.output, quantify_single.output])

7.3 Type system

WDL enforces strict typing:

# These won't compile
Int my_int = "string" # ERROR
File f = my_int # ERROR
# Correct
Int number = 42
File input_file = "/path/to/file.txt"
Array[File] files = ["/file1.txt", "/file2.txt"]

7.4 Task composition and imports

# Import tasks from GitHub
import "https://raw.githubusercontent.com/getwilds/wilds-wdl-library/refs/heads/main/modules/ww-salmon/ww-salmon.wdl" as salmon_tasks
# Use imported tasks with namespace
call salmon_tasks.build_index { ... }

8. Understanding WDL executors vs Nextflow

This section covers an architectural difference that is easy to overlook.

8.1 The executor abstraction

Nextflow: single CLI, many backends

With Nextflow, you switch between infrastructure backends using profiles—same code, different execution environment:

Terminal window
# Define once, run anywhere
nextflow run workflow.nf -profile slurm # Local HPC
nextflow run workflow.nf -profile aws # AWS Batch + S3
nextflow run workflow.nf -profile azure # Azure Batch
nextflow run workflow.nf -profile gcp # Google Cloud
nextflow run workflow.nf -profile k8s # Kubernetes

WDL: language plus separate executors

WDL separates concerns: write the workflow in WDL, then choose an executor that supports your infrastructure:

  • miniWDL: local development, research environments
  • Cromwell: enterprise deployments (supports HPC, AWS, Google Cloud, Azure)
  • Sprocket: modern alternative with cloud-oriented features
  • dxCompiler: integrated with the DNAnexus platform

Each executor requires its own configuration.

8.2 WDL executor comparison

8.2.1 miniWDL

Best for: local development, quick iteration, learning

Advantages:

  • Lightweight, easy to install (pip)
  • Detailed error messages and debugging
  • Fast feedback loop for development
  • No Docker daemon required (can use --empty-secondaries)
  • Pure Python implementation

Limitations:

  • Primarily single-machine execution
  • Not aimed at large-scale production workflows
  • Limited built-in HPC integration

Usage:

Terminal window
miniwdl run workflow.wdl -i inputs.json -d output_dir
miniwdl check workflow.wdl # Syntax validation

8.2.2 Cromwell

Best for: enterprise deployments, HPC clusters, large-scale genomics

Advantages:

  • Established standard for genomics workflows
  • Mature, production-tested (10+ years)
  • Supports multiple backends (AWS, Google Cloud, Azure, HPC)
  • Integration with the GATK ecosystem
  • Job caching and retry mechanisms
  • Used by the Terra platform (Broad Institute)

Limitations:

  • Heavier resource requirements (Java-based)
  • Complex configuration files
  • Steeper learning curve than miniWDL
  • Slower startup time

Usage:

Terminal window
java -jar cromwell.jar run workflow.wdl --inputs inputs.json

Backend 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
"""
}
}
}
}

8.2.3 Sprocket

Best for: modern cloud deployments, interactive development

Advantages:

  • Cloud-oriented architecture
  • CLI with progress tracking
  • Single-binary installation
  • Built-in caching and optimization
  • Integration with cloud platforms

Limitations:

  • Newer project (emerging ecosystem)
  • Fewer production deployments than Cromwell
  • Limited HPC backend support (emerging)

Usage:

Terminal window
sprocket run workflow.wdl inputs.json --watch
sprocket validate workflow.wdl # Type checking

8.3 Comparison: WDL executors vs Nextflow

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.

9. Best practices for WDL development

9.1 Modular task design

# Good: Reusable, single responsibility
task align_reads {
input {
File reads
File reference
Int threads
}
# ... implementation
}
# Bad: Too many responsibilities
task process_and_qc_and_align {
# ...
}

9.2 Use structs for complex inputs

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 }
}
}

9.3 Leverage type safety

# Compile-time validation catches errors early
File my_file = "/path/to/file.txt" # Clear intent
Int threads = 8 # Not a string

9.4 Use metadata

task 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 { ... }
}

10. When to choose each language: a practical guide

The decision between WDL and Nextflow often comes down to infrastructure, team, and community needs rather than language features alone.

Use WDL when:

  • ✓ Broad Institute ecosystem: working with Terra, FireCloud, or existing Cromwell infrastructure
  • ✓ Type safety matters: compile-time validation is important for your organization
  • ✓ Modularity focus: building reusable task libraries (like GATK pipelines)
  • ✓ Enterprise governance: strict validation and formal workflow management required
  • ✓ GATK integration: using GATK best practices workflows
  • ✓ Smaller scope: well-defined workflows with predictable execution patterns

Use Nextflow when:

  • ✓ Infrastructure flexibility: need to run the same workflow on HPC, AWS, Azure, GCP, K8s
  • ✓ Configuration simplicity: prefer a single -profile flag over executor-specific setup
  • ✓ Community-driven: want access to 10,000+ public workflows
  • ✓ Rapid prototyping: iterate quickly without strict type-checking overhead
  • ✓ Dynamic workflows: complex branching, conditional routing, or dynamic inputs
  • ✓ Broad adoption: aligning with the most widely used workflow engine
  • ✓ Multi-infrastructure: your organization runs on multiple platforms
  • ✓ Production maturity: need a proven, widely tested execution model

Quick decision tree

Does 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 factors

11. Resources and next steps

Explore further

Hands-on learning

  1. Clone the WILDS WDL Library and run example workflows
  2. Modify the inputs to test with your own data
  3. Build a simple task and combine it with existing modules
  4. Deploy to your infrastructure (HPC, cloud, local)

Summary

WDL and Nextflow represent two different approaches to workflow automation:

  • Nextflow is a language plus runtime executor that abstracts infrastructure through profiles. It has a large global community, with 10,000+ public workflows, mature multi-platform support (HPC, AWS, GCP, Azure, Kubernetes), and configuration switching through profiles.
  • WDL is a strongly typed language requiring separate executors (miniWDL, Cromwell, Sprocket). It fits the Broad Institute ecosystem (Terra, GATK pipelines), where compile-time validation and formal task composition matter. Cromwell provides enterprise-grade deployments; miniWDL supports rapid local development.

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:

  • Start with Nextflow if you want rapid adoption, community workflows, and minimal infrastructure configuration
  • Choose WDL if you are already in the Broad ecosystem (Terra, GATK) or need strict type validation
  • Learn both to understand when each approach fits

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.

References

Related articles

Browse all articles →