Mercurial > repos > imgteam > imagej2_find_maxima
comparison imagej2_find_maxima.xml @ 3:4409f9eb9433 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 15:58:30 +0000 |
parents | 6a07f71806bb |
children |
comparison
equal
deleted
inserted
replaced
2:6a07f71806bb | 3:4409f9eb9433 |
---|---|
1 <tool id="imagej2_find_maxima" name="Find maxima" version="@WRAPPER_VERSION@.2"> | 1 <tool id="imagej2_find_maxima" name="Find maxima" 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> |
11 <xref type="biii">imagej2</xref> | 11 <xref type="biii">imagej2</xref> |
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 error_log = 'output_log.txt' | |
17 #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] |
18 #set input_with_ext = '.'.join([input_sans_ext, $input.ext]) | 17 #set input_with_ext = './' + '.'.join([input_sans_ext, $input.ext]) |
19 ln -s '$input.file_name' '$input_with_ext' && | 18 ln -s '$input.file_name' '$input_with_ext' && |
20 #if str($output_type) == 'List' or str($output_type) == 'Count': | 19 #if str($output_type) == 'List' or str($output_type) == 'Count': |
21 #set list_or_count = True | 20 #set list_or_count = True |
22 #else: | 21 #else: |
23 #set output_filename = '.'.join(['output', $input.ext]) | 22 #set output_filename = '.'.join(['output', $input.ext]) |
24 touch '$output_filename' && | 23 touch '$output_filename' && |
25 #set list_or_count = False | 24 #set list_or_count = False |
26 #end if | 25 #end if |
27 touch '$error_log' && | |
28 ImageJ --ij2 --headless --debug | 26 ImageJ --ij2 --headless --debug |
29 --jython '$__tool_directory__/imagej2_find_maxima_jython_script.py' | 27 --jython '$__tool_directory__/imagej2_find_maxima_jython_script.py' |
30 '$error_log' | |
31 '$input_with_ext' | 28 '$input_with_ext' |
32 '$scale_when_converting' | 29 '$scale_when_converting' |
33 '$weighted_rgb_conversions' | 30 '$weighted_rgb_conversions' |
34 $noise_tolerance | 31 $noise_tolerance |
35 '$output_type' | 32 '$output_type' |
40 'tabular' | 37 'tabular' |
41 #else: | 38 #else: |
42 '$output_filename' | 39 '$output_filename' |
43 '$input.ext' | 40 '$input.ext' |
44 #end if | 41 #end if |
45 &>'$error_log'; | 42 #if $list_or_count |
46 if [[ $? -ne 0 ]]; then | 43 && mv '$results' '$output'; |
47 cat '$error_log' >&2; | 44 #else |
48 else | 45 && mv '$output_filename' '$output'; |
49 #if $list_or_count: | 46 #end if |
50 mv '$results' '$output'; | |
51 #else: | |
52 mv '$output_filename' '$output'; | |
53 #end if | |
54 fi | |
55 ]]></command> | 47 ]]></command> |
56 <inputs> | 48 <inputs> |
57 <expand macro="param_input"/> | 49 <expand macro="param_input"/> |
58 <param name="noise_tolerance" type="integer" value="10" min="0" label="Noise tolerance" help="Maxima are ignored if they do not stand out from the surroundings by more than this value."/> | 50 <param name="noise_tolerance" type="integer" value="10" min="0" label="Noise tolerance" help="Maxima are ignored if they do not stand out from the surroundings by more than this value."/> |
59 <param name="output_type" type="select" label="Output type"> | 51 <param name="output_type" type="select" label="Output type"> |
87 </inputs> | 79 </inputs> |
88 <outputs> | 80 <outputs> |
89 <data name="output" format_source="input"> | 81 <data name="output" format_source="input"> |
90 <filter>output_type != "List" and output_type != "Count"</filter> | 82 <filter>output_type != "List" and output_type != "Count"</filter> |
91 </data> | 83 </data> |
84 <!-- see comment at output_type parameter | |
92 <data name="results" format="tabular"> | 85 <data name="results" format="tabular"> |
93 <filter>output_type == "List" or output_type == "Count"</filter> | 86 <filter>output_type == "List" or output_type == "Count"</filter> |
94 </data> | 87 </data> --> |
95 </outputs> | 88 </outputs> |
96 <tests> | 89 <tests> |
97 <test> | 90 <test expect_num_outputs="1"> |
98 <param name="input" value="blobs.gif"/> | 91 <param name="input" value="blobs.gif"/> |
99 <output name="output" file="blobs_single_points.gif" compare="sim_size"/> | 92 <output name="output" file="blobs_single_points.gif" compare="image_diff"/> |
100 </test> | 93 </test> |
101 <test> | 94 <test expect_num_outputs="1"> |
102 <param name="input" value="blobs.gif"/> | 95 <param name="input" value="blobs.gif"/> |
103 <param name="noise_tolerance" value="13"/> | 96 <param name="noise_tolerance" value="13"/> |
104 <param name="output_type" value="Maxima_Within_Tolerance"/> | 97 <param name="output_type" value="Maxima_Within_Tolerance"/> |
105 <output name="output" file="blobs_tolerance.gif" compare="sim_size"/> | 98 <output name="output" file="blobs_tolerance.gif" compare="image_diff"/> |
106 </test> | 99 </test> |
107 <test> | 100 <test expect_num_outputs="1"> |
108 <param name="input" value="blobs.gif"/> | 101 <param name="input" value="blobs.gif"/> |
109 <param name="noise_tolerance" value="16"/> | 102 <param name="noise_tolerance" value="16"/> |
110 <param name="output_type" value="Segmented_Particles"/> | 103 <param name="output_type" value="Segmented_Particles"/> |
111 <param name="exclude_edge_maxima" value="yes"/> | 104 <param name="exclude_edge_maxima" value="yes"/> |
112 <output name="output" file="blobs_segmented.gif" compare="sim_size"/> | 105 <output name="output" file="blobs_segmented.gif" compare="image_diff"/> |
113 </test> | 106 </test> |
114 <!-- | 107 <!-- |
115 This version of Fiji does not produce the same resultsTable | 108 This version of Fiji does not produce the same resultsTable |
116 as the previous version, so eliminating these options until | 109 as the previous version, so eliminating these options until |
117 there is time to investigate | 110 there is time to investigate |