Skip to content

Commit 0c151ff

Browse files
committed
forces all jobs to wait on the reference check
1 parent 3771f3a commit 0c151ff

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

main.nf

+8-5
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ workflow CHECK_REFERENCE {
8787
take:
8888
reference
8989

90+
emit:
91+
checked_reference = reference
92+
9093
main:
9194
// checks the reference and its indexes, if the indexes are not there creates them
9295
reference_file = file(reference)
@@ -109,7 +112,7 @@ workflow {
109112

110113
CHECK_REFERENCE(params.reference)
111114

112-
PREPARE_BAM(input_files, params.reference)
115+
PREPARE_BAM(input_files, CHECK_REFERENCE.out.checked_reference)
113116

114117
if (!params.skip_deduplication) {
115118
MARK_DUPLICATES(PREPARE_BAM.out.prepared_bams)
@@ -121,29 +124,29 @@ workflow {
121124
}
122125

123126
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)
125128
deduplicated_bams = SPLIT_CIGAR_N_READS.out.split_cigarn_bams
126129
}
127130

128131
if (! params.skip_metrics) {
129132
if (params.intervals) {
130133
HS_METRICS(deduplicated_bams)
131134
}
132-
METRICS(deduplicated_bams, params.reference)
135+
METRICS(deduplicated_bams, CHECK_REFERENCE.out.checked_reference)
133136
COVERAGE_ANALYSIS(deduplicated_bams)
134137
FLAGSTAT(deduplicated_bams)
135138
}
136139

137140
if (!params.skip_realignment) {
138-
REALIGNMENT_AROUND_INDELS(deduplicated_bams, params.reference)
141+
REALIGNMENT_AROUND_INDELS(deduplicated_bams, CHECK_REFERENCE.out.checked_reference)
139142
realigned_bams = REALIGNMENT_AROUND_INDELS.out.realigned_bams
140143
}
141144
else {
142145
realigned_bams = deduplicated_bams
143146
}
144147

145148
if (!params.skip_bqsr) {
146-
BQSR(realigned_bams, params.reference)
149+
BQSR(realigned_bams, CHECK_REFERENCE.out.checked_reference)
147150
preprocessed_bams = BQSR.out.recalibrated_bams
148151
}
149152
else {

0 commit comments

Comments
 (0)