[med-svn] [Git][med-team/libssw][master] 6 commits: New upstream version 1.2.5

Andreas Tille (@tille) gitlab at salsa.debian.org
Sat Jul 15 12:00:05 BST 2023



Andreas Tille pushed to branch master at Debian Med / libssw


Commits:
89416347 by Andreas Tille at 2023-07-15T12:49:06+02:00
New upstream version 1.2.5
- - - - -
ddfa74fa by Andreas Tille at 2023-07-15T12:49:06+02:00
routine-update: New upstream version

- - - - -
14b1a6d6 by Andreas Tille at 2023-07-15T12:49:50+02:00
Update upstream source from tag 'upstream/1.2.5'

Update to upstream version '1.2.5'
with Debian dir 07462d52d4d208c6bdc0b47ac593bbdf736ce384
- - - - -
ca874b01 by Andreas Tille at 2023-07-15T12:49:50+02:00
routine-update: Standards-Version: 4.6.2

- - - - -
7fef5fda by Andreas Tille at 2023-07-15T12:56:50+02:00
Update symbols for gcc-13

- - - - -
42cb53dc by Andreas Tille at 2023-07-15T12:57:58+02:00
Upload to unstable

- - - - -


9 changed files:

- debian/changelog
- debian/control
- debian/libssw1.symbols
- src/example.cpp
- src/main.c
- src/ssw.c
- src/ssw.h
- src/ssw_cpp.cpp
- src/ssw_cpp.h


Changes:

=====================================
debian/changelog
=====================================
@@ -1,15 +1,16 @@
-libssw (1.2.4-2) UNRELEASED; urgency=medium
+libssw (1.2.5-1) unstable; urgency=medium
 
   [ Andreas Tille ]
   * Team upload.
   * Source-only upload to unstable
   * Remove trailing whitespace in debian/copyright (routine-update)
-  ATTENTION: spades does not build with this version, thus it is not uploaded to unstable
+  * Update symbols for gcc-13
+    Closes: #1037742
 
   [ Michael R. Crusoe ]
   * Remove extra copy of SIMDe in debian/include/simde
 
- -- Andreas Tille <tille at debian.org>  Mon, 28 Nov 2022 18:04:47 +0100
+ -- Andreas Tille <tille at debian.org>  Sat, 15 Jul 2023 12:56:57 +0200
 
 libssw (1.2.4-1) experimental; urgency=medium
 


=====================================
debian/control
=====================================
@@ -11,7 +11,7 @@ Build-Depends: debhelper-compat (= 13),
                zlib1g-dev,
                libsimde-dev,
                maven-repo-helper <!nojava>
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/libssw
 Vcs-Git: https://salsa.debian.org/med-team/libssw.git
 Homepage: https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library


=====================================
debian/libssw1.symbols
=====================================
@@ -22,9 +22,6 @@ libssw.so.1 libssw1 #MINVER#
  _ZNK20StripedSmithWaterman7Aligner5AlignEPKcRKNS_6FilterEPNS_9AlignmentEi at Base 1.2.4
  _ZNK20StripedSmithWaterman7Aligner5AlignEPKcS2_RKiRKNS_6FilterEPNS_9AlignmentEi at Base 1.2.4
  (optional)_ZNSt6vectorIjSaIjEE17_M_realloc_insertIJRKjEEEvN9__gnu_cxx17__normal_iteratorIPjS1_EEDpOT_ at Base 1.1
- _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED0Ev at Base 1.1
- _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED1Ev at Base 1.1
- _ZNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEED2Ev at Base 1.1
  align_destroy at Base 1.1
  encoded_ops at Base 1.2.4
  init_destroy at Base 1.1


=====================================
src/example.cpp
=====================================
@@ -5,7 +5,7 @@
 // 1) g++ -Wall ssw_cpp.cpp ssw.c example.cpp
 // 2) ./a.out
 // Created by Wan-Ping Lee on 09/04/12.
-// Last revision by Mengyao Zhao on 2017-06-05
+// Last revision by Mengyao Zhao on 2023-Apr-21
 // ==========================
 
 #include <iostream>
@@ -24,8 +24,6 @@ int main() {
   const string query = "CTGAGCCGGTAAATC";
   int32_t maskLen = strlen(query.c_str())/2;
   maskLen = maskLen < 15 ? 15 : maskLen;
-  //const string ref   = "CCGTTTATCGCA";
-  //const string query = "CCTTTTATCGCA";
 
   // Declares a default Aligner
   StripedSmithWaterman::Aligner aligner;


=====================================
src/main.c
=====================================
@@ -42,14 +42,14 @@ KSEQ_INIT(gzFile, gzread)
 static void reverse_comple(const char* seq, char* rc) {
 	int32_t end = strlen(seq), start = 0;
 	static const int8_t rc_table[128] = {
-		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
-		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
-		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
-		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
-		4, 84, 4, 71, 4,  4,  4, 67, 4, 4, 4, 4,  4, 4, 4, 4,
-		4, 4,  4, 4,  65, 65, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4,
-		4, 84, 4, 71, 4,  4,  4, 67, 4, 4, 4, 4,  4, 4, 4, 4,
-		4, 4,  4, 4,  65, 65, 4, 4,  4, 4, 4, 4,  4, 4, 4, 4
+		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4,  4,
+		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4,  4,
+		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4,  4,
+		4, 4,  4, 4,  4,  4,  4, 4,  4, 4, 4, 4,  4, 4, 4,  4,
+		4, 84, 4, 71, 4,  4,  4, 67, 4, 4, 4, 4,  4, 4, 78, 4,
+		4, 4,  4, 4,  65, 65, 4, 4,  4, 4, 4, 4,  4, 4, 4,  4,
+		4, 84, 4, 71, 4,  4,  4, 67, 4, 4, 4, 4,  4, 4, 78,  4,
+		4, 4,  4, 4,  65, 65, 4, 4,  4, 4, 4, 4,  4, 4, 4,  4
 	};
 	rc[end] = '\0';
 	-- end;


=====================================
src/ssw.c
=====================================
@@ -56,7 +56,7 @@
  *
  *  Created by Mengyao Zhao on 6/22/10.
  *  Copyright 2010 Boston College. All rights reserved.
- *	Version 1.2.4
+ *	Version 1.2.5
  *	Last revision by Mengyao Zhao on 2022-Apr-17.
  *
  *  The lazy-F loop implementation was derived from SWPS3, which is
@@ -208,8 +208,8 @@ static alignment_end* sw_sse2_byte (const int8_t* ref,
 	 						 uint8_t bias,  /* Shift 0 point to a positive value. */
 							 int32_t maskLen) {
 
-// Put the largest number of the 16 numbers in vm into m.
-#define max16(m, vm) (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 8)); \
+    // Put the largest number of the 16 numbers in vm into m.
+    #define max16(m, vm) (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 8)); \
 					  (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 4)); \
 					  (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 2)); \
 					  (vm) = _mm_max_epu8((vm), _mm_srli_si128((vm), 1)); \
@@ -304,16 +304,17 @@ static alignment_end* sw_sse2_byte (const int8_t* ref,
 			for (j = 0; LIKELY(j < segLen); ++j) {
 				vH = _mm_load_si128(pvHStore + j);
 				vH = _mm_max_epu8(vH, vF);
-				vMaxColumn = _mm_max_epu8(vMaxColumn, vH);	// newly added line
+	    		vMaxColumn = _mm_max_epu8(vMaxColumn, vH);	// newly added line
 				_mm_store_si128(pvHStore + j, vH);
 				vH = _mm_subs_epu8(vH, vGapO);
 				vF = _mm_subs_epu8(vF, vGapE);
-				if (UNLIKELY(! _mm_movemask_epi8(_mm_cmpgt_epi8(vF, vH)))) goto end;
+                vTemp = _mm_subs_epu8(vF, vH);
+                vTemp = _mm_cmpeq_epi8 (vTemp, vZero);
+                if (UNLIKELY(_mm_movemask_epi8(vTemp) == 0xffff)) goto end;
 			}
 		}
 
 end:		
-
 		vMaxScore = _mm_max_epu8(vMaxScore, vMaxColumn);
 		vTemp = _mm_cmpeq_epi8(vMaxMark, vMaxScore);
 		cmp = _mm_movemask_epi8(vTemp);


=====================================
src/ssw.h
=====================================
@@ -4,7 +4,7 @@
  *  Created by Mengyao Zhao on 6/22/10.
  *  Copyright 2010 Boston College. All rights reserved.
  *	Version 1.2.3
- *	Last revision by Mengyao Zhao on 2022-Apr-15.
+ *	Last revision by Mengyao Zhao on 2022-May-24.
  *
  */
 
@@ -46,7 +46,7 @@ typedef struct _profile s_profile;
     @field	read_begin1	0-based best alignment beginning position on read; read_begin1 = -1 when the best alignment beginning
 						position is not available
     @field	read_end1	0-based best alignment ending position on read
-    @field	read_end2	0-based sub-optimal alignment ending position on read
+    @field	ref_end2	0-based sub-optimal alignment ending position on reference
     @field	cigar	best alignment cigar; stored the same as that in BAM format, high 28 bits: length, low 4 bits: M/I/D (0/1/2);
 					cigar = 0 when the best alignment path is not available
     @field	cigarLen	length of the cigar string; cigarLen = 0 when the best alignment path is not available


=====================================
src/ssw_cpp.cpp
=====================================
@@ -1,6 +1,6 @@
 // ssw_cpp.cpp
 // Created by Wan-Ping Lee
-// Last revision by Mengyao Zhao on 2017-05-30
+// Last revision by Mengyao Zhao on 2023-Apr-21
 
 #include "ssw_cpp.h"
 #include "ssw.h"
@@ -290,25 +290,18 @@ int Aligner::SetReferenceSequence(const char* seq, const int& length) {
 
   int len = 0;
   if (translation_matrix_) {
-    // calculate the valid length
-    //int calculated_ref_length = static_cast<int>(strlen(seq));
-    //int valid_length = (calculated_ref_length > length)
-    //                   ? length : calculated_ref_length;
-    int valid_length = length;
     // delete the current buffer
     CleanReferenceSequence();
     // allocate a new buffer
-    translated_reference_ = new int8_t[valid_length];
+    translated_reference_ = new int8_t[length];
 
-    len = TranslateBase(seq, valid_length, translated_reference_);
+    len = TranslateBase(seq, length, translated_reference_);
   } else {
     // nothing
   }
 
   reference_length_ = len;
   return len;
-
-
 }
 
 int Aligner::TranslateBase(const char* bases, const int& length,
@@ -326,7 +319,7 @@ int Aligner::TranslateBase(const char* bases, const int& length,
 }
 
 
-bool Aligner::Align(const char* query, const Filter& filter,
+uint16_t Aligner::Align(const char* query, const Filter& filter,
                     Alignment* alignment, const int32_t maskLen) const
 {
   if (!translation_matrix_) return false;
@@ -351,18 +344,18 @@ bool Aligner::Align(const char* query, const Filter& filter,
   alignment->Clear();
   ConvertAlignment(*s_al, query_len, alignment);
   alignment->mismatches = CalculateNumberMismatch(&*alignment, translated_reference_, translated_query, query_len);
-
+  uint16_t align_flag = s_al->flag;
 
   // Free memory
   delete [] translated_query;
   align_destroy(s_al);
   init_destroy(profile);
 
-  return true;
+  return align_flag;
 }
 
 
-bool Aligner::Align(const char* query, const char* ref, const int& ref_len,
+uint16_t Aligner::Align(const char* query, const char* ref, const int& ref_len,
                     const Filter& filter, Alignment* alignment, const int32_t maskLen) const
 {
   if (!translation_matrix_) return false;
@@ -392,6 +385,7 @@ bool Aligner::Align(const char* query, const char* ref, const int& ref_len,
   alignment->Clear();
   ConvertAlignment(*s_al, query_len, alignment);
   alignment->mismatches = CalculateNumberMismatch(&*alignment, translated_ref, translated_query, query_len);
+  uint16_t align_flag = s_al->flag;
 
   // Free memory
   delete [] translated_query;
@@ -399,7 +393,7 @@ bool Aligner::Align(const char* query, const char* ref, const int& ref_len,
   align_destroy(s_al);
   init_destroy(profile);
 
-  return true;
+  return align_flag;
 }
 
 void Aligner::Clear(void) {


=====================================
src/ssw_cpp.h
=====================================
@@ -1,6 +1,6 @@
 // ssw_cpp.h
 // Created by Wan-Ping Lee
-// Last revision by Mengyao Zhao on 2017-05-30
+// Last revision by Mengyao Zhao on 2023-Apr-21
 
 #ifndef COMPLETE_STRIPED_SMITH_WATERMAN_CPP_H_
 #define COMPLETE_STRIPED_SMITH_WATERMAN_CPP_H_
@@ -109,7 +109,7 @@ class Aligner {
   //                    and replaced.
   // @param    seq    The reference bases;
   //                  [NOTICE] It is not necessary null terminated.
-  // @param    length The length of bases will be be built.
+  // @param    length The length of bases will be built.
   // @return   The length of the built bases.
   // =========
   int SetReferenceSequence(const char* seq, const int& length);
@@ -134,9 +134,9 @@ class Aligner {
   // @param    maskLen   The distance between the optimal and suboptimal alignment ending position will >= maskLen. We suggest to 
   //                     use readLen/2, if you don't have special concerns. Note: maskLen has to be >= 15, otherwise this function 
   //                     will NOT return the suboptimal alignment information.
-  // @return   True: succeed; false: fail.
+  // @return   If the alignment path is accurate (or has missing part). 0: accurate; 1: banded_sw is totally failed; 2: banded_sw returned path has missing part
   // =========
-  bool Align(const char* query, const Filter& filter, Alignment* alignment, const int32_t maskLen) const;
+  uint16_t Align(const char* query, const Filter& filter, Alignment* alignment, const int32_t maskLen) const;
 
   // =========
   // @function Align the query againt the reference.
@@ -151,9 +151,9 @@ class Aligner {
   // @param    maskLen   The distance between the optimal and suboptimal alignment ending position will >= maskLen. We suggest to 
   //                     use readLen/2, if you don't have special concerns. Note: maskLen has to be >= 15, otherwise this function 
   //                     will NOT return the suboptimal alignment information.
-  // @return   True: succeed; false: fail.
+  // @return   If the alignment path is accurate (or has missing part). 0: accurate; 1: banded_sw is totally failed; 2: banded_sw returned path has missing part
   // =========
-  bool Align(const char* query, const char* ref, const int& ref_len,
+  uint16_t Align(const char* query, const char* ref, const int& ref_len,
              const Filter& filter, Alignment* alignment, const int32_t maskLen) const;
 
   // @function Clear up all containers and thus the aligner is disabled.



View it on GitLab: https://salsa.debian.org/med-team/libssw/-/compare/2d46fc90f0d0a2a270d34fe894b5c7ecd7a248db...42cb53dc890990c2f7b1a154a6f75547c8ae43df

-- 
View it on GitLab: https://salsa.debian.org/med-team/libssw/-/compare/2d46fc90f0d0a2a270d34fe894b5c7ecd7a248db...42cb53dc890990c2f7b1a154a6f75547c8ae43df
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/20230715/88dacd65/attachment-0001.htm>


More information about the debian-med-commit mailing list