snakemake-github-action
snakemake-github-action copied to clipboard
Save png of DAG using this action
I usually run this to make save DAGs
snakemake --dag --forceall --configfile config/example.yml | dot -Tpng > outdir/full-graph.png
So I tried this
- name: Save full DAG
uses: snakemake/[email protected]
with:
args: '--dag --forceall --configfile config/example.yml | dot -Tpng > outdir/full-graph.png'
but of course this was not escaped properly.
Is there a way to pipe the output DAG like I'm doing here? What is the GitHub Actions ™️ way of getting these graphs?
Idea for a potential workaround: write a rule in your snakemake to generate the DAG, then use GitHub Actions to run the rule.
Snakefile:
rule write_dag:
output:
png='outdir/full-graph.png'
shell:
'''
snakemake --dag --forceall --configfile config/example.yml | dot -Tpng > {output.png}
'''
In your GitHub Actions workflow:
- name: Save full DAG
uses: snakemake/[email protected]
with:
args: 'write_dag'