[Debian-med-packaging] Bug#1010788: spades: Mismatch correction / --careful mode broken by Debian patch

Carl Suster carl at contraflo.ws
Tue May 10 02:22:36 BST 2022


Package: spades
Version: 3.15.4+dfsg-1
Severity: normal

Dear Maintainer,

Using spades with the --careful flag triggers the following error:

    Traceback (most recent call last):
      File "/usr/libexec/spades/spades.py", line 683, in <module>
        main(sys.argv)
      File "/usr/libexec/spades/spades.py", line 621, in main
        cfg, dataset_data, command_line = parse_args(args, log)
      File "/usr/libexec/spades/spades.py", line 257, in parse_args
        options, cfg, dataset_data = options_parser.parse_args(log, bin_home, spades_home,
      File "/usr/share/spades/spades_pipeline/options_parser.py", line 1157, in parse_args
        add_to_cfg(cfg, log, bin_home, spades_home, options_storage.args)
      File "/usr/share/spades/spades_pipeline/options_parser.py", line 995, in add_to_cfg
        if which("bwa-spades"):
    NameError: name 'which' is not defined

Reproducible with e.g.:

    f="$(mktemp XXXX.fq)"
    echo -e "@a\nA\n+\n!" > "$f"
    spades --careful --12 "$f" -o "/tmp"

The code path related to that flag in options_parser.py has been patched in
Debian to add the call to which():

    https://salsa.debian.org/med-team/spades/-/blob/d3c54b2ae8f0ee29a639fe0246d670fcad54b45b/debian/patches/0003_accept-system-bwa.patch#L82-L95

When the patch was initially created in this commit:

    https://salsa.debian.org/med-team/spades/-/commit/ac1cfa145bf4066ca7f3af47db1aae6dd28ac5ab

the call and definition of which() were both in spades.py but the call was
later moved to options_parser.py while the definition was left behind unused.
Rather than adding multiple definitions of which() in the patch, the single
version in support.py could be imported wherever it needs to be used.


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.17.0-1-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages spades depends on:
ii  bamtools           2.5.1+dfsg-10+b1
ii  bwa                0.7.17-7
ii  libc6              2.33-7
ii  libgcc-s1          12.1.0-1
ii  libgomp1           12.1.0-1
ii  libnlopt0          2.7.1-4+b1
ii  libssw0            1.1-13
ii  libstdc++6         12.1.0-1
ii  python3            3.10.4-1+b1
ii  python3-distutils  3.9.12-1
ii  python3-joblib     0.17.0-4
ii  python3-yaml       5.4.1-1+b1
ii  samtools           1.13-4
ii  zlib1g             1:1.2.11.dfsg-4

spades recommends no packages.

spades suggests no packages.

-- no debconf information



More information about the Debian-med-packaging mailing list