Repository navigation
Pair tumor and normal BAMs regardless of per-BAM kinetics - #219
robert-a-forsyth wants to merge 2 commits into
Conversation
Tumor/normal pairing joined on a meta that carried METAEXTRACT's per-BAM `kinetics` flag, so a pair where only one BAM kept PacBio kinetics was silently dropped from all variant calling; its QC still reached the report join, which then crashed with "Invalid method invocation call". - Drop `kinetics` from meta after alignment; only the m6A branch reads it. - Stop early when a sample's BAMs resolve to different Clair models (validateSampleModels), since those also key the pairing joins. - Make the tumor/normal join failOnMismatch so meta drift can no longer drop a pair silently. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| } | ||
| .join(paired_normal_bams) | ||
| // failOnMismatch: a tumor/normal meta drift must stop the run, not drop the pair | ||
| .join(paired_normal_bams, failOnMismatch: true) |
There was a problem hiding this comment.
No regression test for the bug this PR fixes. The only new tests are the two validateSampleModels function tests. They don't run the pairing join itself.
Nothing tagged small covers a paired PacBio sample where one BAM has kinetics and the other doesn't, so CI never runs that case. The core fix (dropping kinetics from the subMaps) and the new failOnMismatch: true are therefore only checked indirectly.
Suggestions:
- Add a
smallstub or fixture test with a tumor/normal pair whose METAEXTRACTkineticsdiffers. It should show thatsomatic_smallvar_inputemits the pair and that the run reachesLRSOMATICREPORT. - If that isn't practical, run the Slurm test array with such a samplesheet and note the result in the PR.
| ch_samplesheet | ||
| .map { meta, _bam -> meta } | ||
| .collect() | ||
| .map { metas -> validateSampleModels(metas) } |
There was a problem hiding this comment.
Missing CHANGELOG.md entry. The PR changes behaviour that users will see:
- Paired samples whose BAMs differ in kinetics are no longer dropped silently.
- A run with mismatched per-BAM caller models now stops with an error.
- The tumor/normal join now uses
failOnMismatch.
REVIEW.md asks for an entry under v1.2.0dev that cites #219. This should probably go under Fixed, and possibly Changed for the new launch-time error.
|
Automated review: 2 findings, posted inline.
The fix itself looks right. I removed A human reviewer needs to run these, because I couldn't run anything:
🤖 Generated with Claude Code |
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Tumor/normal pairing joined on a meta that carried METAEXTRACT's per-BAM
kineticsflag, so a pair where only one BAM kept PacBio kinetics was silently dropped from all variant calling; its QC still reached the report join, which then crashed with "Invalid method invocation call".kineticsfrom meta after alignment; only the m6A branch reads it.PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).