-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSnakefile
54 lines (42 loc) · 2.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import os
from datetime import datetime
start_time = datetime.now().strftime("%a %b %-d %H:%M:%S %Y")
config: 'config.yml'
#-------------------------------------------------------------------------------#
#--------------------------- Generate output files -----------------------------#
#-------------------------------------------------------------------------------#
OUTPUTDIR = config['run_params']['output']
output_files = ["config.yml",
"2_discovery/2_processed_motif/done.txt",
"2_discovery/motif_stats.tsv",
"3_evaluation/motif_ranks.tsv",
"3_evaluation/ranks_barplot.pdf"]
# skip some evaluation steps if no motif database is provided
if config["footprint"]["motif_file"]:
output_files.extend(
["3_evaluation/motif_evaluation/new_vs_db_heatmap.pdf",
"3_evaluation/motif_evaluation/new_vs_db_lineplot.pdf",
"3_evaluation/motif_evaluation/new_vs_db_boxplot.pdf",
"3_evaluation/motif_evaluation/most_similar_motifs.json"]
)
if config['annotation']['gtf']:
# annotation files
output_files.append("4_annotation/feature_enrichment_plot.pdf")
output_files.append("4_annotation/feature_enrichment_table.tsv")
if config['go_enrichment']['email']:
# gene ontology files
output_files.append("5_gene_ontology/done.txt")
output_files = [os.path.join(OUTPUTDIR, f) for f in output_files]
#-------------------------------------------------------------------------------#
#---------------------------------- RUN :-) ------------------------------------#
#-------------------------------------------------------------------------------#
include: 'snakefiles/helpers.snake'
include: 'snakefiles/footprint.snake'
include: 'snakefiles/motif.snake'
include: 'snakefiles/evaluation.snake'
include: 'snakefiles/annotation.snake'
include: 'snakefiles/gene_ontology.snake'
rule all:
input:
output_files
message: f"Pipeline done. Started {start_time}"