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.
Hi Carl,
thanks a lot for the analysis of this bug. I'm unavailable for two days but
I hope some team member will care for the issue quickly.
Kind regards
Andreas.
We believe that the bug you reported is fixed in the latest version of
spades, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1010788@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Lance Lin <LQi254@protonmail.com> (supplier of updated spades package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 10 May 2022 20:15:40 +0700
Source: spades
Architecture: source
Version: 3.15.4+dfsg-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Lance Lin <LQi254@protonmail.com>
Closes: 1010788
Changes:
spades (3.15.4+dfsg-2) unstable; urgency=medium
.
* Team upload.
.
[ Lance Lin ]
* d/patches/0003_accept-system-bwa.patch - refactored 'which'
Closes: #1010788
.
[ Andreas Tille ]
* Review copyright
Checksums-Sha1:
663e611a1754cc7e10c53b87dcaddd875b095cc8 2386 spades_3.15.4+dfsg-2.dsc
35712b30fc13ce110f4cbdf07f520ed5c0bad509 28968 spades_3.15.4+dfsg-2.debian.tar.xz
5a73150776f81370ada75a1391de06367121a535 9361 spades_3.15.4+dfsg-2_amd64.buildinfo
Checksums-Sha256:
e8fd2386dff433abc5172c2594cf5e767ef830d58be6cc17996d2e60ec879b0a 2386 spades_3.15.4+dfsg-2.dsc
255bb5438cd1e70e4fab162d79812df8c5f183bdd1d9a2550c44d34ef0f63752 28968 spades_3.15.4+dfsg-2.debian.tar.xz
8ff6d7b9c24d54a37d8408b3bf3c64ddab53ea3b979a97c2281332ebad8305fc 9361 spades_3.15.4+dfsg-2_amd64.buildinfo
Files:
4022ea0253866bf5f73526bc29f8d869 2386 science optional spades_3.15.4+dfsg-2.dsc
f22e7979016cd11e96be848fedbc20b1 28968 science optional spades_3.15.4+dfsg-2.debian.tar.xz
3c2da0529297149f51311ed02be7db4d 9361 science optional spades_3.15.4+dfsg-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmJ+W8ERHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtGMABAAjNUAyH1kmaW2EiFoY0SLxHS/+6wcgfDZ
M3f7AnERVqaU0S0aNpnMs0j57xwwqTxl5VegPmcKmzaeShcXZZ+j6ogGYk1hU+BK
L/0uDr2EhoukUVgW9P6yL3x1lr5taM1uqu0/CiyNdqqQsNOSHXrAQKwmYb/mHB6X
5z+s56YE6HH3rJu3vEPRI03o7BIyhBlM2oA7js4xk4sJsaHqQJATU293F9kkyO0Y
Up4Xhi48zDcU6UkcQo34xNGn4OP85TZ6ZDp5INXYg2dl4OBOBrbKy3tl4hMncZMT
YHIKwc1y0Tb9jbZaODL2CZwwKP1FpOOBODVqWbm9lxXdoExEEWzRZckVvKSm7YEO
MyuEIhxY/foIAW8PkOm5kZ78x7Nt7DR6WqJAHPIEfYRF/7yW+gA6ae4mYwHWTb7r
JDqtAlp2dggkurmxpGSAMcuKmXvnA9roX2Gbb1ZMhk0iarAVgjKY42eFbUN37ZDu
dX4XO8hr5yzd2JhOyDG3rcjypDSTnvSniHUcYfLyptAAHo5b+NTc0RAEfLhtdC6X
bYJnE5cF49yRmNEuwIUwHB7LWKmWiFC63Y/l07mtZTxs28aEcVjDkLBzs/9xJDew
zyM7y+71qEiQkBrFCFXcN6cetdsihsUDOzLEtCFDe2eHyhGGgbokwZBlJXpYrQfU
Ed0jvhj/N18=
=rIaP
-----END PGP SIGNATURE-----