diff idr_download_by_ids.xml @ 10:4aed70472589 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/idr_download commit bb22e94226d3bcf241a6fe27e426b541a36a0815"
author iuc
date Wed, 24 Nov 2021 21:01:02 +0000
parents 80af973c5277
children cbd605a24336
line wrap: on
line diff
--- a/idr_download_by_ids.xml	Fri Feb 26 20:12:11 2021 +0000
+++ b/idr_download_by_ids.xml	Wed Nov 24 21:01:02 2021 +0000
@@ -16,7 +16,7 @@
         </xml>
     </macros>
     <requirements>
-        <requirement type="package" version="5.7.1">python-omero</requirement>
+        <requirement type="package" version="5.10.1">omero-py</requirement>
         <requirement type="package" version="0.4.2">pylibtiff</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
@@ -37,10 +37,15 @@
         #if str($image_ids.source) == 'link':
             python -c 'print("${image_ids.id_spec}".replace(",", "|").split("?show=")[-1].replace("|", "\n"))'
             ## https://idr.openmicroscopy.org/webclient/?show=image-3426274|image-3426275|image-3426276|image-3426277
+        #elif str($image_ids.source) == 'dataset':
+            cat '${image_ids.id_spec}'
         #else:
-            cat '${image_ids.id_spec}'
+            echo '${image_ids.id_dataset_omero}'
         #end if
         | python '$__tool_directory__/idr_download_by_ids.py' 
+        #if str($image_ids.source) == 'omeroDatasetID':
+            --dataset
+        #end if
         #set $channel = str($channel).strip()
         #if $channel:
             -c '$channel'
@@ -100,6 +105,7 @@
             <param name="source" type="select" label="How would you like to specify the IDs of images to download?">
                 <option value="link">As text (comma-separated list of IDs or a valid IDR link)</option>
                 <option value="dataset">As a dataset (one image ID per line)</option>
+                <option value="omeroDatasetID">All images from a single Dataset ID</option>
             </param>
             <when value="link">
                 <param name="id_spec" type="text"
@@ -114,6 +120,9 @@
                 <param name="id_spec" type="data" format="txt"
                 label="Select a dataset with image IDs (one per line)" />
             </when>
+            <when value="omeroDatasetID">
+                <param name="id_dataset_omero" type="integer" min = "0" value = "9059" label="Dataset ID"/>
+            </when>
         </conditional>
         <param name="channel" type="text"
         label="Name of the channel to download"
@@ -362,6 +371,37 @@
                 <has_text text="OMERO connection credentials are empty. Set your credentials via: User -> Preferences -> Manage Information" />
             </assert_stderr >
         </test>
+        <test>
+            <conditional name="omero_instance_type">
+                 <param name="omero_instance" value="idr" />
+            </conditional>
+            <!-- Test for download all images from a dataset -->
+            <param name="source" value="omeroDatasetID" />
+            <param name="id_dataset_omero" value="9059" />
+            <param name="download_tar" value="false" />
+            <output_collection name="output_file" type="list" count="4">
+                <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D__9036711__0__0__1024__1024">
+                    <assert_contents>
+                        <has_size value="2097286" />
+                    </assert_contents>
+                </element>
+                <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_D3D__9036708__0__0__1024__1024">
+                    <assert_contents>
+                        <has_size value="2097286" />
+                    </assert_contents>
+                </element>
+                <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_D3D_zproj__9036710__0__0__1024__1024">
+                    <assert_contents>
+                        <has_size value="2097286" />
+                    </assert_contents>
+                </element>
+                <element name="171101_LeadingEdgeDeletionPSMMovies01_15_R3D_REF__9036709__0__0__1024__1024">
+                    <assert_contents>
+                        <has_size value="2097286" />
+                    </assert_contents>
+                </element>
+            </output_collection>
+        </test>
     </tests>
     <help><![CDATA[
 Download image data from the IDR_ (Image Data Resource) - a public repository
@@ -391,6 +431,9 @@
 input field (comma or '|'-separated ), or as an input file (each ID on a
 separate line).
 
+Finally, if you want to download all images of a single dataset. Specify the id as 
+All images from a single Dataset ID.
+
 Most images in the IDR have more than two dimensions. Thus, there are
 parameters available which allow you to select a particular recording channel,
 z-plane or time frame to download.