diff --git a/CHANGELOG.md b/CHANGELOG.md index 21f5e9d3..761f5bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +--- + +## [1.0.1] - 2024-05-29 ### [Changed] - Update Nextflow configuration test workflows +### [Fixed] +- Resolve interval path for original given intervals to ensure the index file for intervals is found when present --- diff --git a/module/base-recalibration.nf b/module/base-recalibration.nf index 7a092f86..53e0ed3a 100644 --- a/module/base-recalibration.nf +++ b/module/base-recalibration.nf @@ -65,7 +65,7 @@ process run_BaseRecalibrator_GATK { script: all_ir_bams = indelrealigned_bams.collect{ "--input '${it}'" }.join(' ') - targeted_options = params.is_targeted ? "--intervals ${intervals} --interval-padding 100" : "" + targeted_options = params.is_targeted ? "--intervals \"\$(realpath ${intervals})\" --interval-padding 100" : "" """ set -euo pipefail if [ ! -f ${sample_id}_recalibration_table.grp ] diff --git a/module/indel-realignment.nf b/module/indel-realignment.nf index bb271a91..a8b8ee6e 100644 --- a/module/indel-realignment.nf +++ b/module/indel-realignment.nf @@ -41,6 +41,7 @@ process run_RealignerTargetCreator_GATK { path(bundle_mills_and_1000g_gold_standards_vcf_gz_tbi) path(bundle_known_indels_vcf_gz) path(bundle_known_indels_vcf_gz_tbi) + path(original_intervals) tuple path(bam), path(bam_index), val(interval_id), path(interval) output: @@ -174,6 +175,7 @@ workflow realign_indels { "${params.bundle_mills_and_1000g_gold_standard_indels_vcf_gz}.tbi", params.bundle_known_indels_vcf_gz, "${params.bundle_known_indels_vcf_gz}.tbi", + "${params.getOrDefault('intervals', null) ?: params.work_dir + '/NO_FILE.bed'}", input_ch_rtc ) diff --git a/module/summary-qc.nf b/module/summary-qc.nf index 6be6659b..4c0ba108 100644 --- a/module/summary-qc.nf +++ b/module/summary-qc.nf @@ -42,7 +42,7 @@ process run_GetPileupSummaries_GATK { tuple val(sample_id), path("*getpileupsummaries.table"), emit: pileupsummaries script: - interval_options = all_intervals.collect{ "--intervals '$it'" }.join(' ') + interval_options = all_intervals.collect{ "--intervals \"\$(realpath ${it})\"" }.join(' ') output_filename = generate_standard_filename( "GATK-${params.gatk_version}", params.dataset_id, @@ -168,7 +168,7 @@ process run_DepthOfCoverage_GATK { params.is_DOC_run script: - interval_options = all_intervals.collect{ "--intervals '$it'" }.join(' ') + interval_options = all_intervals.collect{ "--intervals \"\$(realpath ${it})\"" }.join(' ') output_filename = generate_standard_filename( "GATK-${params.gatk_version}", params.dataset_id, diff --git a/nextflow.config b/nextflow.config index 233728e6..bbbc619e 100644 --- a/nextflow.config +++ b/nextflow.config @@ -3,5 +3,5 @@ manifest { name = 'recalibrate-BAM' author = 'Yash Patel, Nicholas Wiltsie' description = 'Nextflow pipeline to perform Indel Realignment and Base Quality Score Recalibration' - version = '1.0.0' + version = '1.0.1' } diff --git a/test/configtest-F16.json b/test/configtest-F16.json index 77b1c0a4..9fa55fdb 100644 --- a/test/configtest-F16.json +++ b/test/configtest-F16.json @@ -28,6 +28,14 @@ "timeline.file", "trace.file" ], + "version_fields": [ + "manifest.version", + "params.log_output_dir", + "params.output_dir_base", + "report.file", + "trace.file", + "timeline.file" + ], "expected_result": { "docker": { "all_group_ids": "$(for i in `id --real --groups`; do echo -n \"--group-add=$i \"; done)", @@ -39,7 +47,7 @@ "author": "Yash Patel, Nicholas Wiltsie", "description": "Nextflow pipeline to perform Indel Realignment and Base Quality Score Recalibration", "name": "recalibrate-BAM", - "version": "1.0.0" + "version": "VER.SI.ON" }, "params": { "aligner": "BWA-MEM2-2.2.1", @@ -74,7 +82,7 @@ "is_DOC_run": false, "is_emit_original_quals": true, "is_targeted": false, - "log_output_dir": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z", + "log_output_dir": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z", "max_cpus": "16", "max_memory": "31 GB", "metapipeline_delete_input_bams": false, @@ -85,7 +93,7 @@ "min_cpus": "1", "min_memory": "1 MB", "output_dir": "/tmp/outputs", - "output_dir_base": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/GATK-4.2.4.1", + "output_dir_base": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/GATK-4.2.4.1", "parallelize_by_chromosome": true, "patient_id": "TWGSAMIN000001", "picard_version": "2.26.10", @@ -414,15 +422,15 @@ }, "report": { "enabled": true, - "file": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z/nextflow-log/report.html" + "file": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z/nextflow-log/report.html" }, "timeline": { "enabled": true, - "file": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z/nextflow-log/timeline.html" + "file": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z/nextflow-log/timeline.html" }, "trace": { "enabled": true, - "file": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z/nextflow-log/trace.txt" + "file": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z/nextflow-log/trace.txt" }, "workDir": "/scratch/851543" } diff --git a/test/configtest-F32.json b/test/configtest-F32.json index 1fbe66b5..88415d85 100644 --- a/test/configtest-F32.json +++ b/test/configtest-F32.json @@ -28,6 +28,14 @@ "timeline.file", "trace.file" ], + "version_fields": [ + "manifest.version", + "params.log_output_dir", + "params.output_dir_base", + "report.file", + "trace.file", + "timeline.file" + ], "expected_result": { "docker": { "all_group_ids": "$(for i in `id --real --groups`; do echo -n \"--group-add=$i \"; done)", @@ -39,7 +47,7 @@ "author": "Yash Patel, Nicholas Wiltsie", "description": "Nextflow pipeline to perform Indel Realignment and Base Quality Score Recalibration", "name": "recalibrate-BAM", - "version": "1.0.0" + "version": "VER.SI.ON" }, "params": { "aligner": "BWA-MEM2-2.2.1", @@ -74,7 +82,7 @@ "is_DOC_run": false, "is_emit_original_quals": true, "is_targeted": false, - "log_output_dir": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z", + "log_output_dir": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z", "max_cpus": "32", "max_memory": "64 GB", "metapipeline_delete_input_bams": false, @@ -85,7 +93,7 @@ "min_cpus": "1", "min_memory": "1 MB", "output_dir": "/tmp/outputs", - "output_dir_base": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/GATK-4.2.4.1", + "output_dir_base": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/GATK-4.2.4.1", "parallelize_by_chromosome": true, "patient_id": "TWGSAMIN000001", "picard_version": "2.26.10", @@ -414,15 +422,15 @@ }, "report": { "enabled": true, - "file": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z/nextflow-log/report.html" + "file": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z/nextflow-log/report.html" }, "timeline": { "enabled": true, - "file": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z/nextflow-log/timeline.html" + "file": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z/nextflow-log/timeline.html" }, "trace": { "enabled": true, - "file": "/tmp/outputs/recalibrate-BAM-1.0.0/TWGSAMIN000001/log-recalibrate-BAM-1.0.0-19970704T165655Z/nextflow-log/trace.txt" + "file": "/tmp/outputs/recalibrate-BAM-VER.SI.ON/TWGSAMIN000001/log-recalibrate-BAM-VER.SI.ON-19970704T165655Z/nextflow-log/trace.txt" }, "workDir": "/scratch/851543" }