diff cellprofiler.xml @ 0:ba4fd9fbf924 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 6d73056a625002d0275b5a9a90a9fae329ce47f1"
author bgruening
date Thu, 26 Mar 2020 17:14:42 -0400
parents
children 78a16d8c8d5e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cellprofiler.xml	Thu Mar 26 17:14:42 2020 -0400
@@ -0,0 +1,129 @@
+<tool id="cp_cellprofiler" name="cellProfiler" version="@CP_VERSION@">
+    <description>runs a cellProfiler pipeline assembled by all the cellProfiler tools upstream in the workflow</description>
+    <macros>
+        <import>macros.xml</import>
+        <xml name="test_assert_content" token_n="291">
+            <assert_contents>
+                <has_n_lines n="@N@" />
+            </assert_contents>
+        </xml>
+    </macros>
+    <expand macro="cp_requirements" />
+    <command detect_errors="aggressive"><![CDATA[
+        bash '$script_file' &&
+        cellprofiler -c -r --file-list list.txt -o ./output -p '$pipeline' 
+        #if '$detailed_output'
+            -L 10 > ./cp.log 2>&1
+        #end if 
+    ]]></command>
+    <configfiles>
+        <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
+
+find `pwd`/input -name "*.*" > list.txt
+        </configfile>
+    </configfiles>
+  
+    <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" />
+        <param name="detailed_output" type="boolean" label="Detailed logging file?" help="If set, a detailed cellprofiler log file will be generated." />
+    </inputs>
+
+    <outputs>
+        <collection name="pipeline_output" type="list" label="Cellprofiler pipeline output files">
+            <discover_datasets pattern="__designation_and_ext__" visible="false" directory="output"/>
+        </collection>
+        <data format="txt" name="logs" from_work_dir="cp.log" label="CellProfiler log">
+            <filter>detailed_output</filter>
+        </data>
+    </outputs>
+
+    <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" />
+            <param name="detailed_output" value="False" />
+            <output_collection name="pipeline_output" type="list" count="7">
+                <element name="AS_09125_050116030001_D03f00d0.tif_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" />
+            <param name="input_images" value="images/AS_09125_050116030001_D03f00d0.tif,images/AS_09125_050116030001_D03f00d1.tif,images/AS_09125_050116030001_D03f00d2.tif" />
+            <param name="detailed_output" value="True" />
+            <output_collection name="pipeline_output" type="list" count="7">
+                <element name="AS_09125_050116030001_D03f00d0.tif_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>
+    This tool runs a cellProfiler @CP_VERSION@ pipeline file. 
+
+    *** Parameters ***
+
+    images: multi-select image files
+    
+    pipeline: cellProfiler pipeline file(.cppipe) file.
+
+    *** Note ***
+
+    Only version @CP_VERSION@ pipeline can be run, other versions may cause problems.
+
+    </help>
+    <expand macro="citations" />
+</tool>