comparison points2binaryimage.xml @ 4:4c0f16fb9f8d draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/points2binaryimage/ commit a3c77a79db469c9ad18b666f2c64d6e8f573945f
author imgteam
date Wed, 25 Sep 2024 08:29:59 +0000
parents a80f92ec6f89
children
comparison
equal deleted inserted replaced
3:a80f92ec6f89 4:4c0f16fb9f8d
1 <tool id="ip_points_to_binaryimage" name="Convert point coordinates to binary image" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05"> 1 <tool id="ip_points_to_binaryimage" name="Convert point coordinates to binary image" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05">
2 <description></description> 2 <description></description>
3 <macros> 3 <macros>
4 <import>creators.xml</import> 4 <import>creators.xml</import>
5 <token name="@TOOL_VERSION@">0.2</token> 5 <import>tests.xml</import>
6 <token name="@VERSION_SUFFIX@">3</token> 6 <token name="@TOOL_VERSION@">0.3</token>
7 <token name="@VERSION_SUFFIX@">0</token>
7 </macros> 8 </macros>
8 <creator> 9 <creator>
9 <expand macro="creators/bmcv" /> 10 <expand macro="creators/bmcv" />
10 </creator> 11 </creator>
11 <edam_operations> 12 <edam_operations>
13 </edam_operations> 14 </edam_operations>
14 <xrefs> 15 <xrefs>
15 <xref type="bio.tools">galaxy_image_analysis</xref> 16 <xref type="bio.tools">galaxy_image_analysis</xref>
16 </xrefs> 17 </xrefs>
17 <requirements> 18 <requirements>
18 <requirement type="package" version="0.14.2">scikit-image</requirement> 19 <requirement type="package" version="0.21">scikit-image</requirement>
19 <requirement type="package" version="1.15.4">numpy</requirement> 20 <requirement type="package" version="1.26.4">numpy</requirement>
20 <requirement type="package" version="0.23.4">pandas</requirement> 21 <requirement type="package" version="1.2.4">pandas</requirement>
21 <requirement type="package" version="2018.7">pytz</requirement><!--pandas seems to have additional requirements that are not automatically installed--> 22 <requirement type="package" version="2024.6.18">tifffile</requirement>
22 <requirement type="package" version="2.5.2">python-dateutil</requirement>
23 <requirement type="package" version="0.15.1">tifffile</requirement>
24 </requirements> 23 </requirements>
25 <command detect_errors="aggressive"> 24 <command detect_errors="aggressive"><![CDATA[
26 <![CDATA[ 25
27 python '$__tool_directory__/points2binaryimage.py' '$input' '$output' $shapex $shapey $has_header $invert_xy 26 python '$__tool_directory__/points2binaryimage.py'
28 ]]> 27 '$input'
29 </command> 28 '$output'
29 $shapex
30 $shapey
31 $has_header
32 $swap_xy
33
34 ]]></command>
30 <inputs> 35 <inputs>
31 <param name="input" type="data" format="tabular" label="CSV point file"/> 36 <param name="input" type="data" format="tabular" label="Tabular list of points"/>
32 <param name="shapex" type="integer" value="500" optional="true" min="1" max="2000" label="Width of output image" /> 37 <param name="shapex" type="integer" value="500" min="1" label="Width of output image" />
33 <param name="shapey" type="integer" value="500" optional="true" min="1" max="2000" label="Height of output image" /> 38 <param name="shapey" type="integer" value="500" min="1" label="Height of output image" />
34 <param name="has_header" type="boolean" checked="false" truevalue="--has_header True" falsevalue="" optional="true" label="Does point file contain header?" /> 39 <param name="has_header" type="boolean" checked="false" truevalue="--has_header True" falsevalue="" optional="true" label="Tabular list of points has header" />
35 <param name="invert_xy" type="boolean" checked="false" falsevalue="" truevalue="--invert_xy True" optional="true" label="Inverts x and y in CSV point file" /> 40 <param name="swap_xy" type="boolean" checked="false" falsevalue="" truevalue="--swap_xy True" optional="true" label="Swap X and Y coordinates" />
36 </inputs> 41 </inputs>
37 <outputs> 42 <outputs>
38 <data name="output" format="tiff" /> 43 <data name="output" format="tiff" />
39 </outputs> 44 </outputs>
40 <tests> 45 <tests>
46 <!-- TSV without header -->
41 <test> 47 <test>
42 <param name="input" value="points.tsv" /> 48 <param name="input" value="input1.tsv" />
43 <param name="shapex" value="20" /> 49 <param name="shapex" value="30" />
44 <param name="shapey" value="30" /> 50 <param name="shapey" value="20" />
45 <param name="has_header" value="false" /> 51 <param name="has_header" value="false" />
46 <param name="invert_xy" value="true" /> 52 <param name="swap_xy" value="true" />
47 <output name="output" ftype="tiff" file="out.tiff" compare="sim_size"/> 53 <expand macro="tests/binary_image_diff" name="output" value="output1.tif" ftype="tiff" />
54 </test>
55 <!-- TSV with header -->
56 <test>
57 <param name="input" value="input2.tsv" />
58 <param name="shapex" value="205" />
59 <param name="shapey" value="84" />
60 <param name="has_header" value="true" />
61 <param name="swap_xy" value="false" />
62 <expand macro="tests/binary_image_diff" name="output" value="output2.tif" ftype="tiff" />
48 </test> 63 </test>
49 </tests> 64 </tests>
50 <help> 65 <help>
51 66
52 This tool converts a CSV list of points to a binary image by rasterizing the point coordinates. 67 **Converts a tabular list of points to a binary image by rasterizing the point coordinates.**
53 68
54 The created image is a single-channel image with 16 bits per pixel (unsigned integer). 69 The created image is a single-channel image with 16 bits per pixel (unsigned integer).
55 The points are rasterized with value 32767 (white). 70 The points are rasterized with value 65535 (white).
56 Pixels not corresponding to any points in the CSV are assigned the value 0 (black). 71 Pixels not corresponding to any points in the tabular file are assigned the value 0 (black).
72
73 The tabular list of points can either be header-less.
74 In this case, the first and second columns are expected to be the X and Y coordinates, respectively.
75 Otherwise, if a header is present, it is searched for the following column names:
76
77 - ``pos_x`` or ``POS_X``: This column corresponds to the X coordinates.
78 - ``pos_y`` or ``POS_Y``: This column corresponds to the Y coordinates.
79 - If a ``radius`` or ``RADIUS`` column is present,
80 then the points will be rasterized as circles of the corresponding radii.
57 81
58 </help> 82 </help>
59 <citations> 83 <citations>
60 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation> 84 <citation type="doi">10.1016/j.jbiotec.2017.07.019</citation>
61 </citations> 85 </citations>