Skip to content

Commit 4ef1b1d

Browse files
committed
last codon in coding sequence translation got lost
1 parent ce2b18f commit 4ef1b1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/translator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ bool translator::isBase(char &base) {
177177

178178
string translator::translate(string &line) {
179179
string translated;
180-
for (auto pos = 0; pos+3 < line.length(); pos = pos +3) {
180+
for (auto pos = 0; pos+3 <= line.length(); pos = pos +3) {
181181
string unit = line.substr(pos, 3);
182182
translated+= translator::getTranslatedAminoAcid(unit);
183183
}

0 commit comments

Comments
 (0)