Skip to content

Instantly share code, notes, and snippets.

@samesense
Last active August 2, 2020 20:58
Show Gist options
  • Save samesense/b3fe3685b23064388aaad95d42191e9a to your computer and use it in GitHub Desktop.
Save samesense/b3fe3685b23064388aaad95d42191e9a to your computer and use it in GitHub Desktop.
Snakefile using dynamic rule
import rule_maker
one_out = 'out1'
rule one:
output:
one_out
shell:
'touch {output}'
# generate a snakefile file for the second rule
tmp_snake = 'tmp_snake.py'
out_two = 'two_out'
tmp_snake = rule_mkr.mk_rule(one_out, out_two, name=tmp_snake)
include: tmp_snake
rule three:
input:
out_two
output:
'out3'
shell:
'touch {output}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment