forked from Mills33/Basecall2Assembly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnakefile
executable file
·128 lines (115 loc) · 3.03 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
sconfigfile: 'config.yaml'
localrules: Basecall2Assembly
rule Basecall2Assembly:
input:
assembly = "Verkko/assembly.fasta",
pod5 = "POD5/POD5.complete",
QC = "Results/HerroVsOG.png"
output:
finish = "Basecall2Assembly.complete"
shell:
"touch Basecall2Assembly.complete"
rule convert_fast5_pod5:
input:
signal = config['Raw_ONT'],
params:
pr = config['Name']
output:
"POD5/POD5.complete"
script:
"scripts/convert_to_pod5.sh"
rule basecall:
input:
pod5 = "POD5/POD5.complete", ## For some reason couldnt get it to take just directory
model = config['Model_basecall']
params:
pr = config['Name'],
wd = config['WD']
resources:
gpu = 1
output:
fastq = "Basecalled/Basecalled.fastq"
script:
"scripts/basecall.sh"
rule filtering:
input:
fastq = "Basecalled/Basecalled.fastq"
output:
fastq_filtered = "Filtered/filtered.fastq"
script:
"scripts/filter_fastq.sh"
rule error_correction:
input:
fastq_filtered = "Filtered/filtered.fastq",
model = config['Model_herro']
params:
pr = config['Name']
output:
herro_fasta = "Herro/Error_corrrected.fasta"
script:
"scripts/herro.sh"
rule map_OG_fastq_reference:
input:
fastq = "Filtered/filtered.fastq",
ref = config['Ref'],
wd = config['WD']
params:
datatype = "OG_filtered"
output:
"Results/OG_filtered_mappings.complete"
script:
"scripts/map_to_reference.sh"
rule map_Herro_corrected_reference:
input:
fasta = "Herro/Error_corrrected.fasta",
ref = config['Ref'],
wd = config['WD']
params:
datatype = "Herro_corrected"
output:
"Results/Herro_corrected_mappings.complete"
script:
"scripts/map_to_reference.sh"
rule bam_concordance_herro:
input:
ref = config['Ref'],
bam = "Results/Herro_corrected_mappings.complete"
params:
datatype = "Herro_corrected",
wd = config['WD']
output:
"Results/Herro_corrected.csv"
script:
"scripts/run_bam_concordance.sh"
rule bam_concordance_OG:
input:
ref = config['Ref'],
bam = "Results/OG_filtered_mappings.complete"
params:
datatype = "OG_filtered",
wd = config['WD']
output:
"Results/OG_filtered.csv"
script:
"scripts/run_bam_concordance.sh"
rule plot_results_error_correction:
input:
"Results/Herro_corrected.csv",
"Results/OG_filtered.csv"
params:
pr = config['Name']
output:
"Results/HerroVsOG.png",
"Results/Error_correction_summary.csv"
script:
"scripts/compare_error_correction.sh"
rule verkko_assembly:
input:
ont = "Filtered/filtered.fastq",
herro = "Herro/Error_corrrected.fasta"
params:
wd = config['WD']
output:
"Verkko/assembly.fasta"
script:
"scripts/verkko.sh"