Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions nf_workflow.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion workflowinput.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading