Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when translating gaps #278

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Conversation

jakobnissen
Copy link
Member

DNA_Gap cannot be meaningfully translated, as it does not correspond to any nucleotides, not even an unknown one. In fact, it's dubious that it's even a nucleotide at all.
This PR makes translate(!) error when run on sequences with gaps, whereas before this PR this was undefined behaviour (out-of-bounds access). Alternative solutions could be to silently skip gaps, which is biologically meaningful, but might lead to strange errors, or to insert AA_Gap, which can only be done if the gaps come in groups of three corresponding to a whole gap codon.
In the future we could change behaviour to skip gaps.

Closes #277

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.33 ⚠️

Comparison is base (c43fd6e) 91.20% compared to head (48ae9fe) 90.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #278      +/-   ##
==========================================
- Coverage   91.20%   90.88%   -0.33%     
==========================================
  Files          31       31              
  Lines        2400     2403       +3     
==========================================
- Hits         2189     2184       -5     
- Misses        211      219       +8     
Flag Coverage Δ
unittests 90.88% <100.00%> (-0.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/geneticcode.jl 86.84% <100.00%> (+0.23%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

DNA_Gap cannot be meaningfully translated, as it does not correspond to any
nucleotides, not even an unknown one. In fact, it's dubious that it's even a
nucleotide at all.
This PR makes `translate(!)` error when run on sequences with gaps, whereas
before this PR this was undefined behaviour (out-of-bounds access).
Alternative solutions could be to silently skip gaps, which is biologically
meaningful, but might lead to strange errors, or to insert AA_Gap, which can
only be done if the gaps come in groups of three corresponding to a whole
gap codon.
In the future we could change behaviour to skip gaps.

See issue 277
@jakobnissen jakobnissen merged commit 1ccb602 into BioJulia:master Jun 22, 2023
@jakobnissen jakobnissen deleted the gaps branch June 22, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translation Issue arising from isambiguous(DNA_Gap) == false
1 participant