Skip to content

Commit ee51031

Browse files
committed
updated validation logic for user provided checkm2 database and relavent param names.
1 parent 73671be commit ee51031

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

nextflow.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ params {
1919
upload_force = true
2020
test_upload = true
2121
webincli_submit = true
22-
db_zenodo_id = '14897628'
23-
db_zenodo_path = null
22+
checkm2_db_zenodo_id = '14897628'
23+
checkm2_db_zenodo_path = null
2424

2525
// MultiQC options
2626
multiqc_config = null

nextflow_schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@
264264
}
265265
],
266266
"properties": {
267-
"db_zenodo_id": {
267+
"checkm2_db_zenodo_id": {
268268
"type": "string",
269269
"default": 14897628
270270
},
271-
"db_zenodo_path": {
271+
"checkm2_db_zenodo_path": {
272272
"type": "string"
273273
}
274274
}

workflows/genomesubmit.nf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,15 @@ workflow GENOMESUBMIT {
4040
complete: !checkM2_missing
4141
}
4242
// Run checkM2 database download if any completeness/contamination values are missing & no db path provided
43-
if (params.db_zenodo_path == null) {
44-
CHECKM2_DATABASEDOWNLOAD(params.db_zenodo_id)
43+
if (!params.checkm2_db_zenodo_path || !file(params.checkm2_db_zenodo_path).exists()) {
44+
CHECKM2_DATABASEDOWNLOAD(params.checkm2_db_zenodo_id)
4545
ch_check2_db = CHECKM2_DATABASEDOWNLOAD.out.database
4646
}
4747
else {
48-
// Create a tuple that matches the expected structure from CHECKM2_DATABASEDOWNLOAD
4948
ch_check2_db = Channel.of(
5049
[
5150
[id: "db_zenodo_meta"],
52-
file(params.db_zenodo_path),
51+
file(params.checkm2_db_zenodo_path),
5352
]
5453
)
5554
}

0 commit comments

Comments
 (0)