snakemake / snakeface

The snakemake interface, currently works like a notebook (under development)
https://snakeface.readthedocs.io/
Mozilla Public License 2.0
18 stars 6 forks source link

Create dag on workflow run #7

Closed vsoch closed 3 years ago

vsoch commented 3 years ago

We should be able to create (and store) a dag when a user runs a workflow. Part of the validation before submit is confirming that the snakefile still exists, so we just need to figure out how to generate this file in some temporary location, read it in, and save to the workflow model.

snakemake --dag | dot -Tsvg > dag.svg
vsoch commented 3 years ago

All set! I did this by just generating the dag (piping to output stream) and then saving to a temporary dot file. The dot file can then be given to the dot command, and we again capture the output (the svg) into a database field. Then we can easily render it in the interface.

image

The dag will be updated any time the workflow is saved. I might want to explicitly call these functions after the user saves in the view, as there might be times when we save and we don't want to update the command or dag.