Sheffield-iGEM / syn-zeug

A modern toolbox for synthetic biology
https://sheffield-igem.github.io/syn-zeug/
GNU Affero General Public License v3.0
6 stars 3 forks source link

Implement New Tool: "Translation" #7

Closed TheLostLambda closed 2 years ago

TheLostLambda commented 2 years ago

What should this tool do? This tool should convert RNA into an amino acid sequence.

Is there an existing reference implementation? This Rosalind problem is a good source of guidance and a place to verify your solution.

What are the tool's inputs? An RNA sequence

What is the tool's output? An amino acid sequence (Protein)

Other Implementation Details This should be implemented on a match arm of Seq's .convert(). You can also implement the DNA → Protein conversion – perhaps by converting the DNA to RNA, then running the RNA → Protein conversion, but it may be more performant to extend the codon lookup table and merge the DNA → Protein and RNA → Protein match arms.

TheLostLambda commented 2 years ago

When it comes to actually implementing that codon lookup table, it's worth thinking about how that's best done. It would be possible to use a match statement or to use a HashMap or other static map type. There is likely a performance tradeoff between these options (also probably affected by if the match is in the Seq::convert method or in a global function someplace).