diff --git a/conf/modules.config b/conf/modules.config index ee9e37f..f0ad103 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -28,7 +28,7 @@ process { } withName: SAMTOOLS_COLLATE { - ext.prefix = { "${meta.id}.collate" } + ext.prefix = { "${meta.id}.collate" + (params.use_work_dir_as_temp ? " -T." : "") } } withName: SAMTOOLS_FIXMATE { diff --git a/nextflow.config b/nextflow.config index be5fabd..e19ff35 100644 --- a/nextflow.config +++ b/nextflow.config @@ -15,6 +15,9 @@ params { bwamem2_index = null fasta = null + // Execution options + use_work_dir_as_temp = false + // Boilerplate options outdir = "./results" diff --git a/nextflow_schema.json b/nextflow_schema.json index 5f44c81..737b3c2 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -67,6 +67,21 @@ } } }, + "execution": { + "title": "Execution", + "type": "object", + "description": "Control the execution of the pipeline.", + "default": "", + "properties": { + "use_work_dir_as_temp": { + "type": "boolean", + "description": "Set to true to make tools (e.g. sort, FastK, MerquryFK) use the work directory for their temporary files, rather than the system default.", + "fa_icon": "fas fa-arrow-circle-down", + "hidden": true + } + }, + "fa_icon": "fas fa-running" + }, "institutional_config_options": { "title": "Institutional config options", "type": "object", @@ -236,6 +251,9 @@ { "$ref": "#/definitions/reference_genome_options" }, + { + "$ref": "#/definitions/execution" + }, { "$ref": "#/definitions/institutional_config_options" },