[med-svn] [Git][med-team/diamond-aligner][upstream] New upstream version 2.0.13

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Sun Oct 31 09:57:46 GMT 2021



Nilesh Patra pushed to branch upstream at Debian Med / diamond-aligner


Commits:
bfb476e4 by Nilesh Patra at 2021-10-31T15:04:29+05:30
New upstream version 2.0.13
- - - - -


6 changed files:

- − .travis.yml
- src/ChangeLog
- src/align/gapped_score.cpp
- src/basic/basic.cpp
- src/basic/const.h
- src/dp/swipe/banded_3frame_swipe.cpp


Changes:

=====================================
.travis.yml deleted
=====================================
@@ -1,36 +0,0 @@
-os:
-  - linux
-  - osx
-
-dist:
-#  - xenial
-  - trusty
-
-language: c++
-
-#addons:
-#  apt:
-#    packages:
-#      - gdb
-#      - libclang-common-6.0-dev
-
-arch:
-  - amd64
-  - arm64
-  - ppc64le
-  - s390x
-
-compiler:
-  - g++
-#  - clang
-
-install: skip
-
-script:
-  - mkdir build
-  - cd build
-  - cmake -DCMAKE_BUILD_TYPE=Release ..
-  - make
-#  - gdb --ex=r -return-child-result -batch -ex bt --args ./diamond test
-#  - lldb --batch --one-line r --one-line-on-crash bt -- ./diamond test
-  - ./diamond test
\ No newline at end of file


=====================================
src/ChangeLog
=====================================
@@ -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.


=====================================
src/align/gapped_score.cpp
=====================================
@@ -106,7 +106,7 @@ static void add_dp_targets(const WorkTarget& target, int target_idx, const Seque
 		if (target.hsp[frame].empty())
 			continue;
 		
-		int d0 = INT_MAX, d1 = INT_MIN, j0 = INT_MAX, j1 = INT_MIN, bits = 0;
+		int d0 = INT_MAX, d1 = INT_MIN, score = 0;
 
 		for (const Hsp_traits &hsp : target.hsp[frame]) {
 			const int b0 = std::max(hsp.d_min - band, -(slen - 1)),
@@ -115,24 +115,23 @@ static void add_dp_targets(const WorkTarget& target, int target_idx, const Seque
 			if (overlap / (d1 - d0) > config.min_band_overlap || overlap / (b1 - b0) > config.min_band_overlap) {
 				d0 = std::min(d0, b0);
 				d1 = std::max(d1, b1);
-				j0 = std::min(j0, hsp.subject_range.begin_);
-				j1 = std::max(j1, hsp.subject_range.end_);
-				const int64_t dp_size = (int64_t)DpTarget::banded_cols(qlen, slen, d0, d1) * int64_t(d1 - d0);
-				bits = std::max(bits, (int)DP::BandedSwipe::bin(hsp_values, d1 - d0, 0, hsp.score, dp_size, score_width, 0));
+				score = std::max(score, hsp.score);
 			}
 			else {
-				if (d0 != INT_MAX)
-					dp_targets[frame][bits].emplace_back(target.seq, slen, d0, d1, target_idx, qlen, matrix);
+				if (d0 != INT_MAX) {
+					const int64_t dp_size = (int64_t)DpTarget::banded_cols(qlen, slen, d0, d1) * int64_t(d1 - d0);
+					const auto bin = DP::BandedSwipe::bin(hsp_values, d1 - d0, 0, score, dp_size, score_width, 0);
+					dp_targets[frame][bin].emplace_back(target.seq, slen, d0, d1, target_idx, qlen, matrix);
+				}
 				d0 = b0;
 				d1 = b1;
-				j0 = hsp.subject_range.begin_;
-				j1 = hsp.subject_range.end_;
-				const int64_t dp_size = (int64_t)DpTarget::banded_cols(qlen, slen, d0, d1) * int64_t(d1 - d0);
-				bits = (int)DP::BandedSwipe::bin(hsp_values, d1 - d0, 0, hsp.score, dp_size, score_width, 0);
+				score = hsp.score;
 			}
 		}
 
-		dp_targets[frame][bits].emplace_back(target.seq, slen, d0, d1, target_idx, qlen, matrix);
+		const int64_t dp_size = (int64_t)DpTarget::banded_cols(qlen, slen, d0, d1) * int64_t(d1 - d0);
+		const auto bin = DP::BandedSwipe::bin(hsp_values, d1 - d0, 0, score, dp_size, score_width, 0);
+		dp_targets[frame][bin].emplace_back(target.seq, slen, d0, d1, target_idx, qlen, matrix);
 	}
 }
 


=====================================
src/basic/basic.cpp
=====================================
@@ -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) :


=====================================
src/basic/const.h
=====================================
@@ -25,7 +25,7 @@ struct Const
 {
 
 	enum {
-		build_version = 150,
+		build_version = 151,
 #ifdef SINGLE_THREADED
 		seedp_bits = 0,
 #else


=====================================
src/dp/swipe/banded_3frame_swipe.cpp
=====================================
@@ -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));
 
@@ -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);



View it on GitLab: https://salsa.debian.org/med-team/diamond-aligner/-/commit/bfb476e4a522c45a09fba4c73f6e0962135133ce

-- 
View it on GitLab: https://salsa.debian.org/med-team/diamond-aligner/-/commit/bfb476e4a522c45a09fba4c73f6e0962135133ce
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211031/178ae76b/attachment-0001.htm>


More information about the debian-med-commit mailing list