-
Notifications
You must be signed in to change notification settings - Fork 1
/
Snakefile
38 lines (28 loc) · 1.01 KB
/
Snakefile
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
26
27
28
29
30
31
32
33
34
35
36
37
### SNAKEFILE ABERRANT SPLICING
import os
import drop
METHOD = 'AS'
SCRIPT_ROOT = os.getcwd()
CONF_FILE = drop.getConfFile()
parser = drop.config(config, METHOD)
config = parser.parse()
include: config['wBuildPath'] + "/wBuild.snakefile"
rule all:
input: rules.Index.output, config["htmlOutputPath"] + "/aberrant_splicing_readme.html"
output: touch(drop.getMethodPath(METHOD, type_='final_file'))
rulegraph_filename = f'{config["htmlOutputPath"]}/{METHOD}_rulegraph'
rule produce_rulegraph:
input:
expand(rulegraph_filename + ".{fmt}", fmt=["svg", "png"])
rule create_graph:
output:
svg = f"{rulegraph_filename}.svg",
png = f"{rulegraph_filename}.png"
shell:
"""
snakemake --configfile {CONF_FILE} --rulegraph | dot -Tsvg > {output.svg}
snakemake --configfile {CONF_FILE} --rulegraph | dot -Tpng > {output.png}
"""
rule unlock:
output: touch(drop.getMethodPath(METHOD, type_="unlock"))
shell: "snakemake --unlock --configfile {CONF_FILE}"