changeset 2:e660e8605dd8 draft

"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/tarfast5 commit 62909f7108d2d371e6461a4e3f8040ebb54f1ec0"
author artbio
date Sun, 16 May 2021 18:20:09 +0000
parents 436f11e1ed6d
children 75ae798e310b
files archive.tar archive.tar.gz tarfast5.xml test-data/F1.fast5.h5 test-data/F1_filename_mapping.txt test-data/F2.fast5.h5 test-data/F2_filename_mapping.txt test-data/archive.tar test-data/archive.tar.gz
diffstat 7 files changed, 36 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tarfast5.xml	Thu May 06 23:12:50 2021 +0000
+++ b/tarfast5.xml	Sun May 16 18:20:09 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="tarfast5" name="tarfast5" version="0.4">
+<tool id="tarfast5" name="tarfast5" version="0.5.2">
   <description></description>
   <requirements>
         <requirement type="package" version="2.6">pigz</requirement>
@@ -11,21 +11,42 @@
         #for $file in $inputs:
             ln -s $file ${file.element_identifier}.h5 &&
         #end for
+        #if $output_format == "gzip":
             export PIGZ="-p \${GALAXY_SLOTS:-4}" &&
-            tar -cvh --use-compress-program=pigz -f $compressed_output *.h5
+            tar -cvh --use-compress-program=pigz -f $output *.h5
+        #else:
+            tar -cvh -f $output *.h5
+        #end if
   ]]></command>
  <inputs>
     <param name="inputs" type="data" format="h5" label="fast5 sequence files" multiple="true" />
+    <param name="output_format" type="select" label="compression of the tar archive" display="radio">
+        <option value="tar">tar (no compression)</option>
+        <option value="gzip" selected="true">tar.gz</option>
+    </param>
  </inputs>
 
  <outputs>
-    <data format="fast5.tar.gz" name="compressed_output" label="tar.gz archive of fast5" />
+    <data format="fast5.tar" name="output" label="Archive of fast5" >
+        <change_format>
+            <when input="output_format" value="gzip" format="fast5.tar.gz"/>
+        </change_format>
+    </data>
+
+
 </outputs>
 
     <tests>
-        <test> <!-- 0 -->
+        <test> <!-- tar -->
+            <param name="inputs" value="F1.fast5.h5" ftype="h5" />
+            <param name="output_format" value="tar" />
+            <output file="archive.tar" name="output" compare="sim_size" delta="3000" />
+        </test>
+
+        <test> <!-- tar.gz -->
             <param name="inputs" value="F1.fast5.h5,F2.fast5.h5" ftype="h5" />
-            <output file="archive.tar.gz" name="compressed_output" compare="sim_size" delta="3000" />
+            <param name="output_format" value="gzip" />
+            <output file="archive.tar.gz" name="output" compare="sim_size" delta="3000" />
         </test>
     </tests>
 <help>
Binary file test-data/F1.fast5.h5 has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/F1_filename_mapping.txt	Sun May 16 18:20:09 2021 +0000
@@ -0,0 +1,5 @@
+02184968-3def-4785-bd81-0bff70a57da4	batch0.fast5
+0335884d-20f0-4b7f-8f1c-ef57cd739ce6	batch0.fast5
+03bd0764-2e1f-4d60-841b-9519ea9d39cb	batch0.fast5
+07b9016b-e5db-449f-b161-79f17eae34df	batch0.fast5
+02343944-ac7b-41ac-85b9-dd0b040bfd6c	batch0.fast5
Binary file test-data/F2.fast5.h5 has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/F2_filename_mapping.txt	Sun May 16 18:20:09 2021 +0000
@@ -0,0 +1,5 @@
+03bd0764-2e1f-4d60-841b-9519ea9d39cb	batch0.fast5
+02343944-ac7b-41ac-85b9-dd0b040bfd6c	batch0.fast5
+02184968-3def-4785-bd81-0bff70a57da4	batch0.fast5
+07b9016b-e5db-449f-b161-79f17eae34df	batch0.fast5
+0335884d-20f0-4b7f-8f1c-ef57cd739ce6	batch0.fast5
Binary file test-data/archive.tar has changed
Binary file test-data/archive.tar.gz has changed