Next changeset 1:fc85eb253163 (2019-07-22) |
Commit message:
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/colocalization_viz/ commit c3f4b766f03770f094fda6bda0a5882c0ebd4581 |
added:
colocalization_viz.py colocalization_viz.xml test-data/out.png test-data/sample1.tiff test-data/sample2.tiff |
b |
diff -r 000000000000 -r 9ddb11b272ee colocalization_viz.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colocalization_viz.py Sat Feb 09 14:32:01 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 9ddb11b272ee colocalization_viz.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colocalization_viz.xml Sat Feb 09 14:32:01 2019 -0500 |
[ |
@@ -0,0 +1,34 @@ +<tool id="ip_colocalization" name="Colocalization" version="0.0.6"> + <description>of two segmentation maps</description> + <requirements> + <requirement type="package" version="0.14.2">scikit-image</requirement> + <requirement type="package" version="1.15.4">numpy</requirement> + </requirements> + <command detect_errors="aggressive"> + <![CDATA[ + python '$__tool_directory__/colocalization_viz.py' '$input_mask1' '$input_mask2' ./out.png + ]]> + </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" from_work_dir="out.png"/> + </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> + **What it does** + + 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 9ddb11b272ee test-data/out.png |
b |
Binary file test-data/out.png has changed |
b |
diff -r 000000000000 -r 9ddb11b272ee test-data/sample1.tiff |
b |
Binary file test-data/sample1.tiff has changed |
b |
diff -r 000000000000 -r 9ddb11b272ee test-data/sample2.tiff |
b |
Binary file test-data/sample2.tiff has changed |