Repository 'colocalization_viz'
hg clone https://toolshed.g2.bx.psu.edu/repos/thomaswollmann/colocalization_viz

Changeset 0:9174e8eaa1e1 (2019-01-16)
Commit message:
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/colocalization_viz/ commit d93e1dd276027cfc3fb518236110395a23d96f66
added:
colocalization_viz.py
colocalization_viz.xml
test-data/out.png
test-data/sample1.tiff
test-data/sample2.tiff
b
diff -r 000000000000 -r 9174e8eaa1e1 colocalization_viz.py
--- /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)
b
diff -r 000000000000 -r 9174e8eaa1e1 colocalization_viz.xml
--- /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>
b
diff -r 000000000000 -r 9174e8eaa1e1 test-data/out.png
b
Binary file test-data/out.png has changed
b
diff -r 000000000000 -r 9174e8eaa1e1 test-data/sample1.tiff
b
Binary file test-data/sample1.tiff has changed
b
diff -r 000000000000 -r 9174e8eaa1e1 test-data/sample2.tiff
b
Binary file test-data/sample2.tiff has changed