changeset 1:064b53fd3131 draft

planemo upload for repository hhttps://github.com/npinter/ROIsplitter commit e08a178a7c35c0673f6bfc163614a8fc730ffc6c
author galaxyp
date Wed, 14 Jun 2023 16:37:01 +0000
parents b5e9cebb27e3
children 7bee859bbd11
files qupath_roi_splitter.py qupath_roi_splitter.xml
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/qupath_roi_splitter.py	Tue Apr 25 09:30:06 2023 +0000
+++ b/qupath_roi_splitter.py	Wed Jun 14 16:37:01 2023 +0000
@@ -22,11 +22,11 @@
     tma_name = qupath_roi["name"]
     cell_types = [ct.rsplit(" - ", 1)[-1] for ct in qupath_roi["featureNames"]]
 
-    # create numpy array with white background
-    img = np.zeros((dim_plt[1], dim_plt[0], 3), dtype="uint8")
-    img.fill(255)
+    for cell_type in cell_types:
+        # create numpy array with white background
+        img = np.zeros((dim_plt[1], dim_plt[0], 3), dtype="uint8")
+        img.fill(255)
 
-    for cell_type in cell_types:
         for i, roi in enumerate(qupath_roi["features"]):
             if roi["properties"]["classification"]["name"] == cell_type:
                 if len(roi["geometry"]["coordinates"]) == 1:
--- a/qupath_roi_splitter.xml	Tue Apr 25 09:30:06 2023 +0000
+++ b/qupath_roi_splitter.xml	Wed Jun 14 16:37:01 2023 +0000
@@ -1,4 +1,4 @@
-<tool id="qupath_roi_splitter" name="QuPath ROI Splitter" version="0.1.0">
+<tool id="qupath_roi_splitter" name="QuPath ROI Splitter" version="0.1.0+galaxy1">
     <description>Split ROI coordinates of QuPath TMA annotation by cell type (classification)</description>
     <requirements>
         <requirement type="package" version="3.0.1">geojson</requirement>
@@ -34,8 +34,8 @@
                     <assert_contents>
                         <has_text text="x"/>
                         <has_text text="y"/>
-                        <has_text text="14240"/>
-                        <has_text text="21008"/>
+                        <has_text text="15561"/>
+                        <has_text text="21160"/>
                     </assert_contents>
                 </element>
             </output_collection>