Skip to content

Commit 2d915fb

Browse files
committed
add deprecation warning on --input_folder
1 parent 5fce884 commit 2d915fb

3 files changed

Lines changed: 36 additions & 8 deletions

File tree

FastOMA.nf

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,32 @@ def detectInputType(input) {
365365
}
366366
}
367367

368+
// handle deprecated parameters
369+
def handleDeprecatedParameters() {
370+
if (params.input_folder && !params.input) {
371+
log.warn ""
372+
log.warn "╔══════════════════════════════════════════════════════════════╗"
373+
log.warn "║ DEPRECATION WARNING ║"
374+
log.warn "║ ║"
375+
log.warn "║ --input_folder is deprecated and has been removed. ║"
376+
log.warn "║ Please use --input instead of --input_folder ║"
377+
log.warn "║ ║"
378+
log.warn "╚══════════════════════════════════════════════════════════════╝"
379+
log.warn ""
380+
exit 1
381+
382+
} else if (params.input_folder && params.input) {
383+
log.error ""
384+
log.error "ERROR: Both --input_folder (deprecated) and --input specified."
385+
log.error "Please use only --input parameter."
386+
log.error ""
387+
exit 1
388+
}
389+
}
390+
368391
workflow {
392+
handleDeprecatedParameters()
393+
369394
// Print help message if requested
370395
if (params.help) {
371396
log.info paramsHelp("nextflow run FastOMA.nf")
@@ -380,9 +405,7 @@ workflow {
380405

381406
// Detect input type
382407
def inputType = detectInputType(params.input)
383-
log.info "Detected input type '${inputType}' for: ${params.input}"
384408
if (inputType == "directory") {
385-
log.info "Using local input folder: ${params.input}"
386409
// Local/custom dataset - allow parameter overrides
387410
proteome_folder = Channel.value(params.proteome_folder)
388411
proteomes = Channel.fromPath("${params.proteome_folder}/*.{fa,fasta}", checkIfExists: true)
@@ -393,11 +416,8 @@ workflow {
393416
// Input is either a URL or an archive file - fetch and extract
394417
// Fetch test dataset from remote URL
395418
if (inputType == "url") {
396-
log.info "Fetching test dataset from URL: ${params.input}"
397419
input_path = fetchRemoteData(Channel.value(params.input))
398420
} else if (inputType == "archive") {
399-
log.info "Extracting test dataset from local archive: ${params.input}"
400-
401421
input_path = extractLocalArchive(Channel.fromPath(params.input))
402422
}
403423

nextflow.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ params {
3838
species_tree = "${params.input}/species_tree.nwk"
3939
// cache path for (remote) archive input files
4040
test_data_cache = null
41+
// Keep deprecated parameter for backward compatibility
42+
input_folder = null
4143

4244
// main output folder
4345
output_folder = "Output"

nextflow_schema.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"fa_icon": "fas fa-folder-open",
1919
"examples": [
2020
"/path/to/dataset/",
21-
"/path/to/dataset.tar.gz",
21+
"/path/to/dataset.tar.gz",
2222
"https://zenodo.org/records/12345/files/dataset.tar.gz"
2323
]
2424
},
@@ -63,8 +63,14 @@
6363
"type": "string",
6464
"format": "directory-path",
6565
"description": "Path where (remote) input archives will be stored and permanently cached",
66-
"fa_ison": "fas fa-folder-open",
67-
"default": "./.test-datasets"
66+
"fa_ison": "fas fa-folder-open"
67+
},
68+
"input_folder": {
69+
"type": "string",
70+
"hidden": true,
71+
"format": "directory-path",
72+
"description": "DEPRECATED: Use --input instead",
73+
"help_text": "This parameter has been renamed to --input. Please update your command line or configuration files."
6874
}
6975
}
7076
},

0 commit comments

Comments
 (0)