Skip to content

Commit

Permalink
Merge pull request #544 from FriederikeHanssen/fix_mutect2
Browse files Browse the repository at this point in the history
Fix Mutect2
  • Loading branch information
FriederikeHanssen authored May 16, 2022
2 parents 818e8e6 + 42d1506 commit 5d0a0b9
Show file tree
Hide file tree
Showing 36 changed files with 456 additions and 336 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#520](https://github.com/nf-core/sarek/pull/520) - Improve annotation subworkflows
- [#537](https://github.com/nf-core/sarek/pull/537) - Update workflow figure
- [#539](https://github.com/nf-core/sarek/pull/539) - Update `CITATIONS.md`
- [#544](https://github.com/nf-core/sarek/pull/544) - `Mutect2` is no longer compatible with `--no_intervals`

### Fixed

Expand Down
75 changes: 37 additions & 38 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,8 @@ process{
}

//MUTECT2
withName: 'GATK4_CALCULATECONTAMINATION' {
withName: 'CALCULATECONTAMINATION' {
ext.args = { "-tumor-segmentation ${meta.id}.segmentation.table" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
Expand All @@ -747,7 +748,6 @@ process{

withName: 'CONCAT_MUTECT2.*' {
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
pattern: "*{vcf.gz,vcf.gz.tbi}"
Expand All @@ -763,28 +763,50 @@ process{
]
}

withName: 'GATHERPILEUPSUMMARIES.*' {
ext.prefix = { "${meta.id}.table" }
ext.when = { "${!params.no_intervals}"}
withName: 'GATHERPILEUPSUMMARIES' {
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'GATHERPILEUPSUMMARIES' {
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'GATHERPILEUPSUMMARIES_.*' {
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.tumor_id}_vs_${meta.normal_id}/mutect2" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'GETPILEUPSUMMARIES.*' {
publishDir = [
enabled: params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
pattern: "*.table",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}

withName: 'LEARNREADORIENTATIONMODEL'{
ext.prefix = { "${meta.id}.artifactprior" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'MERGEMUTECTSTATS' {
ext.prefix = { "${meta.id}.vcf.gz" }
ext.prefix = { "${meta.id}" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
Expand All @@ -794,12 +816,12 @@ process{

withName: 'MUTECT2'{
ext.when = { params.tools && params.tools.contains('mutect2') }
ext.args = { params.ignore_soft_clipped_bases ? "--dont-use-soft-clipped-bases true" : "" }
ext.args = { params.ignore_soft_clipped_bases ? "--dont-use-soft-clipped-bases true --f1r2-tar-gz ${meta.id}.f1r2.tar.gz" : "--f1r2-tar-gz ${meta.id}.f1r2.tar.gz" }
publishDir = [
enabled: params.no_intervals,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
pattern: "*{gz,gz.tbi,stats}"
pattern: "*{vcf.gz,vcf.gz.tbi,stats}",
saveAs: { meta.num_intervals > 1 ? null : it }
]
}

Expand Down Expand Up @@ -884,34 +906,11 @@ process{
}

//MUTECT2
withName: 'CALCULATECONTAMINATION' {
//ext.args = { params.ignore_soft_clipped_bases ? "--dont-use-soft-clipped-bases true" : "" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING:GATHERPILEUPSUMMARIES.*' {
ext.prefix = { "${meta.id}.table" }
publishDir = [
enabled: !params.no_intervals,
mode: params.publish_dir_mode,
//use ${meta.tumor_id}_vs_${meta_normal_id} to publish in the same directory as the remainders of the
//somatic output whilst keeping the filename prefix identifiable for status type
path: { "${params.outdir}/variant_calling/${meta.tumor_id}_vs_${meta.normal_id}/mutect2" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'LEARNREADORIENTATIONMODEL' {
ext.prefix = { "${meta.id}.learnreadorientationmodel" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/${meta.id}/mutect2" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:GATK_TUMOR_NORMAL_SOMATIC_VARIANT_CALLING:MUTECT2' {
ext.args = { params.ignore_soft_clipped_bases ?
"--dont-use-soft-clipped-bases true --f1r2-tar-gz ${meta.id}.f1r2.tar.gz --normal-sample ${meta.patient}_${meta.normal_id}" :
"--f1r2-tar-gz ${meta.id}.f1r2.tar.gz --normal-sample ${meta.patient}_${meta.normal_id}" }
}

//MSISENSORPRO
Expand Down
46 changes: 23 additions & 23 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,70 +79,70 @@
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
},
"gatk4/applybqsr": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/applybqsrspark": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/applyvqsr": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/baserecalibrator": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/baserecalibratorspark": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "fd7ee6799abf1bd5228b4b59ce541f3aeaa2280b"
},
"gatk4/calculatecontamination": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/createsequencedictionary": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/estimatelibrarycomplexity": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/filtermutectcalls": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/gatherbqsrreports": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/gatherpileupsummaries": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/genomicsdbimport": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/genotypegvcfs": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/getpileupsummaries": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "f40cfefc0899fd6bb6adc300142ca6c3a35573ff"
},
"gatk4/haplotypecaller": {
"git_sha": "68f1c27169946f931ea4318911de5681f88b2961"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/intervallisttobed": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/learnreadorientationmodel": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/markduplicates": {
"git_sha": "0511e7fbbfa4ba41940d33b687b1cc90227b4eb8"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/markduplicatesspark": {
"git_sha": "e04970b7d249365cafa5a52912f9a28840481c05"
},
"gatk4/mergemutectstats": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/mutect2": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"gatk4/variantrecalibrator": {
"git_sha": "409af2f27cbe45109acc7fee70718d2bf20aa449"
"git_sha": "169b2b96c1167f89ab07127b7057c1d90a6996c7"
},
"manta/germline": {
"git_sha": "ffedf09b6e84b479c9c901274f74bb33f3777243"
Expand Down Expand Up @@ -172,7 +172,7 @@
"git_sha": "897c33d5da084b61109500ee44c01da2d3e4e773"
},
"samtools/bam2fq": {
"git_sha": "897c33d5da084b61109500ee44c01da2d3e4e773"
"git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159"
},
"samtools/collatefastq": {
"git_sha": "705f8c9ac4dfdf07666e71abde28f267e2dfd5eb"
Expand All @@ -196,7 +196,7 @@
"git_sha": "897c33d5da084b61109500ee44c01da2d3e4e773"
},
"samtools/view": {
"git_sha": "897c33d5da084b61109500ee44c01da2d3e4e773"
"git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce"
},
"seqkit/split2": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/modules/ascat/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/applybqsr/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/applybqsrspark/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/applyvqsr/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/baserecalibrator/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/baserecalibratorspark/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/calculatecontamination/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/filtermutectcalls/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/nf-core/modules/gatk4/gatherbqsrreports/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5d0a0b9

Please sign in to comment.