-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
83 lines (52 loc) · 1.65 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python
import os
import sys
import re
import glob
configfile: "config.yaml"
###
extension = config["extension"]
FILES = [ os.path.basename(x) for x in glob.glob("Experience/*") ]
if config["design"]["paired"]:
SAMPLES = list(set([ "_".join(x.split("_")[:2]) for x in FILES]))
else:
SAMPLES = list(set([ x.rstrip(extension) for x in FILES]))
DIR_COMPARAISON = "DAS/"+config["design"]["condition_1"]+"_VS_"+config["design"]["condition_2"]
###
def get_input(wildcards):
input_list = ["Reference/reference.fasta"]
for fq in expand("Trimming/{sample}_R1.trim.fastq.gz", sample=SAMPLES):
input_list.append(fq)
if config["DEG"]["exec"]:
input_list.append("DEG/tair_ids.txt")
if config["DTU"]["exec"]:
input_list.append("DTU/DTU.txt")
if config["DASG"]["exec"]:
for fq_AS in expand("Trimming_AS/{sample}_R1.trim.fastq.gz", sample=SAMPLES):
input_list.append(fq_AS)
input_list.append("DAS/DAS.txt")
if config["CSE"]["exec"]:
input_list.append("CSE_results/CSE_DEG_UP.txt")
return input_list
include: "rules/get_packages.smk"
include: "rules/get_ref_files.smk"
if config["trimming"]["exec"]:
include: "rules/trimming.smk"
if config["DEG"]["exec"]:
include: "rules/classic_mapping.smk"
include: "rules/counts.smk"
include: "rules/run_DESeq2.smk"
if config["DASG"]["exec"]:
include: "rules/trimming_AS.smk"
include: "rules/1st_pass.smk"
include: "rules/2sd_pass.smk"
include: "rules/run_rMATS.smk"
include: "rules/sign_DAS.smk"
if config["DTU"]["exec"]:
include: "rules/salmon_pseudomapping.smk"
include: "rules/run_RATs.smk"
if config["CSE"]["exec"]:
include: "rules/init_CSE.smk"
rule all:
input:
get_input