diff cellprofiler.xml @ 3:a98608f3abc5 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c3917e27eb1c1deeb381aa0dc8161c07699562fb"
author bgruening
date Mon, 11 May 2020 07:50:04 -0400
parents 78a16d8c8d5e
children fca368c99299
line wrap: on
line diff
--- a/cellprofiler.xml	Thu Apr 16 05:40:08 2020 -0400
+++ b/cellprofiler.xml	Mon May 11 07:50:04 2020 -0400
@@ -20,9 +20,14 @@
         <configfile name="script_file">
 mkdir ./input
 mkdir ./output
-#for $i, $filename in enumerate($input_images):
-    ln -s '$filename' './input/${filename.element_identifier}.${filename.ext}'
-#end for
+
+#if $con_input_type.input_type =="yes"
+    tar -C ./input -xvf $con_input_type.input_images
+#else
+    #for $i, $filename in enumerate($con_input_type.input_images):
+        ln -s '$filename' './input/${filename.element_identifier}.${filename.ext}'
+    #end for
+#end if
 
 find `pwd`/input -name "*.*" > list.txt
         </configfile>
@@ -30,7 +35,19 @@
   
     <inputs>
         <param name="pipeline" type="data" format="txt" label="Pipeline file" help="A ready-to-run .cppipe file. It can be created with various CellProfiler modules." />
-        <param name="input_images" type="data" multiple="true" format="@FORMATS@" label="Images" />
+        <conditional name="con_input_type">
+            <param name="input_type" type="select" label="Are the input images packed into a tar archive?">
+                <option value="yes">Yes</option>
+                <option value="no">No</option>
+            </param> 
+            <when value="no">
+                <param name="input_images" type="data" multiple="true" format="@FORMATS@" label="Images" />
+            </when>
+            <when value="yes">
+                <param name="input_images" type="data" format="tar" label="A tarball of images" />
+            </when>
+        </conditional>
+       
         <param name="detailed_output" type="boolean" label="Detailed logging file?" help="If set, a detailed CellProfiler log file will be generated." />
     </inputs>
 
@@ -46,7 +63,10 @@
     <tests>
         <test expect_num_outputs="1">
             <param name="pipeline" value="ExampleHuman.cppipe" />
-            <param name="input_images" value="images/AS_09125_050116030001_D03f00d0.tif,images/AS_09125_050116030001_D03f00d1.tif,images/AS_09125_050116030001_D03f00d2.tif" />
+            <conditional name="con_input_type">
+                <param name="input_type" value="no" />
+                <param name="input_images" value="images/AS_09125_050116030001_D03f00d0.tif,images/AS_09125_050116030001_D03f00d1.tif,images/AS_09125_050116030001_D03f00d2.tif" />
+            </conditional>
             <param name="detailed_output" value="False" />
             <output_collection name="pipeline_output" type="list" count="7">
                 <element name="AS_09125_050116030001_D03f00d0.tif_Overlay">
@@ -76,7 +96,10 @@
         </test>
         <test expect_num_outputs="2">
             <param name="pipeline" value="ExampleHuman.cppipe" />
-            <param name="input_images" value="images/AS_09125_050116030001_D03f00d0.tif,images/AS_09125_050116030001_D03f00d1.tif,images/AS_09125_050116030001_D03f00d2.tif" />
+            <conditional name="con_input_type">
+                <param name="input_type" value="no" />
+                <param name="input_images" value="images/AS_09125_050116030001_D03f00d0.tif,images/AS_09125_050116030001_D03f00d1.tif,images/AS_09125_050116030001_D03f00d2.tif" />
+            </conditional>
             <param name="detailed_output" value="True" />
             <output_collection name="pipeline_output" type="list" count="7">
                 <element name="AS_09125_050116030001_D03f00d0.tif_Overlay">
@@ -109,6 +132,79 @@
                 </assert_contents>
             </output>
         </test>
+        <!-- Repeat tests for tarball input -->
+        <test expect_num_outputs="1">
+            <param name="pipeline" value="ExampleHuman.cppipe" />
+            <conditional name="con_input_type">
+                <param name="input_type" value="yes" />
+                <param name="input_images" value="images.tar" />
+            </conditional>
+            <param name="detailed_output" value="False" />
+            <output_collection name="pipeline_output" type="list" count="7">
+                <element name="AS_09125_050116030001_D03f00d0_Overlay">
+                    <assert_contents>
+                      <has_size value="183808"/>
+                    </assert_contents>
+                </element>
+                <element name="Cells">
+                    <expand macro="test_assert_content" n="290" />
+                </element>
+                <element name="Cytoplasm">
+                  <expand macro="test_assert_content" n="290" />
+                </element>
+                <element name="Experiment">
+                  <expand macro="test_assert_content" n="259" />
+                </element>
+                <element name="Image">
+                  <expand macro="test_assert_content" n="2" />
+                </element>
+                <element name="Nuclei">
+                  <expand macro="test_assert_content" n="290" />
+                </element>
+                <element name="PH3">
+                  <expand macro="test_assert_content" n="21" />
+                </element>
+            </output_collection>
+        </test>
+        <test expect_num_outputs="2">
+            <param name="pipeline" value="ExampleHuman.cppipe" />
+            <conditional name="con_input_type">
+                <param name="input_type" value="yes" />
+                <param name="input_images" value="images.tar" />
+            </conditional>
+            <param name="detailed_output" value="True" />
+            <output_collection name="pipeline_output" type="list" count="7">
+                <element name="AS_09125_050116030001_D03f00d0_Overlay">
+                    <assert_contents>
+                      <has_size value="183808"/>
+                    </assert_contents>
+                </element>
+                <element name="Cells">
+                    <expand macro="test_assert_content" n="290" />
+                </element>
+                <element name="Cytoplasm">
+                  <expand macro="test_assert_content" n="290" />
+                </element>
+                <element name="Experiment">
+                  <expand macro="test_assert_content" n="259" />
+                </element>
+                <element name="Image">
+                  <expand macro="test_assert_content" n="2" />
+                </element>
+                <element name="Nuclei">
+                  <expand macro="test_assert_content" n="290" />
+                </element>
+                <element name="PH3">
+                  <expand macro="test_assert_content" n="21" />
+                </element>
+            </output_collection>
+            <output name="logs" ftype='txt'>
+                <assert_contents>
+                    <has_text_matching expression="JVM will be started with AWT in headless mode" />
+                </assert_contents>
+            </output>
+        </test>        
+
     </tests>
     
     <help>