[med-svn] [Git][med-team/umis][master] 3 commits: Fix dual index and dual UMI support
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Oct 20 13:16:53 BST 2026
Andreas Tille pushed to branch master at Debian Med / umis
Commits:
34467dd3 by Andreas Tille at 2026-10-20T14:13:14+02:00
Fix dual index and dual UMI support
Distinguish dual cellular indexes from dual UMIs to avoid a KeyError on
MB1 in fastqtransform.
Bug-Debian: https://bugs.debian.org/1089115
- - - - -
556b3684 by Andreas Tille at 2026-10-20T14:14:02+02:00
Make the test script fail on errors
Use set -e and let diff decide whether results match, so autopkgtest no
longer reports success after umis tracebacks.
Bug-Debian: https://bugs.debian.org/1089115
- - - - -
7dd090e8 by Andreas Tille at 2026-10-20T14:14:10+02:00
Close Debian bug #1089115 in changelog
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/dual-index-dual-umi.patch
- debian/patches/series
- + debian/patches/test-sh-fail-on-error.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -5,6 +5,9 @@ umis (1.0.9-3) UNRELEASED; urgency=medium
* Reformat the Last-Update date as ISO YYYY-MM-DD.
* Remove redundant Priority: optional from source stanza.
* Remove Rules-Requires-Root: no
+ * Fix dual index and dual UMI support (KeyError: 'MB1' in fastqtransform)
+ * Make test script fail on errors and fix result comparison
+ Closes: #1089115
-- Andreas Tille <tille at debian.org> Tue, 20 Oct 2026 13:11:15 +0200
=====================================
debian/patches/dual-index-dual-umi.patch
=====================================
@@ -0,0 +1,82 @@
+Description: Fix dual index and dual UMI support
+ Distinguish dual cellular indexes from dual UMIs. Previously any dual
+ index was treated as a dual UMI, which caused a KeyError: 'MB1' in
+ fastqtransform when only the cellular indexes were dual (for instance
+ with the STRT-Seq and Klein-inDrop example data).
+Author: Rory Kirchner <roryk at alum.mit.edu>
+Bug-Debian: https://bugs.debian.org/1089115
+Forwarded: https://github.com/vals/umis/commit/0a425e779f
+Last-Update: 2026-10-20
+
+--- a/umis/umis.py
++++ b/umis/umis.py
+@@ -206,7 +206,7 @@
+ elif options.CB or demuxed_cb:
+ logger.info("Detected cellular barcodes.")
+ read_template += ':CELL_{CB}'
+- if options.MB and options.dual_index:
++ if options.MB and options.dual_mb:
+ logger.info("Detected dual UMI.")
+ read_template += ':UMI_{MB1}-{MB2}'
+ elif options.MB:
+@@ -263,7 +263,7 @@
+ if demuxed_cb:
+ read1_dict['CB'] = demuxed_cb
+ read2_dict['CB'] = demuxed_cb
+- if options.dual_index and options.MB:
++ if options.dual_mb and options.MB:
+ read1_dict['MB'] = read1_dict['MB1'] + read2_dict['MB2']
+
+ # Deal with spaces in read names
+@@ -295,7 +295,7 @@
+ if demuxed_cb:
+ read1_dict['CB'] = demuxed_cb
+
+- if options.dual_index and options.MB:
++ if options.dual_mb and options.MB:
+ read1_dict['MB'] = read1_dict['MB1'] + read1_dict['MB2']
+
+ # Deal with spaces in read names
+@@ -320,13 +320,16 @@
+ figure out what transform options should be by examining the provided
+ regexes for keywords
+ """
+- TransformOptions = collections.namedtuple("TransformOptions",
+- ['CB', 'dual_index', 'triple_index', 'MB', 'SB'])
++ TransformOptions = collections.namedtuple(
++ "TransformOptions",
++ ['CB', 'dual_index', 'triple_index', 'MB', 'dual_mb', 'SB'],
++ )
+ CB = False
+ SB = False
+ MB = False
+ dual_index = False
+ triple_index = False
++ dual_mb = False
+ for rx in transform.values():
+ if not rx:
+ continue
+@@ -336,14 +339,21 @@
+ else:
+ dual_index = True
+ if "MB1" in rx:
+- dual_index = True
++ dual_mb = True
+ if "SB" in rx:
+ SB = True
+ if "CB" in rx:
+ CB = True
+ if "MB" in rx:
+ MB = True
+- return TransformOptions(CB=CB, dual_index=dual_index, triple_index=triple_index, MB=MB, SB=SB)
++ return TransformOptions(
++ CB=CB,
++ dual_index=dual_index,
++ triple_index=triple_index,
++ MB=MB,
++ dual_mb=dual_mb,
++ SB=SB,
++ )
+
+ def _extract_readnum(read_dict):
+ """Extract read numbers from old-style fastqs.
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,5 @@
pyhon3.12-syntax.patch
fix_bashism.patch
read_csv-no_squeeze.patch
+dual-index-dual-umi.patch
+test-sh-fail-on-error.patch
=====================================
debian/patches/test-sh-fail-on-error.patch
=====================================
@@ -0,0 +1,30 @@
+Description: Make the test script fail when a command fails
+ The test script did not stop on errors, so autopkgtest reported success
+ even when umis crashed with a traceback. Enable set -e and let diff
+ itself decide whether the results match instead of testing its unquoted
+ command substitution, which produced "[: Files: unexpected operator".
+Author: Andreas Tille <tille at debian.org>
+Bug-Debian: https://bugs.debian.org/1089115
+Last-Update: 2026-10-20
+
+--- a/test.sh
++++ b/test.sh
+@@ -1,6 +1,7 @@
+ #!/bin/sh
++set -e
+
+-rm -r tests/results
++rm -rf tests/results
+ mkdir -p tests/results
+
+ umis fastqtransform \
+@@ -195,8 +196,7 @@
+ umis sparse examples/tagcount/tagcount-example.csv tests/results/test25.mtx
+
+ # only display diff output if there are differences
+-if [ $(diff -rq tests/results tests/correct) ] ; then
+- diff -rq tests/results tests/correct
++if ! diff -rq tests/results tests/correct ; then
+ exit 1
+ else
+ echo "Tests passed."
View it on GitLab: https://salsa.debian.org/med-team/umis/-/compare/f336bfe2fd0d37713072f3130f4f00e65fa797ed...7dd090e81a511196cd2b12d10b8e79ee3e60fcec
--
View it on GitLab: https://salsa.debian.org/med-team/umis/-/compare/f336bfe2fd0d37713072f3130f4f00e65fa797ed...7dd090e81a511196cd2b12d10b8e79ee3e60fcec
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261020/6a4f8d61/attachment-0001.htm>
More information about the debian-med-commit
mailing list