Skip to content

Commit

Permalink
Improve proteinaln2nucl backtrace handling
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Mar 3, 2018
1 parent 2db9ad4 commit b43de8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/util/proteinaln2nucl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <fstream>
#include <FileUtil.h>
#include <Orf.h>
#include <itoa.h>

#include "Alignment.h"
#include "Util.h"
Expand Down Expand Up @@ -75,15 +76,18 @@ int proteinaln2nucl(int argc, const char **argv, const Command &command) {
case 'M':
case 'D':
case 'I':
newBacktrace.append(std::string(cnt*3, res.backtrace[pos]));
char *buffNext = Itoa::i32toa_sse2(cnt*3, buffer);
size_t len = buffNext - buffer;
newBacktrace.append(buffer, len-1);
newBacktrace.push_back(res.backtrace[pos]);
break;

}

}
res.backtrace = newBacktrace;

size_t len = Matcher::resultToBuffer(buffer, res, hasBacktrace, true);
size_t len = Matcher::resultToBuffer(buffer, res, hasBacktrace, false);
ss.append(buffer, len);
}

Expand Down

0 comments on commit b43de8b

Please sign in to comment.