@@ -87,6 +87,9 @@ workflow CHECK_REFERENCE {
87
87
take :
88
88
reference
89
89
90
+ emit :
91
+ checked_reference = reference
92
+
90
93
main :
91
94
// checks the reference and its indexes, if the indexes are not there creates them
92
95
reference_file = file(reference)
@@ -109,7 +112,7 @@ workflow {
109
112
110
113
CHECK_REFERENCE (params. reference)
111
114
112
- PREPARE_BAM (input_files, params . reference )
115
+ PREPARE_BAM (input_files, CHECK_REFERENCE . out . checked_reference )
113
116
114
117
if (! params. skip_deduplication) {
115
118
MARK_DUPLICATES (PREPARE_BAM . out. prepared_bams)
@@ -121,29 +124,29 @@ workflow {
121
124
}
122
125
123
126
if (params. split_cigarn) {
124
- SPLIT_CIGAR_N_READS (deduplicated_bams, params . reference )
127
+ SPLIT_CIGAR_N_READS (deduplicated_bams, CHECK_REFERENCE . out . checked_reference )
125
128
deduplicated_bams = SPLIT_CIGAR_N_READS . out. split_cigarn_bams
126
129
}
127
130
128
131
if (! params. skip_metrics) {
129
132
if (params. intervals) {
130
133
HS_METRICS (deduplicated_bams)
131
134
}
132
- METRICS (deduplicated_bams, params . reference )
135
+ METRICS (deduplicated_bams, CHECK_REFERENCE . out . checked_reference )
133
136
COVERAGE_ANALYSIS (deduplicated_bams)
134
137
FLAGSTAT (deduplicated_bams)
135
138
}
136
139
137
140
if (! params. skip_realignment) {
138
- REALIGNMENT_AROUND_INDELS (deduplicated_bams, params . reference )
141
+ REALIGNMENT_AROUND_INDELS (deduplicated_bams, CHECK_REFERENCE . out . checked_reference )
139
142
realigned_bams = REALIGNMENT_AROUND_INDELS . out. realigned_bams
140
143
}
141
144
else {
142
145
realigned_bams = deduplicated_bams
143
146
}
144
147
145
148
if (! params. skip_bqsr) {
146
- BQSR (realigned_bams, params . reference )
149
+ BQSR (realigned_bams, CHECK_REFERENCE . out . checked_reference )
147
150
preprocessed_bams = BQSR . out. recalibrated_bams
148
151
}
149
152
else {
0 commit comments