Mercurial > repos > imgteam > imagej2_analyze_particles_binary
comparison imagej2_analyze_particles_binary.xml @ 3:862af85a50ec draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit 8f49f3c66b5a1de99ec15e65c2519a56792f1d56
author | imgteam |
---|---|
date | Wed, 25 Sep 2024 16:13:47 +0000 |
parents | ae4ae9c5c56c |
children |
comparison
equal
deleted
inserted
replaced
2:ae4ae9c5c56c | 3:862af85a50ec |
---|---|
1 <tool id="imagej2_analyze_particles_binary" name="Analyze particles" version="@WRAPPER_VERSION@.1"> | 1 <tool id="imagej2_analyze_particles_binary" name="Analyze particles" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0"> |
2 <description>with ImageJ2</description> | 2 <description>with ImageJ2</description> |
3 <macros> | 3 <macros> |
4 <import>imagej2_macros.xml</import> | 4 <import>imagej2_macros.xml</import> |
5 </macros> | 5 </macros> |
6 <edam_operations> | 6 <edam_operations> |
12 </xrefs> | 12 </xrefs> |
13 <expand macro="fiji_requirements"/> | 13 <expand macro="fiji_requirements"/> |
14 <command detect_errors="exit_code"><![CDATA[ | 14 <command detect_errors="exit_code"><![CDATA[ |
15 #import os | 15 #import os |
16 #set input_sans_ext = $os.path.splitext($os.path.basename($input.file_name))[0] | 16 #set input_sans_ext = $os.path.splitext($os.path.basename($input.file_name))[0] |
17 #set input_with_ext = '.'.join([input_sans_ext, $input.ext]) | 17 #set input_with_ext = './' + '.'.join([input_sans_ext, $input.ext]) |
18 ln -s '$input.file_name' '$input_with_ext' && | 18 ln -s '$input.file_name' '$input_with_ext' && |
19 #set output_log = 'output_log.txt' | |
20 touch '$output_log' && | |
21 #if str($show) == 'Nothing': | 19 #if str($show) == 'Nothing': |
22 #set display_results = 'yes' | 20 #set display_results = 'yes' |
23 #set all_results = 'yes' | |
24 #set output_filename = '' | 21 #set output_filename = '' |
25 #set output_datatype = '' | 22 #set output_datatype = '' |
26 #set results_filename = $results | 23 #set results_filename = $results |
27 #else: | 24 #else: |
28 #set display_results = $display_results_cond.display_results | 25 #set display_results = $display_results |
29 #set all_results = $display_results_cond.all_results | |
30 #set output_filename = '.'.join(['output', $input.ext]) | 26 #set output_filename = '.'.join(['output', $input.ext]) |
31 #set output_datatype = $input.ext | 27 #set output_datatype = $input.ext |
32 touch '$output_filename' && | 28 touch '$output_filename' && |
33 #if str($display_results_cond.display_results) == 'yes': | 29 #if str($display_results) == 'yes': |
34 #set results_filename = $results | 30 #set results_filename = $results |
35 #else: | 31 #else: |
36 #set results_filename = '' | 32 #set results_filename = '' |
37 #end if | 33 #end if |
38 #end if | 34 #end if |
35 #if str($export_rois) == 'true': | |
36 #set rois_filename = $rois | |
37 #else: | |
38 #set rois_filename = '' | |
39 #end if | |
39 ImageJ --ij2 --headless --debug | 40 ImageJ --ij2 --headless --debug |
40 --jython '$__tool_directory__/imagej2_analyze_particles_binary_jython_script.py' | 41 --jython '$__tool_directory__/imagej2_analyze_particles_binary_jython_script.py' |
41 '$output_log' | 42 '$rois_filename' |
42 '$input' | 43 '$input' |
43 '$black_background' | 44 '$black_background' |
44 '$size' | 45 '$size' |
45 $circularity_min | 46 $circularity_min |
46 $circularity_max | 47 $circularity_max |
47 '$show' | 48 '$show' |
48 '$display_results' | 49 '$display_results' |
49 '$all_results' | |
50 '$exclude_edges' | 50 '$exclude_edges' |
51 '$include_holes' | 51 '$include_holes' |
52 '$output_filename' | 52 '$output_filename' |
53 '$output_datatype' | 53 '$output_datatype' |
54 '$results_filename' | 54 '$results_filename' |
55 &>'$output_log'; | |
56 #if str($output_filename) != '': | 55 #if str($output_filename) != '': |
57 if [[ $? -ne 0 ]]; then | 56 && mv '$output_filename' '$output'; |
58 cat '$output_log' >&2; | |
59 else | |
60 mv '$output_filename' '$output'; | |
61 fi | |
62 #else: | |
63 if [[ $? -ne 0 ]]; then | |
64 cat '$output_log' >&2; | |
65 fi | |
66 #end if | 57 #end if |
67 ]]></command> | 58 ]]></command> |
68 <inputs> | 59 <inputs> |
69 <expand macro="param_input"/> | 60 <expand macro="param_input"/> |
70 <expand macro="black_background_param"/> | 61 <expand macro="black_background_param"/> |
79 <option value="Outlines" selected="True">Outlines</option> | 70 <option value="Outlines" selected="True">Outlines</option> |
80 <option value="Bare_Outlines">Bare Outlines</option> | 71 <option value="Bare_Outlines">Bare Outlines</option> |
81 <option value="Ellipses">Ellipses</option> | 72 <option value="Ellipses">Ellipses</option> |
82 <option value="Masks">Masks</option> | 73 <option value="Masks">Masks</option> |
83 <option value="Count_Masks">Count Masks</option> | 74 <option value="Count_Masks">Count Masks</option> |
75 <option value="Overlay">Overlay</option> | |
76 <option value="Overlay_Masks">Overlay Masks</option> | |
84 <option value="Nothing">Nothing</option> | 77 <option value="Nothing">Nothing</option> |
85 </param> | 78 </param> |
86 <conditional name="display_results_cond"> | 79 <param name="display_results" type="select" label="Display results"> |
87 <param name="display_results" type="select" label="Display results"> | 80 <option value="no" selected="True">No</option> |
88 <option value="no" selected="True">No</option> | 81 <option value="yes">Yes</option> |
89 <option value="yes">Yes</option> | 82 </param> |
90 </param> | |
91 <when value="no"> | |
92 <param name="all_results" type="hidden" value="no"/> | |
93 </when> | |
94 <when value="yes"> | |
95 <param name="all_results" type="select" label="All results?" help="If no, only summary displayed."> | |
96 <option value="yes" selected="True">Yes</option> | |
97 <option value="no">No</option> | |
98 </param> | |
99 </when> | |
100 </conditional> | |
101 <param name="exclude_edges" type="select" label="Exclude on edges?"> | 83 <param name="exclude_edges" type="select" label="Exclude on edges?"> |
102 <option value="no" selected="True">No</option> | 84 <option value="no" selected="True">No</option> |
103 <option value="yes">Yes</option> | 85 <option value="yes">Yes</option> |
104 </param> | 86 </param> |
105 <param name="include_holes" type="select" label="Include holes?"> | 87 <param name="include_holes" type="select" label="Include holes?"> |
106 <option value="no" selected="True">No</option> | 88 <option value="no" selected="True">No</option> |
107 <option value="yes">Yes</option> | 89 <option value="yes">Yes</option> |
108 </param> | 90 </param> |
91 <param name="export_rois" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Export particles outlines coordinates" help="Exports particles coordinates as a tabular file, which can be imported as ROIs in OMERO." /> | |
109 </inputs> | 92 </inputs> |
110 <outputs> | 93 <outputs> |
111 <data name="output" format_source="input"> | 94 <data name="output" format_source="input"> |
112 <filter>show != "Nothing"</filter> | 95 <filter>show != "Nothing"</filter> |
113 </data> | 96 </data> |
114 <data format="tabular" name="results" label="${tool.name} (results) on ${on_string}"> | 97 <data format="tabular" name="results" label="${tool.name} (results) on ${on_string}"> |
115 <filter>show == "Nothing" or display_results_cond['display_results'] == "yes"</filter> | 98 <filter>show == "Nothing" or display_results == "yes"</filter> |
99 </data> | |
100 <data format="tabular" name="rois" label="${tool.name} (particles coordinates) on ${on_string}"> | |
101 <filter>export_rois</filter> | |
116 </data> | 102 </data> |
117 </outputs> | 103 </outputs> |
118 <tests> | 104 <tests> |
119 <test> | 105 <test expect_num_outputs="1"> |
120 <param name="input" value="blobs.gif"/> | 106 <param name="input" value="blobs.gif"/> |
121 <param name="show" value="Nothing"/> | 107 <param name="show" value="Nothing"/> |
122 <output name="output" file="analyze_particles_nothing.tabular"/> | 108 <output name="results" file="analyze_particles_nothing.tabular"/> |
123 </test> | 109 </test> |
124 <test> | 110 <test expect_num_outputs="1"> |
125 <param name="input" value="blobs.gif"/> | 111 <param name="input" value="blobs.gif"/> |
126 <param name="show" value="Outlines"/> | 112 <param name="show" value="Outlines"/> |
127 <output name="output" file="analyze_particles_outlines.gif" compare="sim_size"/> | 113 <output name="output" file="analyze_particles_outlines.gif" compare="image_diff"/> |
128 </test> | 114 </test> |
129 <test> | 115 <test expect_num_outputs="1"> |
130 <param name="input" value="blobs.gif"/> | 116 <param name="input" value="blobs.gif"/> |
131 <param name="show" value="Masks"/> | 117 <param name="show" value="Bare_Outlines"/> |
132 <param name="exclude_edges" value="yes"/> | 118 <param name="exclude_edges" value="yes"/> |
133 <param name="include_holes" value="yes"/> | 119 <param name="include_holes" value="yes"/> |
134 <output name="output" file="analyze_particles_masks.gif" compare="sim_size"/> | 120 <output name="output" file="analyze_particles_bareoutlines.gif" compare="image_diff" metric="iou"/> |
121 </test> | |
122 <test expect_num_outputs="3"> | |
123 <param name="input" value="blobs.gif"/> | |
124 <param name="show" value="Overlay_Masks"/> | |
125 <param name="display_results" value="yes"/> | |
126 <param name="export_rois" value="true"/> | |
127 <output name="output" file="analyze_particles_overlaymasks.gif" compare="image_diff"/> | |
128 <output name="results" file="analyze_particles_nothing.tabular"/> | |
129 <output name="rois" file="analyze_particles_rois.tabular"/> | |
130 </test> | |
131 <test expect_num_outputs="3"> | |
132 <param name="input" value="confocal-series-first-channel_threshold_default.tiff"/> | |
133 <param name="black_background" value="yes"/> | |
134 <param name="show" value="Overlay_Masks"/> | |
135 <param name="display_results" value="yes"/> | |
136 <param name="export_rois" value="true"/> | |
137 <output name="output" file="confocal-series-first-channel_threshold_default_overlay_mask.tiff" compare="sim_size"/> | |
138 <output name="results" file="confocal_analyze_particles.tabular"/> | |
139 <output name="rois" file="confocal_analyze_particles_rois.tabular"/> | |
135 </test> | 140 </test> |
136 </tests> | 141 </tests> |
137 <help> | 142 <help> |
138 .. class:: warningmark | 143 .. class:: warningmark |
139 | 144 |