File: Snakefile

package info (click to toggle)
snakemake 7.32.4-8.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 25,836 kB
  • sloc: python: 32,846; javascript: 1,287; makefile: 247; sh: 163; ansic: 57; lisp: 9
file content (54 lines) | stat: -rw-r--r-- 1,232 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

rule all: 
    input:
        "levelthree.txt",
        "independent.txt",
        expand("test{num}.final", num=[1, 2])

rule levelone:
    output: "levelone.txt"
    shell: "touch {output}"

rule leveltwo_first:
    input: rules.levelone.output
    output: "leveltwo_first.txt"   
    shell: "cp -f {input} {output}"

rule leveltwo_second:
    input: rules.levelone.output
    output: "leveltwo_second.txt"
    shell: "cp -f {input} {output}"

rule levelthree: # should not be created
    input: 
        rules.leveltwo_first.output, 
        rules.leveltwo_second.output
    output: "levelthree.txt"
    shell: "cat {input} > {output}"

rule independent: # should be created in --omit-from but not --until
    output: "independent.txt"
    shell: "touch {output}"

###### Wildcard Rules #######

rule zeroth_wildcard:
    output: "test{num}.txt"
    shell: "touch {output}"

rule first_wildcard:
    input: 'test{num}.txt'
    output: 'test{num}.first'
    shell: 'cp -f {input} {output}'

rule second_wildcard:
    input: 'test{num}.first'
    output: 'test{num}.second'
    shell: 'cp -f {input} {output}'

rule final_wildcard:
    input: 'test{num}.second'
    output: 'test{num}.final'
    shell: 'cp -f {input} {output}'