Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #720 from MaxUlysse/BamQC
Browse files Browse the repository at this point in the history
Run bamQC on the recalibrated BAMs
  • Loading branch information
Szilveszter Juhos authored Jan 31, 2019
2 parents 5ad4833 + 974c810 commit 720e439
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [#715](https://github.com/SciLifeLab/Sarek/pull/715) - Remove `defReferencesFiles` function from `buildReferences.nf`
- [#721](https://github.com/SciLifeLab/Sarek/pull/721) - Remove COSMIC docs

### `Fixed`
- [#720](https://github.com/SciLifeLab/Sarek/pull/720) - bamQC is now run on the recalibrated bams, and not after MarkDuplicates

## [2.2.2] - 2018-12-19

### `Added`
Expand Down
15 changes: 4 additions & 11 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,6 @@ if (params.verbose) recalibrationTable = recalibrationTable.view {
Files : [${it[3].fileName}, ${it[4].fileName}, ${it[5].fileName}]"
}

(bamForBamQC, bamForSamToolsStats, recalTables, recalibrationTableForHC, recalibrationTable) = recalibrationTable.into(5)

// Remove recalTable from Channels to match inputs for Process to avoid:
// WARN: Input tuple does not match input set cardinality declared by process...
bamForBamQC = bamForBamQC.map { it[0..4] }
bamForSamToolsStats = bamForSamToolsStats.map{ it[0..4] }

recalTables = recalTables.map { [it[0]] + it[2..-1] } // remove status

process RecalibrateBam {
tag {idPatient + "-" + idSample}

Expand All @@ -406,8 +397,6 @@ process RecalibrateBam {
set idPatient, status, idSample, file("${idSample}.recal.bam"), file("${idSample}.recal.bai") into recalibratedBam, recalibratedBamForStats
set idPatient, status, idSample, val("${idSample}.recal.bam"), val("${idSample}.recal.bai") into recalibratedBamTSV

// GATK4 HaplotypeCaller can not do BQSR on the fly, so we have to create a
// recalibrated BAM explicitly.
when: !params.onlyQC

script:
Expand Down Expand Up @@ -436,6 +425,10 @@ if (params.verbose) recalibratedBam = recalibratedBam.view {
Files : [${it[3].fileName}, ${it[4].fileName}]"
}

// Remove recalTable from Channels to match inputs for Process to avoid:
// WARN: Input tuple does not match input set cardinality declared by process...
(bamForBamQC, bamForSamToolsStats) = recalibratedBamForStats.map{ it[0..4] }.into(2)

process RunSamtoolsStats {
tag {idPatient + "-" + idSample}

Expand Down

0 comments on commit 720e439

Please sign in to comment.