Snakefile 953 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
__sample2markers_exec_command = config.get('sample2markers', {}).get('exec_command', 'sample2markers.py')
__sample2markers_modules = config.get('sample2markers', {}).get('modules')
__sample2markers_options = config.get('sample2markers', {}).get('options', "")
__sample2markers_threads = config.get('sample2markers', {}).get('threads', 1)


rule sample2markers:
    input:
        __sample2markers_input
    output:
        dir = __sample2markers_output_dir,
        file = __sample2markers_output
    params:
        exec_command = __sample2markers_exec_command,
        modules = __sample2markers_modules,
        options = __sample2markers_options
    threads:
        __sample2markers_threads
    run:
        command = []
        if params.modules:
            command.append("module load {params.modules}")
        command.append("{params.exec_command} -n {threads} {params.options} -i {input} -o {output.dir}")
        shell(" && ".join(command))