diff qupath_roi_splitter.xml @ 0:bd60d4542fd4 draft

planemo upload for repository hhttps://github.com/npinter/ROIsplitter commit cdf3e9652b10c7a0b179202129a797e32fd95909
author galaxyp
date Tue, 25 Apr 2023 09:29:53 +0000
parents
children f955895aed01
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qupath_roi_splitter.xml	Tue Apr 25 09:29:53 2023 +0000
@@ -0,0 +1,55 @@
+<tool id="qupath_roi_splitter" name="QuPath ROI Splitter" version="0.1.0">
+    <description>Split ROI coordinates of QuPath TMA annotation by cell type (classification)</description>
+    <requirements>
+        <requirement type="package" version="3.0.1">geojson</requirement>
+        <requirement type="package" version="1.24.2">numpy</requirement>
+        <requirement type="package" version="4.7.0">opencv</requirement>
+        <requirement type="package" version="2.0.0">pandas</requirement>        
+    </requirements>
+     <command detect_errors="exit_code"><![CDATA[
+        #for $input in $input_collection
+            python3 '$__tool_directory__/qupath_roi_splitter.py' --qupath_roi '$input' &&
+        #end for
+        mkdir out &&
+        mv *.txt out/
+    ]]></command>
+    <inputs>
+        <param name="input_collection" type="data_collection" format="geojson" label="Input QuPath annotation" help="Collection containing GeoJSON files"/>
+    </inputs>
+    <outputs>
+        <collection name="output_txts" type="list" label="${tool.name} on ${on_string}: ROI data">
+            <discover_datasets pattern="__name_and_ext__" directory="out" visible="false" format="txt"/>
+        </collection>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_collection">
+                <collection type="list">
+                    <element name="annotations_TMA_E-5.geojson" value="annotations_TMA_E-5.geojson" />
+                    <element name="annotations_TMA_F-5.geojson" value="annotations_TMA_F-5.geojson" />
+                </collection>
+            </param>
+            <output_collection name="output_txts" type="list" count="4">
+                <element name="F-5_Stroma">
+                    <assert_contents>
+                        <has_text text="x"/>
+                        <has_text text="y"/>
+                        <has_text text="14240"/>
+                        <has_text text="21008"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+        </test>
+    </tests>
+    <help><![CDATA[
+        **QuPath ROI Splitter**
+
+        This tool extracts ROI coordinates of QuPath TMA annotation by cell type.
+
+        Input: A collection containing GeoJSON files with QuPath annotation data. You need to run the QuPath TMA annotation script first which can be found at https://github.com/npinter/ROIsplitter.
+
+        Output: A list of text files containing the ROI coordinates for each cell type.
+
+        https://github.com/npinter/ROIsplitter
+    ]]></help>
+</tool>