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

Conditional resource examples #17

Merged
merged 4 commits into from
Apr 6, 2023
Merged

Conditional resource examples #17

merged 4 commits into from
Apr 6, 2023

Conversation

TomHarrop
Copy link
Contributor

Based on #16

Copy link
Owner

@jdblischak jdblischak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are great. Thanks @TomHarrop!

@jdblischak jdblischak merged commit bbc8d1d into jdblischak:main Apr 6, 2023
jdblischak added a commit that referenced this pull request Apr 6, 2023
The command passed to `shell` must be a string because a Snakefile
is a Python script. I was thinking of YAML syntax
shell: echo "executed on aSpecificPartition"

rule withoutPartitionFlag:
shell: echo "executed on whichever partition Slurm chose"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I ran snakefmt on this file, I realized I made a mistake in the example code I provided you in #16 (comment). Since the Snakefile is a Python script, the entire command has to be quoted. I was thinking of YAML syntax, where it is implicitly assumed to be a string. I fixed this in 815fa68

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that - I was using it with a different Snakefile. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants