[med-svn] [Git][med-team/kma][master] 5 commits: New upstream version 1.4.21

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Wed Mar 5 12:50:21 GMT 2025



Étienne Mollier pushed to branch master at Debian Med / kma


Commits:
9c6d1efa by Étienne Mollier at 2025-03-05T13:43:42+01:00
New upstream version 1.4.21
- - - - -
1e104e3a by Étienne Mollier at 2025-03-05T13:43:42+01:00
Update upstream source from tag 'upstream/1.4.21'

Update to upstream version '1.4.21'
with Debian dir da20754f7f23b305e089747dad14990d49539b4d
- - - - -
ca89b93a by Étienne Mollier at 2025-03-05T13:44:15+01:00
d/control: declare compliance to standards version 4.7.2.

- - - - -
504f8615 by Étienne Mollier at 2025-03-05T13:45:57+01:00
typos.patch: delete: applied upstream.

- - - - -
02d24d58 by Étienne Mollier at 2025-03-05T13:47:47+01:00
d/changelog: ready for upload to unstable.

- - - - -


9 changed files:

- assembly.c
- debian/changelog
- debian/control
- debian/patches/series
- − debian/patches/typos.patch
- index.c
- kma.c
- update.c
- version.h


Changes:

=====================================
assembly.c
=====================================
@@ -517,9 +517,7 @@ void * assemble_KMA_threaded(void *arg) {
 										for(j = 0; j < 6; ++j) {
 											myBias += assembly[pos].counts[j];
 										}
-										if(myBias > 0) { /* here */ /* not here */ /* why subtract one */ /* and check prior to insertion, for which -- is appropiate */
-											--myBias;
-										}
+										
 										/* find position of insertion */
 										gaps = pos;
 										if(pos != 0) {
@@ -1320,7 +1318,7 @@ void alnToMat(AssemInfo *matrix, Assem *aligned_assem, Aln *aligned, AlnScore al
 	
 	static volatile int Lock = 0;
 	volatile int *excludeMatrix = &Lock;
-	int i, pos, aln_len, start, read_score, myBias, gaps;
+	int i, pos, aln_len, start, read_score, myBias, tmp, gaps;
 	short unsigned *counts;
 	Assembly *assembly;
 	
@@ -1339,8 +1337,23 @@ void alnToMat(AssemInfo *matrix, Assem *aligned_assem, Aln *aligned, AlnScore al
 	}
 	++aligned_assem->readCountAln;
 	
-	/* diff */
+	/* trim trailing gaps */
+	i = aln_len - 1;
+	while(i && (aligned->t[i] == 5 || aligned->q[i] == 5)) {
+		--i;
+	}
+	aln_len = i + 1;
+	
+	/* trim leading gaps */
 	i = 0;
+	while(i < aln_len && (aligned->t[i] == 5 || aligned->q[i] == 5)) {
+		if(aligned->q[i] == 5) {
+			++start;
+		}
+		++i;
+	}
+	
+	/* diff */
 	pos = start;
 	assembly = matrix->assmb;
 	while(i < aln_len) {
@@ -1356,20 +1369,29 @@ void alnToMat(AssemInfo *matrix, Assem *aligned_assem, Aln *aligned, AlnScore al
 				gaps = pos;
 				pos = pos ? (pos - 1) : (t_len - 1);
 				
-				/* find position of insertion, it it already exists */
+				/* find position of insertion, if it already exists */
 				while(assembly[pos].next != gaps) {
 					pos = assembly[pos].next;
 				}
 				
 				/* get number of bases not supporting the insertion */
 				counts = assembly[pos].counts;
-				myBias = counts[0] + counts[1] + counts[2] + counts[3] + counts[4] + counts[5] - 1;
+				myBias = *counts;
+				myBias += *++counts;
+				myBias += *++counts;
+				myBias += *++counts;
+				myBias += *++counts;
+				myBias += *++counts;
 				
 				/* get minimum of bases sorrounding new insertion */
 				counts = assembly[gaps].counts;
-				if((counts[0] + counts[1] + counts[2] + counts[3] + counts[4] + counts[5]) < myBias) {
-					myBias = counts[0] + counts[1] + counts[2] + counts[3] + counts[4] + counts[5];
-				}
+				tmp = *counts;
+				tmp += *++counts;
+				tmp += *++counts;
+				tmp += *++counts;
+				tmp += *++counts;
+				tmp += *++counts;
+				myBias = (tmp < myBias) ? tmp : (myBias - 1);
 				if(USHRT_MAX < myBias) {
 					myBias = USHRT_MAX;
 				}
@@ -1443,15 +1465,33 @@ void alnToMatDense(AssemInfo *matrix, Assem *aligned_assem, Aln *aligned, AlnSco
 	}
 	++aligned_assem->readCountAln;
 	
+	/* trim trailing gaps */
+	i = aln_len - 1;
+	while(i < aln_len && (aligned->t[i] == 5 || aligned->q[i] == 5)) {
+		--i;
+	}
+	aln_len = i + 1;
+	
+	/* trim leading gaps */
+	i = 0;
+	while(i && (aligned->t[i] == 5 || aligned->q[i] == 5)) {
+		if(aligned->q[i] == 5) {
+			++start;
+		}
+		++i;
+	}
+	
 	/* diff */
+	pos = start;
 	assembly = matrix->assmb;
-	for(i = 0, pos = start; i < aln_len; ++i) {
+	while(i < aln_len) {
 		if(aligned->t[i] != 5) {
 			if(!++assembly[pos].counts[aligned->q[i]]) {
 				assembly[pos].counts[aligned->q[i]] = USHRT_MAX;	
 			}
 			pos = assembly[pos].next;
 		}
+		++i;
 	}
 	unlock(excludeMatrix);
 }


=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+kma (1.4.21-1) unstable; urgency=medium
+
+  * New upstream version 1.4.21
+  * d/control: declare compliance to standards version 4.7.2.
+  * typos.patch: delete: applied upstream.
+
+ -- Étienne Mollier <emollier at debian.org>  Wed, 05 Mar 2025 13:46:24 +0100
+
 kma (1.4.19-1) unstable; urgency=medium
 
   * New upstream version 1.4.19


=====================================
debian/control
=====================================
@@ -7,7 +7,7 @@ Priority: optional
 Build-Depends: debhelper-compat (= 13),
                architecture-is-64-bit,
                zlib1g-dev
-Standards-Version: 4.7.1
+Standards-Version: 4.7.2
 Vcs-Browser: https://salsa.debian.org/med-team/kma
 Vcs-Git: https://salsa.debian.org/med-team/kma.git
 Homepage: https://bitbucket.org/genomicepidemiology/kma


=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
 blhc.patch
-typos.patch


=====================================
debian/patches/typos.patch deleted
=====================================
@@ -1,39 +0,0 @@
-Description: fix typos caught by lintian.
-Author: Étienne Mollier <emollier at debian.org>
-Forwarded: https://bitbucket.org/genomicepidemiology/kma/issues/92/typos-caught-by-lintian
-Last-Update: 2025-02-26
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- kma.orig/index.c
-+++ kma/index.c
-@@ -676,7 +676,7 @@
- 	/* decontaminate */
- 	if(deconcount != 0) {
- 		/* open values */
--		fprintf(stderr, "# Openning values\n");
-+		fprintf(stderr, "# Opening values\n");
- 		if(!finalDB) {
- 			strcat(outputfilename, ".comp.b");
- 			out = sfopen(outputfilename, "rb");
---- kma.orig/kma.c
-+++ kma/kma.c
-@@ -164,7 +164,7 @@
- 	fprintf(out, "# %16s\t%-32s\t%s\n", "-1t1", "One query to one template", "False");
- 	fprintf(out, "# %16s\t%-32s\t%s\n", "-hmm", "Use a HMM to assign template(s)", "False");
- 	fprintf(out, "# %16s\t%-32s\t%s\n", "-ck", "Count k-mers over pseudo alignment", "False");
--	fprintf(out, "# %16s\t%-32s\t%s\n", "-localopen", "Penalty for openning a local chain", "6");
-+	fprintf(out, "# %16s\t%-32s\t%s\n", "-localopen", "Penalty for opening a local chain", "6");
- 	fprintf(out, "# %16s\t%-32s\t%s\n", "-mct", "Max overlap between templates", "0.1");
- 	fprintf(out, "# %16s\t%-32s\t%s\n", "-lc", "Length corrected template chaining", "False");
- 	
---- kma.orig/update.c
-+++ kma/update.c
-@@ -238,7 +238,7 @@
- 	} else {
- 		helpOut = stderr;
- 	}
--	fprintf(helpOut, "# KMA_update syncronises kma-indexes to the needed version.\n");
-+	fprintf(helpOut, "# KMA_update synchronises kma-indexes to the needed version.\n");
- 	fprintf(helpOut, "# Options are:\t\tDesc:\t\t\t\t\tRequirements:\n");
- 	fprintf(helpOut, "#\n");
- 	fprintf(helpOut, "#\t-t_db\t\tTemplate DB\t\t\t\tREQUIRED\n");


=====================================
index.c
=====================================
@@ -676,7 +676,7 @@ int index_main(int argc, char *argv[]) {
 	/* decontaminate */
 	if(deconcount != 0) {
 		/* open values */
-		fprintf(stderr, "# Openning values\n");
+		fprintf(stderr, "# Opening values\n");
 		if(!finalDB) {
 			strcat(outputfilename, ".comp.b");
 			out = sfopen(outputfilename, "rb");


=====================================
kma.c
=====================================
@@ -164,7 +164,7 @@ static void helpMessage(int exitStatus) {
 	fprintf(out, "# %16s\t%-32s\t%s\n", "-1t1", "One query to one template", "False");
 	fprintf(out, "# %16s\t%-32s\t%s\n", "-hmm", "Use a HMM to assign template(s)", "False");
 	fprintf(out, "# %16s\t%-32s\t%s\n", "-ck", "Count k-mers over pseudo alignment", "False");
-	fprintf(out, "# %16s\t%-32s\t%s\n", "-localopen", "Penalty for openning a local chain", "6");
+	fprintf(out, "# %16s\t%-32s\t%s\n", "-localopen", "Penalty for opening a local chain", "6");
 	fprintf(out, "# %16s\t%-32s\t%s\n", "-mct", "Max overlap between templates", "0.1");
 	fprintf(out, "# %16s\t%-32s\t%s\n", "-lc", "Length corrected template chaining", "False");
 	


=====================================
update.c
=====================================
@@ -238,7 +238,7 @@ static void helpMessage(int exeStatus) {
 	} else {
 		helpOut = stderr;
 	}
-	fprintf(helpOut, "# KMA_update syncronises kma-indexes to the needed version.\n");
+	fprintf(helpOut, "# KMA_update synchronises kma-indexes to the needed version.\n");
 	fprintf(helpOut, "# Options are:\t\tDesc:\t\t\t\t\tRequirements:\n");
 	fprintf(helpOut, "#\n");
 	fprintf(helpOut, "#\t-t_db\t\tTemplate DB\t\t\t\tREQUIRED\n");


=====================================
version.h
=====================================
@@ -17,4 +17,4 @@
  * limitations under the License.
 */
 
-#define KMA_VERSION "1.4.19"
+#define KMA_VERSION "1.4.21"



View it on GitLab: https://salsa.debian.org/med-team/kma/-/compare/242c7aef74ffabba4b576e619b344a080248f674...02d24d580eb6a217aee7d09f2b349f28bec1cfac

-- 
View it on GitLab: https://salsa.debian.org/med-team/kma/-/compare/242c7aef74ffabba4b576e619b344a080248f674...02d24d580eb6a217aee7d09f2b349f28bec1cfac
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/20250305/79de9085/attachment-0001.htm>


More information about the debian-med-commit mailing list