-
Notifications
You must be signed in to change notification settings - Fork 1
/
Snakefile_paper
executable file
·41 lines (33 loc) · 1.53 KB
/
Snakefile_paper
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
38
39
40
41
configfile: "config_temp.yaml"
import os
# Network Parameters
NETWORK=config["parameters"]["network_file"]
OUTPATH=config["parameters"]["outpath"]
GENESET=config["parameters"]["tcga_dataset"]
GENESETB = config["association"]["geneset_B"]
TOPOLOGY = config["topology"]["analyse"]
ASSOCIATION = config["association"]["analyse"]
COMPARISON = config["within_comparison"]["analyse"]
EXTENSIONS=config['figures']['extension']
OUTFIGURES=OUTPATH + config['figures']['outpath']
if not os.path.exists(config["parameters"]["diagnostic_folder"]):
os.mkdir(config["parameters"]["diagnostic_folder"])
# If the matrices for the full analysis are not specified, they are generated by the rule
if len(config["parameters"]["sp_matrix"])>0:
SP_MATRIX=config["parameters"]["sp_matrix"]
else:
SP_MATRIX=OUTPATH+"_sp_matrix.hdf5"
if len(config["parameters"]["rwr_matrix"])>0:
RWR_MATRIX=config["parameters"]["rwr_matrix"]
else:
RWR_MATRIX=OUTPATH+"_rwr_matrix.hdf5"
include: "rules/paper_analysis.smk"
rule all:
input:
expand(OUTPATH+"{n}/{n}.csv", n=GENESET),
expand(OUTPATH+"table_topology_{t}.csv", t=TOPOLOGY),
expand(OUTPATH+"{n}/table_association_{t}.csv", t=ASSOCIATION, n=GENESET),
expand(OUTPATH+"table_within_comparison_{t}.csv", t=COMPARISON),
expand(OUTFIGURES+"{n}_volcano_association_{t}.{e}", t=ASSOCIATION, e=EXTENSIONS, n=GENESET),
expand(OUTFIGURES+"barplot_{t}.{e}", t=TOPOLOGY, e=EXTENSIONS),
expand(OUTFIGURES+"heatmap_within_comparison_{t}.{e}", t=COMPARISON, e=EXTENSIONS,),