-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_snakefile
42 lines (33 loc) · 1.15 KB
/
example_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
import shutil
configfile:
"example_config.yaml"
print(config['data'])
if config['gzipped_reads'] == "True":
gz=".gz"
if config['gzipped_reads'] == "False":
gz=""
if config['paired_reads'] == "True":
SAMPLES, = glob_wildcards(config['data']+"/{id}_R1.fastq"+gz)
if config['paired_reads'] == "False":
SAMPLES, = glob_wildcards(config['data']+"/{id}.fastq"+gz)
#SAMPLES, = glob_wildcards(config['data']+"/{id}_R1.fastq"+gz)
print(SAMPLES)
RESULTS = config['results_loc']
print(RESULTS)
onstart:
print("The samples used in this analysis are:"),
print(SAMPLES),
print("Running the differential gene expression (DGE) pipeline")
rule all:
input:
expand(config['results_loc'] + "/results/fastq_trimmed/{sample}.html", sample=SAMPLES),
expand(config['results_loc'] + "/results/salmon/{sample}", sample=SAMPLES),
config['results_loc'] + "/results/deseq2/DEseq2_results.RData",
config['results_loc'] + "/results/deseq2/DEseq2_results_with_names.tsv"
include: "rules/preprocess.smk"
include: "rules/salmon.smk"
include: "rules/deseq2.smk"
include: "rules/addnames.smk"
onsuccess:
print("Differential Gene Expression analysis finished!")
shutil.rmtree(".snakemake")