fix: DBS across codon boundary correctly classified as nonsense (#84)#96
Open
jmg421 wants to merge 3 commits into
Open
fix: DBS across codon boundary correctly classified as nonsense (#84)#96jmg421 wants to merge 3 commits into
jmg421 wants to merge 3 commits into
Conversation
Convert \itemize blocks that used \item{label}{desc} syntax to \describe,
and replace empty \item{}{} labels in \describe blocks with the function
signature from the body, resolving all checkRd warnings in isSNV-methods,
PolyPhenDb-class, readVcf-methods, SIFTDb-class, summarizeVariants-methods,
VariantType-class, VCF-class, VcfFile-class, VCFHeader-class, VRanges-class,
and VRangesList-class Rd files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…onductor#84) A dinucleotide base substitution (DBS) spanning a codon boundary that produces a stop codon in one of the two affected amino acids (e.g. VARAA='P*') was misclassified as 'nonsynonymous' instead of 'nonsense'. Root cause: the nonsense check used `as.character(varAA) %in% "*"` which only matches when the entire VARAA string is '*'. For multi-codon DBS, VARAA is multi-character (e.g. 'P*') and the check fails. Fix: use `grepl("*", ..., fixed=TRUE)` to detect stop codons anywhere in the translated variant amino acid sequence. Any premature stop truncates the protein regardless of flanking residues. Fixes Bioconductor#84
jmg421
force-pushed
the
fix/84-dbs-nonsense
branch
from
July 18, 2026 03:17
c8a9ee0 to
4b38629
Compare
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.
Summary
A dinucleotide base substitution (DBS) that spans a codon boundary and produces a stop codon in one of the two resulting amino acids was misclassified as
nonsynonymousinstead ofnonsense.Example from the issue:
GG→AAon the - strand producesVARAA='P*'(proline + stop), but was reported as nonsynonymous because the check only matched when VARAA was exactly'*'.Root Cause
Line 184 of
methods-predictCoding.R:%in% "*"requires the entire string to equal*. For a DBS spanning two codons,varAAis two characters (e.g.P*), so the check fails.Fix
grepldetects a stop codon anywhere in the translated variant sequence. Any premature stop truncates the protein — it doesn't matter what precedes it.Testing
Added
test_predictCoding_dbs_nonsenseverifying that:P*→ nonsense (stop after one residue)*→ nonsense (classic single-codon stop)PQ→ nonsynonymous (no stop)*L→ nonsense (stop at first position)Fixes #84