Snakefile 673 Bytes
Newer Older
1
2
3
__graphlan_exec_command = config.get('graphlan', {}).get('exec_command', 'graphlan.py')
__graphlan_modules = config.get('graphlan', {}).get('modules')
__graphlan_options = config.get('graphlan', {}).get('options', "")
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
4
5
6
7
8
9
10
11

rule graphlan:
    input:
        __graphlan_input
    output:
        __graphlan_output
    params:
        exec_command = __graphlan_exec_command,
12
        modules = __graphlan_modules,
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
13
        options = __graphlan_options
14
15
16
17
18
19
    run:
        command = []
        if params.modules:
        	command.append("module load {params.modules}")
        command.append("{params.exec_command} {params.options} {input} {output}")
        shell(" && ".join(command))