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

Changeset 6:34d51e66256c (2024-07-10)
Previous changeset 5:a68e128cdb1a (2024-05-01) Next changeset 7:4cd7884635c2 (2024-07-30)
Commit message:
planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/batched_lastz commit 2ab3532f7a45153eb0f945ac22c37cdcaea8c1e1
modified:
batched_lastz.xml
run_lastz_tarball.py
added:
test-data/input.tgz
test-data/output.maf.gz
b
diff -r a68e128cdb1a -r 34d51e66256c batched_lastz.xml
--- a/batched_lastz.xml Wed May 01 19:09:34 2024 +0000
+++ b/batched_lastz.xml Wed Jul 10 18:00:34 2024 +0000
[
@@ -17,10 +17,16 @@
         <param argument="--input" type="data" format="tgz" label="Tarball"/>
     </inputs>
     <outputs>
-        <data name="output" label="Output"/>
+        <data name="output" label="Output" format="maf"/>
     </outputs>
+    <tests>
+      <test expect_num_outputs="1">
+        <param name="input" value="input.tgz" ftype="tgz"/>
+        <output name="output" decompress="true" file="output.maf.gz" ftype="maf"/>
+      </test>
+    </tests>
     <help><![CDATA[
-    TODO: Fill in help.
+    Run batched lastz
     ]]></help>
     <expand macro="citations"/>
 </tool>
b
diff -r a68e128cdb1a -r 34d51e66256c run_lastz_tarball.py
--- a/run_lastz_tarball.py Wed May 01 19:09:34 2024 +0000
+++ b/run_lastz_tarball.py Wed Jul 10 18:00:34 2024 +0000
b
@@ -8,12 +8,12 @@
 import queue
 import re
 import shutil
+import subprocess
 import sys
-import subprocess
 import tarfile
 import tempfile
+import time
 import typing
-import time
 
 
 lastz_output_format_regex = re.compile(
@@ -69,7 +69,7 @@
             if stderr is not None:
                 try:
                     statinfo = os.stat(stderr, follow_symlinks=False)
-                except:
+                except Exception:
                     statinfo = None
 
                 if statinfo is None:
@@ -305,6 +305,7 @@
 
         for file_type, file_list in self.output_files.items():
             with open(f"output.{file_type}", "w") as ofh:
+                print("##maf version=1", file=ofh)
                 for filename in file_list:
                     with open(f"galaxy/files/{filename}") as ifh:
                         for line in ifh:
b
diff -r a68e128cdb1a -r 34d51e66256c test-data/input.tgz
b
Binary file test-data/input.tgz has changed
b
diff -r a68e128cdb1a -r 34d51e66256c test-data/output.maf.gz
b
Binary file test-data/output.maf.gz has changed