Snakefile 887 Bytes
Newer Older
1
2
3
__graphlan_annotate_exec_command = config.get('graphlan_annotate', {}).get('exec_command', 'graphlan_annotate.py')
__graphlan_annotate_modules = config.get('graphlan_annotate', {}).get('modules')
__graphlan_annotate_options = config.get('graphlan_annotate', {}).get('options', "")
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
4
5
6

rule graphlan_annotate:
    input:
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
7
8
        tree = __graphlan_annotate_input_tree,
        annot = __graphlan_annotate_input_annotation
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
9
10
11
12
    output:
        __graphlan_annotate_output
    params:
        exec_command = __graphlan_annotate_exec_command,
13
        modules = __graphlan_annotate_modules,
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
14
        options = __graphlan_annotate_options
15
16
17
18
19
20
    run:
        command = []
        if params.modules:
            command.append("module load {params.modules}")
        command.append("{params.exec_command} {params.options} --annot {input.annot} {input.tree} {output}")
        shell(" && ".join(command))