comparison imagej2_analyze_particles_binary.xml @ 1:1dd5396c734a draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit 2afb24f3c81d625312186750a714d702363012b5"
author imgteam
date Mon, 28 Sep 2020 16:59:30 +0000
parents aeb9bb864b8c
children ae4ae9c5c56c
comparison
equal deleted inserted replaced
0:aeb9bb864b8c 1:1dd5396c734a
1 <?xml version='1.0' encoding='UTF-8'?>
2 <tool id="imagej2_analyze_particles_binary" name="Analyze particles" version="@WRAPPER_VERSION@.0"> 1 <tool id="imagej2_analyze_particles_binary" name="Analyze particles" version="@WRAPPER_VERSION@.0">
3 <description>of binary image</description> 2 <description>of binary image</description>
4 <macros> 3 <macros>
5 <import>imagej2_macros.xml</import> 4 <import>imagej2_macros.xml</import>
6 </macros> 5 </macros>
7 <expand macro="fiji_requirements" /> 6 <expand macro="fiji_requirements"/>
8 <command> 7 <command detect_errors="exit_code"><![CDATA[
9 <![CDATA[ 8 #import os
10 python $__tool_directory__/imagej2_analyze_particles_binary.py 9 #set input_sans_ext = $os.path.splitext($os.path.basename($input.file_name))[0]
11 --input "$input" 10 #set input_with_ext = '.'.join([input_sans_ext, $input.ext])
12 --input_datatype $input.ext 11 ln -s '$input.file_name' '$input_with_ext' &&
13 --black_background $black_background 12 #set output_log = 'output_log.txt'
14 --size "$size" 13 touch '$output_log' &&
15 --circularity_min $circularity_min 14 #if str($show) == 'Nothing':
16 --circularity_max $circularity_max 15 #set display_results = 'yes'
17 --show $show 16 #set all_results = 'yes'
18 --exclude_edges $exclude_edges 17 #set output_filename = ''
19 --include_holes $include_holes 18 #set output_datatype = ''
20 --jython_script $__tool_directory__/imagej2_analyze_particles_binary_jython_script.py 19 #set results_filename = $results
21 #if str($show) == 'Nothing': 20 #else:
22 --display_results "yes" 21 #set display_results = $display_results_cond.display_results
23 --all_results "yes" 22 #set all_results = $display_results_cond.all_results
23 #set output_filename = '.'.join(['output', $input.ext])
24 #set output_datatype = $input.ext
25 touch '$output_filename' &&
26 #if str($display_results_cond.display_results) == 'yes':
27 #set results_filename = $results
24 #else: 28 #else:
25 --display_results $display_results_cond.display_results 29 #set results_filename = ''
26 --all_results $display_results_cond.all_results
27 --output_datatype $output.ext
28 --output "$output"
29 #end if 30 #end if
30 --results "$results" 31 #end if
31 ]]> 32 ImageJ --ij2 --headless --debug
32 </command> 33 --jython '$__tool_directory__/imagej2_analyze_particles_binary_jython_script.py'
34 '$output_log'
35 '$input'
36 '$black_background'
37 '$size'
38 $circularity_min
39 $circularity_max
40 '$show'
41 '$display_results'
42 '$all_results'
43 '$exclude_edges'
44 '$include_holes'
45 '$output_filename'
46 '$output_datatype'
47 '$results_filename'
48 &>'$output_log';
49 #if str($output_filename) != '':
50 if [[ $? -ne 0 ]]; then
51 cat '$output_log' >&2;
52 else
53 mv '$output_filename' '$output';
54 fi
55 #else:
56 if [[ $? -ne 0 ]]; then
57 cat '$output_log' >&2;
58 fi
59 #end if
60 ]]></command>
33 <inputs> 61 <inputs>
34 <param format="bmp,eps,gif,jpg,pcx,pgm,png,psd,tiff" name="input" type="data" label="Select image"/> 62 <expand macro="param_input"/>
35 <expand macro="black_background_param" /> 63 <expand macro="black_background_param"/>
36 <param name="size" type="text" value="0-Infinity" label="Size (pixel^2)" help="Enter a single value and particles smaller than that value will be ignored."/> 64 <param name="size" type="text" value="0-Infinity" label="Size (pixel^2)" help="Enter a single value and particles smaller than that value will be ignored."/>
37 <param name="circularity_min" type="float" value="0.0" label="Circularity minimum" help="Values from 0.0 to 1.0, but less than maximum"> 65 <param name="circularity_min" type="float" value="0.0" label="Circularity minimum" help="Values from 0.0 to 1.0, but less than maximum">
38 <validator type="in_range" min="0" max="1"/> 66 <validator type="in_range" min="0" max="1"/>
39 </param> 67 </param>
40 <param name="circularity_max" type="float" value="1.0" label="Circularity maximum" help="Values from 0.0 to 1.0, but greater than minimum"> 68 <param name="circularity_max" type="float" value="1.0" label="Circularity maximum" help="Values from 0.0 to 1.0, but greater than minimum">
71 <option value="no" selected="True">No</option> 99 <option value="no" selected="True">No</option>
72 <option value="yes">Yes</option> 100 <option value="yes">Yes</option>
73 </param> 101 </param>
74 </inputs> 102 </inputs>
75 <outputs> 103 <outputs>
76 <data name="output" format_source="input" label="${tool.name} on ${on_string}"> 104 <data name="output" format_source="input">
77 <filter>show != "Nothing"</filter> 105 <filter>show != "Nothing"</filter>
78 </data> 106 </data>
79 <data format="tabular" name="results" label="${tool.name} on ${on_string}: Results"> 107 <data format="tabular" name="results" label="${tool.name} (results) on ${on_string}">
80 <filter>show == "Nothing" or display_results_cond['display_results'] == "yes"</filter> 108 <filter>show == "Nothing" or display_results_cond['display_results'] == "yes"</filter>
81 </data> 109 </data>
82 </outputs> 110 </outputs>
83 <tests> 111 <tests>
84 <test> 112 <test>
85 <param name="input" value="blobs_watershed_binary.gif" /> 113 <param name="input" value="blobs.gif"/>
86 <param name="show" value="Nothing" /> 114 <param name="show" value="Nothing"/>
87 <output name="output" file="analyze_particles_nothing.tabular" /> 115 <output name="output" file="analyze_particles_nothing.tabular"/>
88 </test> 116 </test>
89 <test> 117 <test>
90 <param name="input" value="blobs_watershed_binary.gif" /> 118 <param name="input" value="blobs.gif"/>
91 <param name="show" value="Outlines" /> 119 <param name="show" value="Outlines"/>
92 <output name="output" file="analyze_particles_outlines.gif" compare="sim_size" /> 120 <output name="output" file="analyze_particles_outlines.gif" compare="sim_size"/>
93 </test> 121 </test>
94 <test> 122 <test>
95 <param name="input" value="blobs_watershed_binary.gif" /> 123 <param name="input" value="blobs.gif"/>
96 <param name="show" value="Masks" /> 124 <param name="show" value="Masks"/>
97 <param name="exclude_edges" value="yes" /> 125 <param name="exclude_edges" value="yes"/>
98 <param name="include_holes" value="yes" /> 126 <param name="include_holes" value="yes"/>
99 <output name="output" file="analyze_particles_masks.gif" compare="sim_size" /> 127 <output name="output" file="analyze_particles_masks.gif" compare="sim_size"/>
100 </test> 128 </test>
101 </tests> 129 </tests>
102 <help> 130 <help>
103 .. class:: warningmark 131 .. class:: warningmark
104 132
126 - **Exclude on Edges** - If Yes, particles touching the edge of the image will be ignored. 154 - **Exclude on Edges** - If Yes, particles touching the edge of the image will be ignored.
127 - **Include Holes** - If Yes, interior holes will be included (set to No to exclude interior holes and to measure particles enclosed by other particles). 155 - **Include Holes** - If Yes, interior holes will be included (set to No to exclude interior holes and to measure particles enclosed by other particles).
128 ]]> 156 ]]>
129 157
130 </help> 158 </help>
131 <expand macro="fiji_headless_citations" /> 159 <expand macro="fiji_headless_citations"/>
132 </tool> 160 </tool>