Aaron M. Ucko pushed to branch master at Debian Med / kaptive
Commits: 61bc03e0 by Aaron M. Ucko at 2021-04-16T17:35:21-04:00 kaptive 0.7.3-3: Further extend crash recognition (#986592). d/p/extend_bad_versions: Account for crashes with error output too. If a relevant tblastn version failed with error text starting with "terminate called ", prepend the usual "tblastn crashed!" message. Team upload, urgency high. - - - - - 2 changed files: - debian/changelog - debian/patches/extend_bad_versions Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,13 @@ +kaptive (0.7.3-3) unstable; urgency=high + + * Team upload. + * d/p/extend_bad_versions: Account for crashes with error output too. + If a relevant tblastn version failed with error text starting with + "terminate called ", prepend the usual "tblastn crashed!" message. + (Closes: #986592.) + + -- Aaron M. Ucko <[email protected]> Fri, 16 Apr 2021 17:33:52 -0400 + kaptive (0.7.3-2) unstable; urgency=high * Team upload. ===================================== debian/patches/extend_bad_versions ===================================== @@ -8,12 +8,37 @@ from collections import OrderedDict from Bio import SeqIO -@@ -912,7 +913,7 @@ def get_blast_hits(database, query, thre +@@ -904,22 +905,27 @@ def get_blast_hits(database, query, thre + out, err = process.communicate() + out = convert_bytes_to_str(out) + err = convert_bytes_to_str(err) +- if err: +- quit_with_error(command[0] + ' encountered an error:\n' + err) +- if process.returncode != 0: ++ if err or process.returncode != 0: + msg = command[0] + ' crashed!\n' + # A known crash can occur with tblastn and recent versions of BLAST+ when multiple threads # are used. Check for this case and display an informative error message if so. version = get_blast_version(command[0]) - bad_version = (version == '2.4.0') or (version == '2.5.0') or (version == '2.6.0') +- if threads > 1 and bad_version: + bad_version = re.match(r'2\.(?:[4-9]|1[01])\.\d+$', version) - if threads > 1 and bad_version: ++ if threads > 1 and bad_version \ ++ and (not err or err.startswith("terminate called ")): msg += '\nYou are using BLAST+ v' + version + ' which may crash when running with ' msg += 'multiple threads.\n\n' + msg += 'To avoid this issue, try one of the following:\n' + msg += ' 1) Use an unaffected version of BLAST+ (v2.3.0 or earlier should work)\n' + msg += ' 2) Run Kaptive with "--threads 1" (will probably be slower)\n' +- quit_with_error(msg) ++ if err: ++ msg += "\nRaw error:\n" + err ++ quit_with_error(msg) ++ elif err: ++ quit_with_error(command[0] + ' encountered an error:\n' + err) ++ else: ++ quit_with_error(msg) + + if genes: + blast_hits = [GeneBlastHit(line) for line in line_iterator(out)] View it on GitLab: https://salsa.debian.org/med-team/kaptive/-/commit/61bc03e075a93af23653f5d3aabec210444f91a7 -- View it on GitLab: https://salsa.debian.org/med-team/kaptive/-/commit/61bc03e075a93af23653f5d3aabec210444f91a7 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
