From b94bd7866cc7668d6265ca89a492b04378650d0d Mon Sep 17 00:00:00 2001 From: Maxime Garcia Date: Mon, 15 Oct 2018 17:36:55 +0200 Subject: [PATCH 1/2] input bam file has always the same name --- main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.nf b/main.nf index f130b42e9d..2ddad4e215 100644 --- a/main.nf +++ b/main.nf @@ -233,12 +233,12 @@ process MarkDuplicates { } input: - set idPatient, status, idSample, file(bam) from mergedBam + set idPatient, status, idSample, file("${idSample}.bam") from mergedBam output: set idPatient, file("${idSample}_${status}.md.bam"), file("${idSample}_${status}.md.bai") into duplicateMarkedBams set idPatient, status, idSample, val("${idSample}_${status}.md.bam"), val("${idSample}_${status}.md.bai") into markDuplicatesTSV - file ("${bam}.metrics") into markDuplicatesReport + file ("${idSample}.bam.metrics") into markDuplicatesReport when: step == 'mapping' && !params.onlyQC @@ -247,8 +247,8 @@ process MarkDuplicates { gatk --java-options -Xmx${task.memory.toGiga()}g \ MarkDuplicates \ --MAX_RECORDS_IN_RAM 50000 \ - --INPUT ${bam} \ - --METRICS_FILE ${bam}.metrics \ + --INPUT ${idSample}.bam \ + --METRICS_FILE ${idSample}.bam.metrics \ --TMP_DIR . \ --ASSUME_SORT_ORDER coordinate \ --CREATE_INDEX true \ From d3889c3e0ed2035385fc63e38e85614cd0909ecc Mon Sep 17 00:00:00 2001 From: Maxime Garcia Date: Tue, 16 Oct 2018 10:00:01 +0200 Subject: [PATCH 2/2] update CHANGELOG [skip ci] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6259904237..51aa88fd9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [#663](https://github.com/SciLifeLab/Sarek/pull/663) - Update `do_release.sh` script +### `Fixed` + +- [#665](https://github.com/SciLifeLab/Sarek/pull/665) - Input bam file now has always the same name (whether it is from a single fastq pair or multiple) in the MarkDuplicates process, so metrics too + ## [2.2.1] - 2018-10-04 ### `Changed`