From charlesreid1

Revision as of 01:15, 23 February 2018 by Admin (talk | contribs) (Created page with "Snakemake patterns for Snakefiles and complex workflows. ==creating a master rule== If Snakemake is not provided with a rule to execute, it will execute the first rule in th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Snakemake patterns for Snakefiles and complex workflows.

creating a master rule

If Snakemake is not provided with a rule to execute, it will execute the first rule in the file.

To create a master rule that will call other rules defined in the Snakemake file, the make equivalent of "all" or "default", you should define it first (you can name it whatever you would like):

mynames   = ['A','B','C']
myinputs  = [j+".txt" for j in mynames]
myoutputs = [j+".dodat" for j in mynames]

rule default:
    input:
        myoutputs
    shell:
        'echo "i just run subrules!"'

flags