Repository 'batched_lastz'
hg clone https://toolshed.g2.bx.psu.edu/repos/richard-burhans/batched_lastz

Changeset 8:3a67d287d19f (2024-08-09)
Previous changeset 7:4cd7884635c2 (2024-07-30) Next changeset 9:1ac663f6a344 (2024-08-12)
Commit message:
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/batched_lastz commit a5a11ffe6ec0c36c5997499a50d58c38c36d54ec
modified:
run_lastz_tarball.py
b
diff -r 4cd7884635c2 -r 3a67d287d19f run_lastz_tarball.py
--- a/run_lastz_tarball.py Tue Jul 30 19:53:53 2024 +0000
+++ b/run_lastz_tarball.py Fri Aug 09 21:10:40 2024 +0000
[
@@ -40,7 +40,7 @@
         if not command_dict:
             return
 
-        args = ["lastz"]
+        args = ["lastz", "--allocate:traceback=1.99G"]
         args.extend(command_dict["args"])
 
         stdin = command_dict["stdin"]
@@ -62,9 +62,7 @@
             if var is not None:
                 var.close()
 
-        if p.returncode != 0:
-            sys.exit(f"command failed: {' '.join(args)}")
-        else:
+        if p.returncode == 0:
             stderr = command_dict["stderr"]
             if stderr is not None:
                 try:
@@ -81,6 +79,33 @@
             elapsed = time.perf_counter() - begin
             output_queue.put(elapsed)
 
+        elif p.returncode == 1:
+            # should be more robust
+            traceback_warning = True
+
+            stderr_file = command_dict["stderr"]
+            if stderr_file is None:
+                traceback_warning = False
+            else:
+                with open(stderr_file) as f:
+                    for stderr_line in f:
+                        for prefix in ["truncating alignment", "truncation can be reduced"]:
+                            if stderr_line.startswith(prefix):
+                                continue
+
+                        stderr_line = stderr_line.strip()
+                        if stderr_line:
+                            traceback_warning = False
+
+            if traceback_warning:
+                elapsed = time.perf_counter() - begin
+                output_queue.put(elapsed)
+            else:
+                sys.exit(f"command failed: {' '.join(args)}")
+
+        else:
+            sys.exit(f"command failed: {' '.join(args)}")
+
         if debug:
             print(f"runtime {elapsed}", file=sys.stderr, flush=True)