File: Snakefile

package info (click to toggle)
snakemake 7.32.4-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,836 kB
  • sloc: python: 32,846; javascript: 1,287; makefile: 247; sh: 163; ansic: 57; lisp: 9
file content (32 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (3)
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
"""
Issue 413:
 When an output file was a link to a previous output,
 AND the output link already exists, there would be a 
 false ChildIOException thrown.

 So test.txt and test.link already exist and we have a third
 output to trigger a build
 """

rule all:
    input:
        "test_dir/other_file"

rule make_test_dir_and_test_file:
    output:
        directory("test_dir/subdir"),
    shell:
        """
        mkdir -p {output[0]}/
        echo "test" > {output[0]}/test_file
        """
        
rule make_other_file:
    input:
        "test_dir/subdir"
    output:
        "test_dir/other_file"
    shell:
        """
        ln -s subdir/test_file {output[0]}
        """