From 375e45ef2fb49e75a78c1c177e59dfc1c5cd0b7a Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 15 Sep 2023 14:10:40 +0200 Subject: [PATCH 1/2] fix bin_size --- conf/modules.config | 3 ++- conf/test.config | 2 +- nextflow.config | 2 +- nextflow_schema.json | 2 +- tests/main.nf.test | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 238e210..9325b91 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -17,7 +17,8 @@ process { ] withName: WISECONDORX_NEWREF { - ext.prefix = {"${meta.id}.${meta.bin_size}kbp"} + ext.prefix = {"${meta.id}_${meta.bin_size as Integer > 1000 ? meta.bin_size as Integer/1000 : meta.bin_size}${meta.bin_size as Integer > 1000 ? "k" : ""}bp"} + ext.args = { "--binsize ${meta.bin_size}" } publishDir = [ enabled: true, path: { "${params.outdir}" }, diff --git a/conf/test.config b/conf/test.config index 295741a..2adb674 100644 --- a/conf/test.config +++ b/conf/test.config @@ -21,7 +21,7 @@ params { genomes_ignore = true - bin_sizes = "10,5" + bin_sizes = "10000,5" fasta = params.test_data["homo_sapiens"]["genome"]["genome_fasta"] fai = null //params.test_data["homo_sapiens"]["genome"]["genome_fasta_fai"] diff --git a/nextflow.config b/nextflow.config index 18e5bce..4d25b17 100644 --- a/nextflow.config +++ b/nextflow.config @@ -15,7 +15,7 @@ params { // Other options no_metrics = false - bin_sizes = "1000,500,50,30,15,10,5,1" + bin_sizes = "1000000,500000,50000,30000,15000,10000,5000,1000" // References genome = "GRCh38" diff --git a/nextflow_schema.json b/nextflow_schema.json index 2fa2094..f61d761 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -60,7 +60,7 @@ "bin_sizes": { "type": "string", "description": "A comma-delimited list of bin sizes to use for the analysis", - "default": "1000,500,50,30,15,10,5,1" + "default": "1000000,500000,50000,30000,15000,10000,5000,1000" } } }, diff --git a/tests/main.nf.test b/tests/main.nf.test index 694db1a..7a83b6f 100644 --- a/tests/main.nf.test +++ b/tests/main.nf.test @@ -9,14 +9,14 @@ nextflow_pipeline { when { params { prefix = "test_reference" - bin_sizes = "10,5" + bin_sizes = "10000,5" } } then { assert workflow.success assert file("${outputDir}/test_reference.10kbp.npz").exists() - assert file("${outputDir}/test_reference.5kbp.npz").exists() + assert file("${outputDir}/test_reference.5bp.npz").exists() assert file("${outputDir}/metrics.txt").exists() assert file("${outputDir}/multiqc_reports/multiqc_report.html").exists() } From 344d965e2f27e7a71012fef3ecaacf5f2b2712f7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 15 Sep 2023 14:42:28 +0200 Subject: [PATCH 2/2] fix tests --- tests/main.nf.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/main.nf.test b/tests/main.nf.test index 7a83b6f..02eba75 100644 --- a/tests/main.nf.test +++ b/tests/main.nf.test @@ -15,8 +15,8 @@ nextflow_pipeline { then { assert workflow.success - assert file("${outputDir}/test_reference.10kbp.npz").exists() - assert file("${outputDir}/test_reference.5bp.npz").exists() + assert file("${outputDir}/test_reference_10kbp.npz").exists() + assert file("${outputDir}/test_reference_5bp.npz").exists() assert file("${outputDir}/metrics.txt").exists() assert file("${outputDir}/multiqc_reports/multiqc_report.html").exists() }