-
Notifications
You must be signed in to change notification settings - Fork 274
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
Add an option to create a filegraph in the dag rule #1574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice utility! But avoid definition of dag_type
outside rule definition.
It seems the current approach mixes two approaches (wildcards and parameters). With the current setup you could actually use
snakemake --{dag_type} all | sed -n "/digraph/,\$p" > {output.dot}
to run snakemake dag_filegraph.pdf
or snakemake dag_rulegraph.pdf
and forget about the params
or config setting.
I would also be fine to just create both rulegraph and filegraph on run snakemake dag
.
Snakefile
Outdated
dag_type = config.get("dag_type", "rulegraph") | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dag_type = config.get("dag_type", "rulegraph") |
Snakefile
Outdated
conda: | ||
"envs/environment.yaml" | ||
params: | ||
dag_type=dag_type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dag_type=dag_type, | |
dag_type=config.get("dag_type", "rulegraph"), |
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
Thanks @fneum for the review. Using only wildcards implies that we cannot have a default behaviour. That's why I suggest using # Not possible
snakemake dag
# Possible
snakemake resources/dag_rulegraph.pdf
snakemake resources/dag_filegraph.pdf Also, as the Would there be an implementation with wildcards and a default value? |
Another option would be two separate rules:
|
Closes # (if applicable).
Changes proposed in this Pull Request
Checklist
envs/environment.yaml
.config/config.default.yaml
.doc/configtables/*.csv
.doc/data_sources.rst
.doc/release_notes.rst
is added.