diff idr_download_by_ids.xml @ 4:11036f6197d6 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/idr_download commit 3c3f1023af1edb4c63f59f4311cc078d9e88923f"
author iuc
date Fri, 15 May 2020 14:54:02 -0400
parents 381f248febba
children e08b1dc0480c
line wrap: on
line diff
--- a/idr_download_by_ids.xml	Wed Apr 22 11:43:18 2020 -0400
+++ b/idr_download_by_ids.xml	Fri May 15 14:54:02 2020 -0400
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<tool id="idr_download_by_ids" name="IDR Download" version="0.30" profile="18.09">
+<tool id="idr_download_by_ids" name="IDR Download" version="0.40" profile="18.09">
     <description>- download images from the Image Data Resource using image IDs</description>
     <macros>
         <xml name="region_spec" token_pos="upper-left corner">
@@ -38,6 +38,7 @@
             ${clip_image.select} ${clip_image.x_coord} ${clip_image.y_coord} ${clip_image.width} ${clip_image.height}
         #end if
         $skip_failed
+        $download_tar
 
         2> >(tee -a $out_log >&2)
     ]]></command>
@@ -86,12 +87,20 @@
         <param name="skip_failed" type="boolean" checked="false" truevalue="--skip-failed" falsevalue=""
         label="Skip failed retrievals?"
         help="By default the tool will fail with an error on the first non-retrievable image ID. Here, you can choose to skip non-retrievable image IDs and continue downloading the available ones instead. The error log will contain warnings about failed IDs in this case." />
+        <param name="download_tar" type="boolean" checked="true" truevalue="--download-tar" falsevalue=""
+        label="Download images in a tarball?"
+        help="By default, the tool will download a tarball containing individual images into your Galaxy history. This option is strongly recommended, especially for a large number of files. With this option set to No, you will download a collection of images, only suggested for a small number of files." >
+        </param>
     </inputs>
     <outputs>
         <data name="out_log" format="txt" label="${tool.name} error log" />
         <collection name="output_file" type="list">
             <discover_datasets pattern="__name_and_ext__" directory="downloads" />
+            <filter>not download_tar</filter>
         </collection>
+        <data name="output_tar" format="tar" from_work_dir="./downloads/images.tar" label ="Images tarball">
+            <filter>download_tar</filter>
+        </data> 
     </outputs>
     <tests>
         <test>
@@ -106,6 +115,7 @@
                 <param name="height" value="5" />
             </conditional>
             <param name="frame" value="2" />
+            <param name="download_tar" value="false" />
             <output_collection name="output_file" type="list">
                 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/>
             </output_collection>
@@ -122,6 +132,7 @@
                 <param name="height" value="5" />
             </conditional>
             <param name="frame" value="2" />
+            <param name="download_tar" value="false" />
             <output_collection name="output_file" type="list">
                 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/>
             </output_collection>
@@ -138,6 +149,7 @@
                 <param name="height" value="5" />
             </conditional>
             <param name="frame" value="2" />
+            <param name="download_tar" value="false" />
             <output_collection name="output_file" type="list">
                 <element name="Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ__1884807__3__3__5__5" file="test1.tiff"/>
             </output_collection>
@@ -151,6 +163,7 @@
                 <param name="select" value="" />
             </conditional>
             <param name="frame" value="20" />
+            <param name="download_tar" value="false" />
             <output_collection name="output_file" type="list" count="3">
                 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
                     <assert_contents>
@@ -175,6 +188,7 @@
                 <param name="select" value="" />
             </conditional>
             <param name="frame" value="20" />
+            <param name="download_tar" value="false" />
         </test>
         <test>
             <!-- Repeat test with non-existing image-ID 9036708999,
@@ -188,6 +202,7 @@
             </conditional>
             <param name="frame" value="20" />
             <param name="skip_failed" value="true" />
+            <param name="download_tar" value="false" />
             <output_collection name="output_file" type="list" count="2">
                 <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
                     <assert_contents>
@@ -203,6 +218,31 @@
                 </assert_contents>
             </output>
         </test>
+        <test>
+            <!-- Test for download images in a tarball -->
+            <param name="source" value="dataset" />
+            <param name="id_spec" value="ids_tar.txt" />
+            <param name="channel" value="Hoechst" />
+            <conditional name="clip_image">
+                <param name="select" value="--rectangle" />
+                <param name="x_coord" value="0" />
+                <param name="y_coord" value="0" />
+                <param name="width" value="671" />
+                <param name="height" value="511" />
+            </conditional>
+            <param name="frame" value="0" />
+            <output name="output_tar">
+                    <assert_contents>
+                        <has_size value="1382400" />
+                        <has_archive_member path=".*/*__1828167__0__0__671__511.tiff" >
+                            <has_size value="685884" />
+                        </has_archive_member>
+                        <has_archive_member path=".*/*__1828658__0__0__671__511.tiff" >
+                            <has_size value="685884" />
+                        </has_archive_member>
+                    </assert_contents>
+            </output>
+        </test>
     </tests>
     <help><![CDATA[
 Download image data from the IDR_ (Image Data Resource) - a public repository