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

Implement reverse translation (AminoAcid -> Codon) #168

Closed
BeastyBlacksmith opened this issue Jul 16, 2021 · 6 comments
Closed

Implement reverse translation (AminoAcid -> Codon) #168

BeastyBlacksmith opened this issue Jul 16, 2021 · 6 comments

Comments

@BeastyBlacksmith
Copy link

I am thinking about where a good place for the codon and aminoacid tables would be in julia and wanted to ask if it would fit in here.

Expected Behavior

convert(Vector{RNAMer{3}}, AA_A) == RNAMer{3}.(["GCU", "GCA", "GCC", "GCG"])
convert(AminoAcid, RNAMer{3}("GCU")) == AA_A 

Maybe have an extra type alias const Codon = RNAMer{3}

Possible Solution / Implementation

Add two lookup tables.

Context

Could go alternatively in a separate package.

@jakobnissen
Copy link
Member

All of this is already implemented in BioSequences.jl:

julia> using BioSequences

julia> DNACodon
Mer{DNAAlphabet{2}, 3}

julia> RNACodon
Mer{RNAAlphabet{2}, 3}

See also https://biojulia.net/BioSequences.jl/stable/transforms/#Translation-1

@jakobnissen
Copy link
Member

Closing as resolved - if there are any features you'd want to add, you are free to comment and I'll re-open

@BeastyBlacksmith
Copy link
Author

BeastyBlacksmith commented Jul 16, 2021

Indeed this works in the Codon -> AminoAcid direction, but not in the reverse direction.
I get that this is not unique and thus I'd like to get all Codons representing an amino acid.
Furthermore I'd like to do this with single codons without having to convert them to LongRNASeq

@jakobnissen
Copy link
Member

Translation of single DNA codons is a feature in the upcoming v3, already implemented. There is no such thing as reverse translation in BioSequences. We could add that

@jakobnissen jakobnissen reopened this Jul 16, 2021
@jakobnissen jakobnissen changed the title Codon and aminoacid tables Implement reverse translation (AminoAcid -> Codon) Jul 16, 2021
@jakobnissen
Copy link
Member

jakobnissen commented Oct 5, 2021

I added an implementation here https:/jakobnissen/play/blob/master/revtrans.jl (also see the accompanying blog post).

The plan now is to wait for BioSequences v3 where kmers are moved to another repo, and then implement reverse translation in that repo.

@jakobnissen
Copy link
Member

jakobnissen commented Jun 13, 2022

This issue is now tracked here: BioJulia/Kmers.jl#19

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

No branches or pull requests

2 participants