arriba arriba __main__

arriba __main__

Version:
1.1.0
Identifier: TL_ab57db_54.7d
Tool
1__author__ = "Jan Forster"
2__copyright__ = "Copyright 2019, Jan Forster"
3__email__ = "j.forster@dkfz.de"
4__license__ = "MIT"
5
6
7import os
8from snakemake.shell import shell
9
10extra = snakemake.params.get("extra", "")
11log = snakemake.log_fmt_shell(stdout=True, stderr=True)
12
13discarded_fusions = snakemake.output.get("discarded", "")
14if discarded_fusions:
15    discarded_cmd = "-O " + discarded_fusions
16else:
17    discarded_cmd = ""
18
19blacklist = snakemake.params.get("blacklist")
20if blacklist:
21    blacklist_cmd = "-b " + blacklist
22else:
23    blacklist_cmd = ""
24
25known_fusions = snakemake.params.get("known_fusions")
26if known_fusions:
27    known_cmd = "-k" + known_fusions
28else:
29    known_cmd = ""
30
31sv_file = snakemake.params.get("sv_file")
32if sv_file:
33    sv_cmd = "-d" + sv_file
34else:
35    sv_cmd = ""
36
37shell(
38    "arriba "
39    "-x {snakemake.input.bam} "
40    "-a {snakemake.input.genome} "
41    "-g {snakemake.input.annotation} "
42    "{blacklist_cmd} "
43    "{known_cmd} "
44    "{sv_cmd} "
45    "-o {snakemake.output.fusions} "
46    "{discarded_cmd} "
47    "{extra} "
48    "{log}"
49)
50