From 63a8d38c5d4cae656bb1ccaee08389bdba1aacbe Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 20 Jun 2025 14:34:04 -0700 Subject: [PATCH 1/7] bug fix --- nf_workflow.nf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nf_workflow.nf b/nf_workflow.nf index bb0bdeb..4aaf7be 100644 --- a/nf_workflow.nf +++ b/nf_workflow.nf @@ -5,12 +5,13 @@ nextflow.enable.dsl=2 params.input_spectra = "$baseDir/data/" //This publish dir is mostly useful when we want to import modules in other workflows, keep it here usually don't change it -params.publishdir = "$baseDir/nf_output" +params.publishdir = "$launchDir" TOOL_FOLDER = "$moduleDir/bin" MODULES_FOLDER = "$TOOL_FOLDER/NextflowModules" // A lot of useful modules are already implemented and added to the nextflow modules, you can import them to use -include {summaryLibrary} from "$MODULES_FOLDER/nf_library_search_modules.nf" addParams(publishDir: params.publishdir) +// the publishdir is a key word that we're using around all our modules to control where the output files will be saved +include {summaryLibrary} from "$MODULES_FOLDER/nf_library_search_modules.nf" addParams(publishdir: params.publishdir) process processDataPython { @@ -22,7 +23,7 @@ process processDataPython { The script block contains the command that will be run in the process. */ - publishDir "$params.publishdir", mode: 'copy' + publishDir "$params.publishdir/nf_output", mode: 'copy' conda "$TOOL_FOLDER/conda_env.yml" From e1661f5d4d6acc6206499e1b6b2606088931644d Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 20 Jun 2025 14:40:07 -0700 Subject: [PATCH 2/7] compatiblity --- nf_workflow.nf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nf_workflow.nf b/nf_workflow.nf index 4aaf7be..13f33d7 100644 --- a/nf_workflow.nf +++ b/nf_workflow.nf @@ -13,6 +13,12 @@ MODULES_FOLDER = "$TOOL_FOLDER/NextflowModules" // the publishdir is a key word that we're using around all our modules to control where the output files will be saved include {summaryLibrary} from "$MODULES_FOLDER/nf_library_search_modules.nf" addParams(publishdir: params.publishdir) +// COMPATIBILITY NOTE: The following might be necessary if this workflow is being deployed in a slightly different environemnt +// checking if outdir is defined, +// if so, then set publishdir to outdir +if (params.outdir) { + params.publishdir = params.outdir +} process processDataPython { /* This is a sample process that runs a python script. From 72d7d1db573e58b76be74f4b7a39960c6c18b633 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 20 Jun 2025 14:42:10 -0700 Subject: [PATCH 3/7] updating --- nf_workflow.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nf_workflow.nf b/nf_workflow.nf index 13f33d7..6f9c3eb 100644 --- a/nf_workflow.nf +++ b/nf_workflow.nf @@ -20,6 +20,9 @@ if (params.outdir) { params.publishdir = params.outdir } +// Augmenting with nf_output +params.publishdir = "${params.publishdir}/nf_output" + process processDataPython { /* This is a sample process that runs a python script. @@ -29,7 +32,7 @@ process processDataPython { The script block contains the command that will be run in the process. */ - publishDir "$params.publishdir/nf_output", mode: 'copy' + publishDir "$params.publishdir", mode: 'copy' conda "$TOOL_FOLDER/conda_env.yml" From bf297e2313ceefccd89ae3628df6760b7ea4a805 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 20 Jun 2025 15:07:21 -0700 Subject: [PATCH 4/7] updating --- nf_workflow.nf | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/nf_workflow.nf b/nf_workflow.nf index 6f9c3eb..c574f38 100644 --- a/nf_workflow.nf +++ b/nf_workflow.nf @@ -9,19 +9,27 @@ params.publishdir = "$launchDir" TOOL_FOLDER = "$moduleDir/bin" MODULES_FOLDER = "$TOOL_FOLDER/NextflowModules" -// A lot of useful modules are already implemented and added to the nextflow modules, you can import them to use -// the publishdir is a key word that we're using around all our modules to control where the output files will be saved -include {summaryLibrary} from "$MODULES_FOLDER/nf_library_search_modules.nf" addParams(publishdir: params.publishdir) // COMPATIBILITY NOTE: The following might be necessary if this workflow is being deployed in a slightly different environemnt // checking if outdir is defined, // if so, then set publishdir to outdir if (params.outdir) { - params.publishdir = params.outdir + _publishdir = params.outdir +} +else{ + _publishdir = params.publishdir } // Augmenting with nf_output -params.publishdir = "${params.publishdir}/nf_output" +_publishdir = "${_publishdir}/nf_output" + + + +// A lot of useful modules are already implemented and added to the nextflow modules, you can import them to use +// the publishdir is a key word that we're using around all our modules to control where the output files will be saved +include {summaryLibrary} from "$MODULES_FOLDER/nf_library_search_modules.nf" addParams(publishdir: _publishdir) + + process processDataPython { /* This is a sample process that runs a python script. @@ -32,7 +40,7 @@ process processDataPython { The script block contains the command that will be run in the process. */ - publishDir "$params.publishdir", mode: 'copy' + publishDir "$_publishdir", mode: 'copy' conda "$TOOL_FOLDER/conda_env.yml" From 665839278e2dfa979361c96482aeeb311808c81d Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 20 Jun 2025 15:08:25 -0700 Subject: [PATCH 5/7] updating --- nf_workflow.nf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nf_workflow.nf b/nf_workflow.nf index c574f38..2b4c307 100644 --- a/nf_workflow.nf +++ b/nf_workflow.nf @@ -23,14 +23,10 @@ else{ // Augmenting with nf_output _publishdir = "${_publishdir}/nf_output" - - // A lot of useful modules are already implemented and added to the nextflow modules, you can import them to use // the publishdir is a key word that we're using around all our modules to control where the output files will be saved include {summaryLibrary} from "$MODULES_FOLDER/nf_library_search_modules.nf" addParams(publishdir: _publishdir) - - process processDataPython { /* This is a sample process that runs a python script. From 6b48d47937179bead83be9152eb549bb0255c23c Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 20 Jun 2025 15:20:22 -0700 Subject: [PATCH 6/7] using new modules --- bin/NextflowModules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/NextflowModules b/bin/NextflowModules index 362cf52..2c2eb59 160000 --- a/bin/NextflowModules +++ b/bin/NextflowModules @@ -1 +1 @@ -Subproject commit 362cf522bfa230f6e19413a185b0b318f170110a +Subproject commit 2c2eb59938a056e35e29286f9aef063889ae045c From 15ed0a935a453e9dfa60dca4c4df0dc33fe190b1 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 20 Jun 2025 15:25:20 -0700 Subject: [PATCH 7/7] bump version --- workflowinput.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflowinput.yaml b/workflowinput.yaml index 2ad4d3b..12e7413 100644 --- a/workflowinput.yaml +++ b/workflowinput.yaml @@ -1,7 +1,7 @@ workflowname: template_nextflow_workflow workflowdescription: template_nextflow_workflow workflowlongdescription: This is a template nextflow workflow for GNPS2 -workflowversion: "0.1" +workflowversion: "2025.06.20" workflowfile: nf_workflow.nf workflowautohide: false adminonly: false