Snakefile 961 Bytes
Newer Older
Kenzo-Hugo Hillion's avatar
Kenzo-Hugo Hillion committed
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
__strainphlan_exec_command = config.get('strainphlan', {}).get('exec_command', 'strainphlan')
__strainphlan_modules = config.get('strainphlan', {}).get('modules')
__strainphlan_options = config.get('strainphlan', {}).get('options', "")
__strainphlan_threads = config.get('strainphlan', {}).get('threads', 1)


rule strainphlan:
    input:
        __strainphlan_input
    output:
        __strainphlan_output
    params:
        exec_command = __strainphlan_exec_command,
        modules = __strainphlan_modules,
        clade = __strainphlan_clade,
        output_dir = __strainphlan_output_dir,
        options = __strainphlan_options
    threads:
        __strainphlan_threads
    run:
        command = []
        if params.modules:
            command.append("module load {params.modules}")
        command.append("{params.exec_command} -s {input} -n {threads} -c {params.clade} {params.options} -o {params.output_dir}")
        shell(" && ".join(command))