Skip to content

Commit

Permalink
Fixed #521.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbuchfink committed Oct 25, 2021
1 parent 0c64589 commit 47d24be
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[2.0.13]
- Fixed a bug that caused invalid bit scores in frameshift alignment mode.

[2.0.12]
- Fixed an error when using HSP filter settings together with a BLAST database.
- Optimized the performance of alignment traceback.
Expand Down
2 changes: 1 addition & 1 deletion src/basic/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../util/util.h"
#include "../stats/standard_matrix.h"

const char* Const::version_string = "2.0.12";
const char* Const::version_string = "2.0.13";
const char* Const::program_name = "diamond";

Align_mode::Align_mode(unsigned mode) :
Expand Down
2 changes: 1 addition & 1 deletion src/basic/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct Const
{

enum {
build_version = 150,
build_version = 151,
#ifdef SINGLE_THREADED
seedp_bits = 0,
#else
Expand Down
2 changes: 2 additions & 0 deletions src/dp/swipe/banded_3frame_swipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ Hsp traceback(Sequence *query, Strand strand, int dna_len, const Banded3FrameSwi
Hsp out(true);
out.swipe_target = target.target_idx;
out.score = ScoreTraits<_sv>::int_score(max_score) * config.cbs_matrix_scale;
out.bit_score = score_matrix.bitscore(out.score);
out.evalue = evalue;
out.transcript.reserve(size_t(out.score * config.transcript_len_estimate));

Expand Down Expand Up @@ -378,6 +379,7 @@ Hsp traceback(Sequence *query, Strand strand, int dna_len, const Banded3FrameSwi
const int j0 = i1 - (target.d_end - 1);
out.swipe_target = target.target_idx;
out.score = ScoreTraits<_sv>::int_score(max_score) * config.cbs_matrix_scale;
out.bit_score = score_matrix.bitscore(out.score);
out.evalue = evalue;
out.query_range.end_ = std::min(i0 + max_col + (int)dp.band() / 3 / 2, (int)query[0].length());
out.query_range.begin_ = std::max(out.query_range.end_ - (j0 + max_col), 0);
Expand Down

0 comments on commit 47d24be

Please sign in to comment.