oxo-flow run#
Execute a workflow.
Usage#
Arguments#
| Argument | Description |
|---|---|
[WORKFLOW] |
Path to the .oxoflow workflow file. Optional — if not specified, auto-discovery searches for: (1) main.oxoflow in current directory, (2) alphabetically first *.oxoflow file in current directory. |
Options#
| Option | Short | Default | Description |
|---|---|---|---|
--jobs |
-j |
1 |
Maximum number of concurrent jobs |
--keep-going |
-k |
— | Continue execution when a job fails |
--workdir |
-d |
Current directory | Working directory for execution |
--target |
-t |
All rules | Run only specific target rules |
--retry |
-r |
0 |
Number of times to retry failed jobs |
--timeout |
— | 0 (disabled) |
Timeout per job in seconds |
--max-threads |
— | 0 (auto-detect) |
Maximum CPU threads available for execution |
--max-memory |
— | 0 (auto-detect) |
Maximum memory in MB available for execution |
--skip-env-setup |
— | — | Skip environment setup (assume environments are ready) |
--cache-dir |
— | — | Directory for caching environment setup state |
--resume-failed |
— | — | Resume only failed rules from a previous run |
--profile |
— | local |
Execution profile: local, slurm, pbs, sge, or lsf |
--provenance |
— | — | Track output file checksums for later verification |
--verbose |
-v |
— | Enable debug-level logging |
Examples#
Run with auto-discovery (when only one .oxoflow file exists)#
Run with main.oxoflow (priority discovery)#
Run with explicit workflow#
Parallel execution#
Keep going on failure#
Retry failed jobs#
Run specific targets#
Set a per-job timeout#
Limit resource usage#
# Use only 16 threads and 32GB memory
oxo-flow run pipeline.oxoflow --max-threads 16 --max-memory 32768
Cache environment setup#
# Cache environment setup state for faster subsequent runs
oxo-flow run pipeline.oxoflow --cache-dir .oxo-flow/cache
Skip environment setup (when environments are pre-built)#
Checkpointing and Resuming#
oxo-flow automatically persists execution state to a checkpoint file after every rule completion. This enables:
- Resuming failed runs: If a job fails or is interrupted, simply run
oxo-flow runagain. The engine will skip all rules already marked ascompletedand resume from the first pending task. - State Inspection: Use the
oxo-flow statuscommand to view the progress of a run from its checkpoint file.
Metadata Directory#
By default, checkpoints are saved in a hidden .oxo-flow/ directory located in the same folder as the workflow file.
- Filename:
checkpoint_<workflow_name>.json
Forcing Execution#
To bypass checkpoints and re-execute rules that have already completed, use the oxo-flow clean command to remove outputs and the checkpoint file before running.
Output#
oxo-flow 0.6.1 — Bioinformatics Pipeline Engine
DAG: 5 rules in execution order
1. fastqc
2. trim_reads
3. bwa_align
4. sort_bam
5. call_variants
⠋ [00:15] [████████████░░░░░░░░] 3/5 (Done: 3, Fail: 0, Skip: 0)
✓ fastqc
✓ trim_reads
✓ bwa_align
✓ sort_bam
✓ call_variants
Done: 5 succeeded, 0 failed
A progress bar shows execution progress with:
- Elapsed time
- Current position / total rules
- Success/Fail/Skip counts
Notes#
- The workflow file is optional; if not specified, auto-discovery searches for
main.oxoflowfirst, then any*.oxoflowfile alphabetically - If no
.oxoflowfile is found, an error message suggests runningoxo-flow initto create one - The DAG is built and validated before any rules execute
- Rules are executed in topological order; independent rules may run in parallel up to the
-jlimit - If
--keep-goingis not set, execution stops at the first failure - The
--retryflag re-runs failed jobs up to N times before marking them as failed - A timeout of
0means no timeout - Resource constraints (
threads,memory) in rules are checked against available resources before execution - Setting
--max-threads 0or--max-memory 0auto-detects system resources - Environment setup is performed automatically before first use of each environment (conda, pixi, docker, singularity, venv)
- Use
--skip-env-setupwhen environments are pre-built to avoid redundant setup - Use
--cache-dirto persist environment setup state across runs for faster startup