changeset 1:3536648d0a93 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/\mergeneighboursinlabelimage commit d93e1dd276027cfc3fb518236110395a23d96f66
author thomaswollmann
date Wed, 16 Jan 2019 15:35:29 -0500
parents 66f7e94db2e6
children
files mergeneighboursinlabelimage.py mergeneighboursinlabelimage.xml test-data/galaxyIcon_noText.tif test-data/out.tiff
diffstat 4 files changed, 17 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/mergeneighboursinlabelimage.py	Tue Jan 08 08:54:16 2019 -0500
+++ b/mergeneighboursinlabelimage.py	Wed Jan 16 15:35:29 2019 -0500
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-
 import argparse
 import sys
 import skimage.io
@@ -46,6 +44,5 @@
     label_image = merge_n(label_image, args.cluster_merge)
     with warnings.catch_warnings():
     	warnings.simplefilter("ignore")
-    	res = skimage.util.img_as_uint(res)
-    	skimage.io.imsave("tmp.tiff", res)
-    os.rename("tmp.tiff", args.output_file.name)
+    	res = skimage.util.img_as_uint(label_image)
+    	skimage.io.imsave(args.out_file.name, res, plugin="tifffile")
--- a/mergeneighboursinlabelimage.xml	Tue Jan 08 08:54:16 2019 -0500
+++ b/mergeneighboursinlabelimage.xml	Wed Jan 16 15:35:29 2019 -0500
@@ -1,13 +1,13 @@
-<tool id="mergeneighboursinlabelimage" name="Merge Neighbours in Label" version="0.1">
+<tool id="mergeneighboursinlabelimage" name="Merge Neighbours in Label" version="0.2">
   <description>Merge Neighbours in Label Image</description>
   <requirements>
-    <requirement type="package" version="0.12.3" >scikit-image</requirement>
-    <requirement type="package">numpy</requirement>
-    <requirement type="package">scipy</requirement>
+    <requirement type="package" version="0.14.0">scikit-image</requirement>
+    <requirement type="package" version="1.15.4">numpy</requirement>
   </requirements>
   <command>
         <![CDATA[
-        python '$__tool_directory__/mergeneighboursinlabelimage.py '$input' '$output' -c $c
+        python '$__tool_directory__/mergeneighboursinlabelimage.py' '$input' ./tmp.tiff -c $c
+        && mv ./tmp.tiff '$output'
         ]]>
   </command>
   <inputs>
@@ -16,8 +16,16 @@
   </inputs>
   <outputs>
     <data format="tiff" name="output"/>
-  </outputs><help>This tools merges nearby objects in a label image using the minimum pixel distance.</help>
+  </outputs>
+  <tests>
+    <test>
+      <param name="input" value="galaxyIcon_noText.tif"/>
+      <param name="c" value="10"/>
+      <output name="output" file="out.tiff" ftype="tiff" compare="sim_size"/>
+    </test>
+  </tests>
+  <help>This tools merges nearby objects in a label image using the minimum pixel distance.</help>
   <citations>
-      <citation type="doi">10.7717/peerj.453</citation>
+      <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
   </citations>
 </tool>
Binary file test-data/galaxyIcon_noText.tif has changed
Binary file test-data/out.tiff has changed