changeset 6:34d51e66256c draft

planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/batched_lastz commit 2ab3532f7a45153eb0f945ac22c37cdcaea8c1e1
author richard-burhans
date Wed, 10 Jul 2024 18:00:34 +0000
parents a68e128cdb1a
children 4cd7884635c2
files batched_lastz.xml run_lastz_tarball.py test-data/input.tgz test-data/output.maf.gz
diffstat 4 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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>
--- 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
@@ -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:
Binary file test-data/input.tgz has changed
Binary file test-data/output.maf.gz has changed