Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve intervals when needed #73

Merged
merged 8 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---

Expand Down
2 changes: 1 addition & 1 deletion module/base-recalibration.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down
4 changes: 2 additions & 2 deletions module/summary-qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
20 changes: 14 additions & 6 deletions test/configtest-F16.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down
20 changes: 14 additions & 6 deletions test/configtest-F32.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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"
}
Expand Down