Tutorial: Snakemake → DAGMan¶
In this tutorial we’ll convert a simple Snakemake workflow to HTCondor DAGMan, build its environments and validate the result.
Prerequisites¶
Docker daemon running (for image builds)
HTCondor client tools (optional – for submitting)
1. Clone the example workflow¶
git clone https://github.com/csmcal/wf2wf-examples.git
cd wf2wf-examples/snake/basic
2. Inspect the workflow¶
snakemake --dag --snakefile linear.smk | dot -Tpng > dag.png && open dag.png
3. Dry-run wf2wf¶
wf2wf info linear.smk
4. Convert with auto-env¶
wf2wf convert -i linear.smk -o linear.dag \
--out-format dagman \
--auto-env build \
--push-registry ghcr.io/$USER/wf2wf-demo \
--report-md
Outputs:
linear.dag
– DAGMan workflowlinear.dag.md
– conversion report*.sub
files – HTCondor submit descriptionsImages pushed with digest-tags
5. Validate¶
wf2wf validate linear.dag
wf2wf validate linear.dag.loss.json
6. Submit (optional)¶
condor_submit_dag -f linear.dag
That’s it! You can re-import the DAG back to Snakemake later.