Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save png of DAG using this action #3

Open
colinbrislawn opened this issue Dec 13, 2019 · 1 comment
Open

Save png of DAG using this action #3

colinbrislawn opened this issue Dec 13, 2019 · 1 comment

Comments

@colinbrislawn
Copy link

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?

@kelly-sovacool
Copy link

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'

@colinbrislawn colinbrislawn changed the title Same png of DAG using this action Save png of DAG using this action Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants