Thanks for sharing Peter.
FWIW, there is already code in Galaxy to generate SVG from a workflow. See the
gen_image function in web/controllers/workflow.py I think this code is used
when workflows are included in the tool shed as well.
If your code is better in some way(s), please consider a pull request. It
should be fairly straightforward to add an option to a workflow's menu to
generate SVG for it.
On May 23, 2012, at 4:44 PM, Peter van Heusden wrote:
> Hi there
> Because my Galaxy workflows tend to sprawl outside the viewable space in
> my browser, I've written a script that, when given a workflow JSON file
> as input, writes out a graphviz dot format graph of the workflow. By
> default the graph treats datasets as nodes and analyses as edges (unlike
> the Galaxy workflow editor, but quite like the way the history is
> presented), but you can choose to have analyses as nodes (and thus
> datasets as edges) too.
> In case anyone else finds this useful, the code can be downloaded from
> my bitbucket:
> Usage is something like:
> ./workflow_to_dot.py Galaxy-Workflow.ga |dot -Tsvg >workflow.svg
> and then you can view your workflow.svg with eog or another viewer.
> Please keep all replies on the list by using "reply all"
> in your mail client. To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
Please keep all replies on the list by using "reply all"
in your mail client. To manage your subscriptions to this
and other Galaxy lists, please use the interface at: