Skip to content

Commit

Permalink
Implement qframe, tframe in convertalis (#615, #803)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunShow authored May 21, 2024
1 parent b6db541 commit 417f22f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/util/convertalignments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,26 @@ int convertalignments(int argc, const char **argv, const Command &command) {
result.append(SSTR(pPositive));
break;
}
case Parameters::OUTFMT_QFRAME: {
int frame;
if (res.qStartPos <= res.qEndPos) {
frame = (res.qStartPos - 1) % 3 + 1;
} else {
frame = -1 * ((res.qLen - res.qStartPos) % 3 + 1);
}
result.append(SSTR(frame));
break;
}
case Parameters::OUTFMT_TFRAME: {
int frame;
if (res.dbStartPos <= res.dbEndPos) {
frame = (res.dbStartPos - 1) % 3 + 1;
} else {
frame = -1 * ((res.dbLen - res.dbStartPos) % 3 + 1);
}
result.append(SSTR(frame));
break;
}
}
if (i < outcodes.size() - 1) {
result.push_back('\t');
Expand Down

0 comments on commit 417f22f

Please sign in to comment.