Repository navigation
Add --contamination_resource for GetPileupSummaries - #2367
Merged
Merged
Conversation
GetPileupSummaries loads every site of its variant VCF within each interval into memory, so feeding it the full af-only gnomAD germline resource is slow and runs out of Java heap, in particular with --no_intervals. GATK recommends a small set of common biallelic SNPs such as small_exac_common_3 instead. Add --contamination_resource and --contamination_resource_tbi, used only by GetPileupSummaries after Mutect2 and Parabricks MutectCaller. Without them GetPileupSummaries falls back to --germline_resource, so existing runs are unchanged. The index is generated when missing. Closes #959 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
❌ nf-test failed with latest Nextflow versionNote Tests with Nextflow's latest version failed but it will not cause a CI workflow failure.
See the full run for details. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FriederikeHanssen
added a commit
that referenced
this pull request
Nov 3, 2026
…error The warning is superseded by --contamination_resource (#2367): it would fire for runs that no longer read the germline resource and pointed to the wrong fix. Reuse intervalsParam() for the --intervals false check and revert the Parabricks MutectCaller snapshots to dev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 6 tasks
maxulysse
approved these changes
Nov 3, 2026
FriederikeHanssen
added a commit
that referenced
this pull request
Nov 4, 2026
Closes #2131. In #2131, a WES run passed both `--intervals GRCh38_exome.bed` and `--no_intervals`. `--no_intervals` silently dropped the exome BED, so `GetPileupSummaries` fell back to `--intervals af-only-gnomad.hg38.vcf.gz`. htsjdk turns every site of that VCF into a CRAM query interval and runs out of Java heap at ~20 GB. More memory does not fix this. This PR makes `validateInputParameters()` fail when `--no_intervals` is combined with a user-provided `--intervals` file, which `--no_intervals` would never read. Intervals from `--genome` and `--intervals false` (#2364) are still allowed. The `--intervals false` case reuses `intervalsParam()` from #2364. The memory problem of running `GetPileupSummaries` on the full germline resource is handled by `--contamination_resource` in #2367, so this PR no longer adds a warning for it. Other changes: - The `--tools` help said Mutect2 "cannot be combined" with `--no_intervals`, which is not true. That line is removed. - Several variant calling tests set both `intervals` and `no_intervals`. The ignored `intervals` is removed, so outputs are unchanged. - New failure test in `intervals.nf.test` for the error. Checked with `-preview`: the error fires for a user BED, and `--no_intervals --tools mutect2` with only `--genome` intervals runs without it. ## PR checklist - [x] This comment contains a description of changes (with reason). - [x] If you've fixed a bug or added code that should be tested, add tests! - [x] Make sure your code lints (`nf-core pipelines lint`). - [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`). - [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`). - [x] `CHANGELOG.md` is updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md # docs/output.md # subworkflows/local/bam_variant_calling_mutect2/main.nf # subworkflows/local/bam_variant_calling_parabricks_mutectcaller/main.nf # subworkflows/local/prepare_genome/main.nf
2 tasks done
FriederikeHanssen
added a commit
that referenced
this pull request
Nov 5, 2026
Corrects the `dev - unreleased` section of the CHANGELOG. Each entry was checked against its PR. - **To the developer section:** - #2345 template update (Developer > Changed, like earlier template updates). - #2349 subworkflow refactoring (Developer > Changed). The PR describes this as "Refactoring (no change in outputs)". - #2277 `-stub` duplicate emission fix (Developer > Fixed), reworded and linked to #2280. - **Kept as user-facing:** the #2349 `MUTECT2_PAIRED` → `MUTECT2` rename, because custom configs that select `withName: 'MUTECT2_PAIRED'` need updating. - **#2339 (Parabricks 4.8.0):** moved out of 3.11.0, since it was merged after the release. Its `pull/XXXX` link is fixed, and Parabricks 4.7.1 → 4.8.0 is added to the module dependency table. - **Parameters table:** adds `--force_call_alleles`, `--force_call_alleles_tbi` (#2365), `--contamination_resource` and `--contamination_resource_tbi` (#2367). ## PR checklist - [x] This comment contains a description of changes (with reason). - [x] `CHANGELOG.md` is updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #959
GATK
GetPileupSummariesloads every site of its--variantVCF within each interval into memory. Sarek passed it--germline_resource, which onGATK.GRCh38is the full af-only gnomAD file. This makes the step slow and causes Java out-of-memory errors, in particular with--no_intervals. GATK recommends a small set of common biallelic SNPs for this step, such assmall_exac_common_3.Changes
--contamination_resourceand--contamination_resource_tbi, used only byGetPileupSummariesinVCF_VARIANT_FILTERING_MUTECT2(Mutect2 and Parabricks MutectCaller). Mutect2, Parabricks MutectCaller and Sentieon TNscope keep using--germline_resource.--contamination_resource,GetPileupSummariesfalls back to--germline_resource, so existing runs and snapshots are unchanged.germline_resource_providedis renamed tocontamination_resource_providedin the local subworkflows).TABIX_CONTAMINATION_RESOURCEwhen--contamination_resource_tbiis missing, published underreference/contamination_resourcewith--save_reference.hapmap_3.pop_stratified_chr21.vcf.gzfrom test-datasets as contamination resource, without index. It has 19,760 biallelic SNPs withAF, a stand-in forsmall_exac_common_3.Not in this PR
small_exac_common_3is not in thengi-igenomesbucket for GRCh38 or GRCh37. Once the AWS iGenomes maintainers addsmall_exac_common_3.hg38.vcf.gzand the b37small_exac_common_3.vcffromgs://gatk-best-practices,contamination_resourcecan be set forGATK.GRCh38andGATK.GRCh37inconf/igenomes.config.--germline_resourcestill says contamination estimation is skipped, which is not true when only--contamination_resourceis given. Changing it would rewrite the warning snapshots of unrelated tests.Testing
Run locally with
NXF_VER=25.10.4 nf-test ... --profile +docker --verbose:variant_calling_mutect2.nf.testnew scenario--germline_resource --contamination_resource somatic: passed, snapshot added.GetPileupSummariesran with--variant hapmap_3.pop_stratified_chr21.vcf.gz.variant_calling_mutect2.nf.test--germline_resource somatic: passed with the existing snapshot (fallback to gnomAD).The full suite runs in CI.
PR checklist
nf-core pipelines lint).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.🤖 Generated with Claude Code