Skip to content

Exclude normal groups from somatic candidate sets (first step of #168) - #170

Merged
riasc merged 2 commits into
mainfrom
feat/paired-somatic-calling-168
Sep 13, 2026
Merged

riasc merged 2 commits into
mainfrom
feat/paired-somatic-calling-168

Conversation

@riasc

@riasc riasc commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixed

Tumor-only Mutect2 does no germline subtraction, and get_snvs / get_shortindels / get_longindels combined all groups — so a matched normal's calls (essentially germline) were merged into the "somatic" set (~890K SNVs on a TESLA normal). Add a somatic_groups() helper that returns tumor groups only (via SAMPLES[sample]["normal"]) and use it in the three somatic combines. The normal is a germline reference, not a neoantigen candidate source.

First, self-contained step of #168 (paired somatic calling). The rest — paired Mutect2 (-normal), RNA bcftools isec vs the normal-group germline, RG SM:{sample}_{group}, gnomAD fallback — follows in a dedicated PR.

Validation

  • Dry-run confirms combine_somatic_SNVs_m2 now pulls only tumor groups (normal excluded).
  • get_counts deliberately unchanged (quantification still covers all groups).

QC

  • I, as a human being, have checked each line of code

Normal groups are germline references, not neoantigen candidate sources, but
get_snvs / get_shortindels / get_longindels combined *all* groups -- so the
matched normal's germline calls (e.g. 890K on a TESLA sample) were merged into
the "somatic" set. Add a somatic_groups() helper (tumor groups only, per
SAMPLES[sample]["normal"]) and use it in the three somatic combines.

First step of #168 (germline subtraction). Still TODO there: paired Mutect2
(-normal) for tumor groups with a matched normal, RNA bcftools-isec vs the
normal-group germline (wiring up the dead final HaplotypeCaller round), distinct
RG SM tags, gnomAD fallback, and the same exclusion for exitron/fusion/altsplicing.
@riasc riasc added the bug Something isn't working label Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 8a82de94-90e3-4fbc-bba6-72c6b921a99d

📥 Commits

Reviewing files that changed from the base of the PR and between 9133e96 and 4dd98d3.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • workflow/rules/common.smk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@riasc
riasc merged commit 6f69ff5 into main Sep 13, 2026
7 checks passed
@riasc
riasc deleted the feat/paired-somatic-calling-168 branch September 13, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant