We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a80c198 commit 3ebe9c3Copy full SHA for 3ebe9c3
1 file changed
docs/src/rosalind/08-prot.md
@@ -96,13 +96,14 @@ function translate_mrna(seq)
96
if seq%3!=0
97
warn("this sequence is not divisible by 3")
98
end
99
- # separate string into codons, map over with codon table
+ # separate string into codons
100
codons = (join(chunk) for chunk in Iterators.partition(seq, 3))
101
-
102
- protein = join(codon_table[c] for c in codons if haskey(codon_table, c))
103
104
- # return amino acid string
+ # map over codons with codon table
+ aa_string = join(get(codon_table, c, "X") for c in codons)
105
+ # return amino acid string
106
+ return(aa_string)
107
```
108
109
0 commit comments