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 diff --git a/nf_workflow.nf b/nf_workflow.nf index bb0bdeb..2b4c307 100644 --- a/nf_workflow.nf +++ b/nf_workflow.nf @@ -5,13 +5,27 @@ 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) +// 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) { + _publishdir = params.outdir +} +else{ + _publishdir = params.publishdir +} + +// 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. @@ -22,7 +36,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" 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