Skip to content

Commit 60e9f80

Browse files
committed
simplify check tools logic
1 parent 9bfcd68 commit 60e9f80

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

workflows/sarek.nf

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,9 @@ if(!params.dbsnp && !params.known_indels){
108108
}
109109
}
110110

111-
// Fails when missing tools for variant calling
112-
if (params.step == 'variant_calling' && !params.tools) {
113-
log.error "Please specify at least one tool when using `--step variant_calling`.\nhttps://nf-co.re/sarek/parameters#tools"
114-
exit 1
115-
}
116-
117-
// Fails when missing tools for annotate
118-
if (params.step == 'annotate' && !params.tools) {
119-
log.error "Please specify at least one tool when using `--step annotate`.\nhttps://nf-co.re/sarek/parameters#tools"
111+
// Fails when missing tools for variant_calling or annotate
112+
if ((params.step == 'variant_calling' || params.step == 'annotate') && !params.tools) {
113+
log.error "Please specify at least one tool when using `--step ${params.step}`.\nhttps://nf-co.re/sarek/parameters#tools"
120114
exit 1
121115
}
122116

@@ -130,7 +124,6 @@ if (params.tools && (params.tools.contains('ascat') || params.tools.contains('co
130124
}
131125
}
132126

133-
134127
// Save AWS IGenomes file containing annotation version
135128
def anno_readme = params.genomes[params.genome]?.readme
136129
if (anno_readme && file(anno_readme).exists()) {

0 commit comments

Comments
 (0)