biocore / oecophylla

shotgun pipeline
MIT License
11 stars 19 forks source link

Make DAGs for documentation #80

Open tanaes opened 7 years ago

tanaes commented 7 years ago

It would be nice to automatically generate DAG images.

Here's how I did it procedurally in the snakemake_assemble workflow: https://github.com/tanaes/snakemake_assemble/blob/master/make_dags.sh

for rule in all anvio assemble bin function taxonomy raw qc 
do
    bash launch.sh ./ ${rule} --dag | dot -Tsvg > dags/dag_${rule}.svg
    cairosvg dags/dag_${rule}.svg -o dags/dag_${rule}.pdf
done

The cairosvg was just to take it from svg to pdf so I could import it into Keynote presentations more easily. ^_^

Note that snakemake is going to illustrate each required step to reach a given target---so if you are starting from a clean test data set and give it these instructions, each downstream module will also illustrate the required steps to get its inputs from previous modules. Because we have a naming convention for rules that prepends with the module name this should be clear in the resulting outputs.

@antgonza