changeset 0:9174e8eaa1e1 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/colocalization_viz/ commit d93e1dd276027cfc3fb518236110395a23d96f66
author thomaswollmann
date Wed, 16 Jan 2019 15:33:42 -0500
parents
children
files colocalization_viz.py colocalization_viz.xml test-data/out.png test-data/sample1.tiff test-data/sample2.tiff
diffstat 5 files changed, 59 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/colocalization_viz.py	Wed Jan 16 15:33:42 2019 -0500
@@ -0,0 +1,25 @@
+import skimage.io
+import skimage.color
+import numpy as np
+import os
+import sys
+import warnings
+
+#TODO make importable by python script
+
+args = sys.argv
+
+def readImg(path):
+	img = skimage.io.imread(path)
+	if len(img.shape) > 2:
+		img = skimage.color.rgb2gray(img)
+	img = np.expand_dims(img > 0, 3)
+	return img
+
+im1 = readImg(args[1])
+im2 = readImg(args[2])
+res = np.concatenate((im1, im2, np.zeros_like(im1)), axis=2) * 1.0
+
+with warnings.catch_warnings():
+	warnings.simplefilter("ignore")
+	skimage.io.imsave(args[3], res)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/colocalization_viz.xml	Wed Jan 16 15:33:42 2019 -0500
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<tool name="Colocalization" id="ip_colocalization" version="0.0.6">
+   <description>Colocalization of two segmentation maps</description>
+  <requirements>
+    <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__/colocalization_viz.py' '$input_mask1' '$input_mask2' ./tmp.png
+    && mv ./tmp.png '$output'
+   ]]>
+   </command>
+   <inputs>
+      <param name="input_mask1" type="data" format="tiff" label="Mask1 Source File" />
+	    <param name="input_mask2" type="data" format="tiff" label="Mask2 Source File" />
+   </inputs>
+   <outputs>
+        <data format="png" name="output" />
+   </outputs>
+   <tests>
+    <test>
+      <param name="input_mask1" value="sample1.tiff"/>
+      <param name="input_mask2" value="sample2.tiff"/>
+      <output name="output" value="out.png" ftype="png" compare="sim_size"/>
+    </test>
+   </tests>
+   <help>
+      This tool overlays two segmentation maps and displays the colocalization results.
+   </help>
+   <citations>
+     <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
+ </citations>
+</tool>
Binary file test-data/out.png has changed
Binary file test-data/sample1.tiff has changed
Binary file test-data/sample2.tiff has changed