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

translate() uses incorrect codons for DNA to protein conversion #95

Open
poppn opened this issue Apr 8, 2022 · 1 comment
Open

translate() uses incorrect codons for DNA to protein conversion #95

poppn opened this issue Apr 8, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@poppn
Copy link

poppn commented Apr 8, 2022

The codon table used by translate() has 4 codons swapped, where the wrong amino acid is called (specifically TTN codons).


test_tib <- tibble(codons = c("TTA", "TTC", "TTG", "TTT"),
                   correct_aa = c("L", "F", "L", "F")) %>%
  mutate(tidysq_codons = sq(codons),
         tidysq_aa = translate(tidysq_codons))

test_tib

A tibble: 4 × 4
  codons correct_aa tidysq_codons tidysq_aa
  <chr>  <chr>      <dna_bsc>     <ami_bsc>
1 TTA    L          TTA <3>       F <1>    
2 TTC    F          TTC <3>       L <1>    
3 TTG    L          TTG <3>       F <1>    
4 TTT    F          TTT <3>       L <1>    

@ErdaradunGaztea ErdaradunGaztea added the bug Something isn't working label Apr 8, 2022
@ErdaradunGaztea ErdaradunGaztea self-assigned this Apr 8, 2022
DominikRafacz added a commit that referenced this issue Apr 22, 2022
@ErdaradunGaztea
Copy link
Member

ErdaradunGaztea commented Apr 22, 2022

Yup, turns out I switched two codons while hardcoding the values. Dominik fixed it and it shouldn't break anymore, now that all codons are covered by tests instead of just a few selected ones. However, we won't be submitting this to CRAN yet, so the fix is currently available on devel branch; you can install it with:

devtools::install_github("BioGenies/tidysq@devel")

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

No branches or pull requests

2 participants