From e4184bc4755183d73f9e46217c53af3e6333c8e2 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Mon, 14 Oct 2024 14:51:58 +0200 Subject: [PATCH] Change default samplesheet to generate for to false, and update test --- conf/test.config | 2 +- nextflow.config | 2 +- .../local/utils_nfcore_createtaxdb_pipeline/main.nf | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conf/test.config b/conf/test.config index eb5e1ca..a0af849 100644 --- a/conf/test.config +++ b/conf/test.config @@ -47,7 +47,7 @@ params { generate_tar_archive = true generate_downstream_samplesheets = true generate_pipeline_samplesheets = "taxprofiler" - generate_samplesheet_dbtype = 'raw' + generate_samplesheet_dbtype = 'tar' } process { diff --git a/nextflow.config b/nextflow.config index 323f26d..39e0621 100644 --- a/nextflow.config +++ b/nextflow.config @@ -72,7 +72,7 @@ params { generate_tar_archive = false generate_downstream_samplesheets = false - generate_pipeline_samplesheets = 'taxprofiler' + generate_pipeline_samplesheets = false generate_samplesheet_dbtype = 'raw' } diff --git a/subworkflows/local/utils_nfcore_createtaxdb_pipeline/main.nf b/subworkflows/local/utils_nfcore_createtaxdb_pipeline/main.nf index 472185c..2d446c1 100644 --- a/subworkflows/local/utils_nfcore_createtaxdb_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_createtaxdb_pipeline/main.nf @@ -133,11 +133,15 @@ def validateInputParameters() { // Validate DIAMOND parameter combinations if (params.build_diamond && [!params.prot2taxid, !params.nodesdmp, !params.namesdmp].any()) { - error('[nf-core/createtaxdb] Supplied --build_diamond, but missing at least one of: --prot2taxid, --nodesdmp, or --namesdmp (all are mandatory for DIAMOND)') + error('[nf-core/createtaxdb] Supplied --build_diamond, but missing at least one of: --prot2taxid, --nodesdmp, or --namesdmp (all are mandatory for DIAMOND).') + } + + if (params.generate_downstream_samplesheets && !params.generate_pipeline_samplesheets) { + error('[nf-core/createtaxdb] If supplying `--generate_downsteam_samplesheets`, you must also specify which pipeline to generate for with `--generate_pipeline_samplesheets! Check input.') } if (params.generate_downstream_samplesheets && !params.generate_tar_archive && params.generate_samplesheet_dbtype == 'tar') { - error('[nf-core/createtaxdb] Supplied --generate_downstream_samplesheets with --generate_samplesheet_dbtype tar, but missing --generate_tar_archive (mandatory for tar archive output)') + error('[nf-core/createtaxdb] Supplied --generate_downstream_samplesheets with --generate_samplesheet_dbtype tar, but missing --generate_tar_archive (mandatory for tar archive output).') } }