Closed TheLostLambda closed 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).
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 ofSeq
'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.