Skip to main content

Pipeline Monitoring & Run Management

This page covers practical operational guidance for managing pipeline runs from launch through completion, including progress monitoring, checkpoint behaviour, partial-failure recovery, and resource tracking.

Standard Run Command

The canonical command for a full pipeline run with reproducible environments:

HPC / Slurm Cluster Execution

For large datasets or computationally intensive steps (M05 HyPhy, M04 IQ-TREE2), submit to a Slurm cluster using a Snakemake profile:
Per-rule resource overrides are needed for memory-intensive steps:

Monitoring Progress

Real-time Log Tailing

Monitor the main Snakemake log and any specific rule log simultaneously:

Checking DAG Progress

Expected Runtime by Module (Reference: 16-core workstation, 3,000 sequences, Flu A MP)

M05 HyPhy GARD is the single most compute-intensive step. For short segments (< 1,200 bp) with < 300 sequences, GARD may complete in 1–2 hours. For whole-genome targets or large datasets, always submit GARD to an HPC cluster.

Checkpoint Behaviour (M07 Bridge Builder)

M07 is declared as a Snakemake checkpoint rather than a regular rule. This is a critical architectural detail:
  • A checkpoint forces Snakemake to re-evaluate the DAG after it completes, because the number of output regions (and therefore the number of downstream M08/M09/M10 jobs) is not known until M07 finishes and writes the manifest.
  • After M07 completes, Snakemake reads results/{BUILD}/m07/primer_targets_manifest.yaml to discover the list of region_id values, then dynamically schedules the appropriate number of M08, M09, and M10 instances.
Practical implication: If M07 fails, all downstream M08–M10 jobs are blocked. Fix M07 before attempting to re-run:

Partial Failure Recovery

Resuming After Interruption

Snakemake automatically tracks which output files exist. Simply re-run the same command with --rerun-incomplete:
If the pipeline was killed mid-rule (e.g., by a cluster timeout), the output file may be partially written. --rerun-incomplete detects these and marks them for re-execution.

Unlocking a Locked Working Directory

If Snakemake was killed without a clean shutdown, it may leave a .snakemake/locks/ directory that prevents new runs:

Forcing a Specific Module to Re-run


Dry-Run Validation

Always run a dry-run before any full pipeline execution to validate the DAG without executing anything:
Check the output for:
  1. Expected number of jobs (verify it matches your target)
  2. Any MissingInputException errors (missing config files or input data)
  3. Any AmbiguousRuleException errors (rule ordering conflicts)
  4. Resource estimates in the --dryrun summary

Disk Space Management

Estimating Storage Requirements

Cleaning Intermediate Files

After a successful run, large intermediate files can be safely removed:
Do not delete results/{BUILD}/m07/primer_targets_manifest.yaml after M07 completes. This file is read at pipeline startup by M10’s DAG evaluation function. Deleting it requires a full M07 re-run to regenerate.