comparison SpyBOAT.xml @ 0:1d62de03829d draft

"planemo upload commit c6cd06d44dce1eef9136017289d362f144687dc1"
author gregor.m
date Mon, 23 Nov 2020 13:31:47 +0000
parents
children 97fd3740f41c
comparison
equal deleted inserted replaced
-1:000000000000 0:1d62de03829d
1 <tool id="SpyBOAT" name="SpyBOAT" version="0.0.1">
2 <requirements>
3 <requirement type="package" version="0.0.2">spyboat</requirement>
4 </requirements>
5 <version_command>python $__tool_directory__/cl_wrapper.py --version</version_command>
6 <command detect_errors="exit_code"><![CDATA[
7 python $__tool_directory__/cl_wrapper.py
8 --input_path '$movie'
9 #if $gauss_sigma:
10 --gauss_sigma $gauss_sigma
11 #end if
12 #if $rescale_factor:
13 --rescale $rescale_factor
14 #end if
15
16 #if $masking.selection_mode == "create_fixed_mask":
17 --masking fixed
18 --mask_frame $masking.mask_frame
19 --mask_thresh $masking.mask_thresh
20 #else if $masking.selection_mode == "create_dynamic_mask":
21 --masking dynamic
22 --mask_thresh $masking.mask_thresh
23 #end if
24
25 --dt $dt
26 --Tmin $tmin
27 --Tmax $tmax
28 --nT $nt
29 #if $tcutoff
30 --Tcutoff $tcutoff
31 #end if
32 #if $win_size:
33 --win_size $win_size
34 #end if
35
36 --phase_out $phase_out
37 --period_out $period_out
38 --power_out $power_out
39 --amplitude_out $amplitude_out
40 #if $preprocessed_out:
41 --preprocessed_out $preprocessed_out
42 #end if
43
44 --html_fname $html_out
45 --report_img_path '$html_out.extra_files_path'
46
47 --ncpu "\${GALAXY_SLOTS:-8}"
48 > $log
49
50 ]]></command>
51 <inputs>
52 <param name="movie" type="data" format="tiff" label="Movie to process"
53 help="Select a movie to Wavelet process"/>
54
55 <!--
56 The following Wavelet parameters must have the same numerical type as defined in the
57 argparse parser in cl_wrapper.py
58 -->
59
60 <param name="gauss_sigma" type="float" label="Sigma"
61 help="Width of the Gaussian smoothing kernel, leave blank if no pre-smoothing desired." optional="true">
62 <validator type="in_range" min="0" max="9999999"/>
63 </param>
64
65 <param name="rescale_factor" type="integer" value="" label="Rescale factor"
66 help="Downsamples the input movie by this factor given in %, leave blank to disable downsampling"
67 optional="true">
68 <validator type="in_range" min="0" max="99"/>
69 </param>
70
71 <conditional name="masking">
72 <param label="Masking the output" name="selection_mode" type="select" help="Create a mask from the (blurred/rescaled) input to mask out regions without oscillations/signal in the output">
73 <option selected="true" value="no_masking">No masking</option>
74 <option value="create_fixed_mask">Create a fixed mask</option>
75 <option value="create_dynamic_mask">Create a dynamic mask</option>
76 </param>
77 <when value="create_fixed_mask">
78 <param name="mask_frame" type="integer" value="1" label="Create mask from frame"
79 help="Creates a fixed mask from the chosen frame of the input movie.">
80 <validator type="in_range" min="1" max="99999"/>
81 </param>
82 <param name="mask_thresh" type="float" value="0" label="Threshold"
83 help="All pixels below this threshold will be masked in the output.">
84 <validator type="in_range" min="0" max="999999"/>
85 </param>
86 </when>
87 <when value="create_dynamic_mask">
88 <param name="mask_thresh" type="float" value="0" label="Threshold"
89 help="For each frame of the input, all pixels below this threshold will be masked in the output.">
90 <validator type="in_range" min="0" max="999999"/>
91 </param>
92 </when>
93 </conditional>
94
95 <param name="dt" type="float" value="1" label="Sampling interval" help="Time span between two frames">
96 <validator type="in_range" min="0" max="9999999"/>
97 </param>
98 <param name="tmin" type="float" value="2" label="Smallest period" help="Minimal period to scan for">
99 <validator type="in_range" min="0" max="9999999"/>
100 </param>
101
102 <param name="tmax" type="float" value="30" label="Largest period"
103 help="Maximal period to scan for">
104 <validator type="in_range" min="0" max="9999999"/>
105 </param>
106
107 <param name="nt" type="integer" value="150" label="Number of periods to scan for"
108 help="Determines period resolution of the Wavelet power spectra">
109 <validator type="in_range" min="0" max="9999999"/>
110 </param>
111
112 <param name="tcutoff" type="float" value="40" label="Tcutoff"
113 help="Cut-off-period for sinc filter detrending, a blank field disables detrending" optional="true">
114 <validator type="in_range" min="0" max="9999999"/>
115 </param>
116
117 <param name="win_size" type="float" value="" label="Sliding window size"
118 help="Window size for amplitude envelope estimation, leave blank to disable normalization "
119 optional="true">
120 <validator type="in_range" min="0" max="9999999"/>
121 </param>
122
123 <conditional name="save_preprocessed">
124 <param label="Save preprocessed input" name="selection" type="select" help="Save the blurred/rescaled input to history? ">
125 <option selected="true" value="No">No</option>
126 <option value="Yes">Yes</option>
127 </param>
128 </conditional>
129 </inputs>
130
131 <outputs>
132 <data name="phase_out" format="tiff" label="phase_${movie.name}"/>
133 <data name="period_out" format="tiff" label="period_${movie.name}"/>
134 <data name="power_out" format="tiff" label="power_${movie.name}"/>
135 <data name="amplitude_out" format="tiff" label="amplitude_${movie.name}"/>
136 <data name="preprocessed_out" format="tiff" label="preproc_${movie.name}">
137 <filter>save_preprocessed['selection'] == 'Yes'</filter>
138 </data>
139
140 <data name="log" format="txt" label="log_${movie.name}.txt"/>
141 <data format="html" name="html_out" label="Report_${movie.name}"/>
142
143 </outputs>
144
145 <tests>
146 <test>
147 <param name="movie" value="test_movie.tif" ftype="tiff"/>
148 <output name="phase_out" file="phase_out.tif" ftype="tiff" compare="sim_size"/>
149 <output name="period_out" file="period_out.tif" ftype="tiff" compare="sim_size"/>
150 <output name="power_out" file="power_out.tif" ftype="tiff" compare="sim_size"/>
151 <output name="amplitude_out" file="amplitude_out.tif" ftype="tiff" compare="sim_size"/>
152 </test>
153 </tests>
154 <help><![CDATA[
155 **What it does**
156
157 Wavelet transforms a 3d-image stack (time,Y,X) pixel by pixel and extracts/evaluates the wavelet ridge. Removal of low-frequency trends is provided via sinc filtering.
158 There are four output movies generated (phase, period, amplitude and power). They have exactly the same dimensions (time,Y,X) as the (rescaled) input.
159
160 Pre-smoothing of the data with Gaussian kernels is supported and often recommendable.
161
162 To limit the number of Wavelet transformations (computing time), downscaling of the input movie resolution is recommended.
163 Trimming away parts of the movie with no relevant data (e.g. outer dark edges) also speeds up the processing.
164
165 If multiple channels are present in your data, extract the channel of interest beforehand (e.g. with Fiji).
166
167 **Author**: Gregor Mönke (gregor.moenke@embl.de).
168
169 **Wrapper by**: Jelle Scholtalbers (jelle.scholtalbers@embl.de).
170
171 **Know what you are doing**
172
173 .. class:: warningmark
174
175 You will want to have understood the basics of time-frequency analysis with Wavelets, find more information about the analysis strategy employed at https://github.com/tensionhead/pyBOAT
176
177 **Parameter List**
178
179 - Sigma:
180
181 The Kernel bandwidth (in pixels) for the Gaussian kernels to use for pre-smoothing the input data. The default value of zero means that no pre-smoothing is done. Set this number to a desired kernel width to turn on pre-smoothing.
182
183 - Rescale factor:
184
185 Given in %, downsamples the spatial resolution of the input movie. This speeds
186 up the whole analysis by a lot.
187
188 - Sampling interval:
189
190 Time passed between consecutive measurements, e.g 'an image every 10 minutes'.
191
192 - Smallest Period:
193
194 The minimal period to scan for, this is the higher (in frequency) end of the spectrum. A warning will be given during processing if the chosen value deceeds the Nyquist limit (2 times the sampling interval).
195
196 - Largest period:
197
198 The maximal period to scan for, this is the lower (in frequency) end of the spectrum. The inbuild Sinc filter will remove any periods larger than this form the data. Due to the 'roll off' of the filter, this value should be chosen generously. A warning will be given during processing if the chosen value exceeds the length of the time series.
199
200 - Number of periods to scan for:
201
202 This is the the number of convolutions computed per pixel.
203
204 Spectral resolution = ( biggest period - smallest period ) / number of periods
205
206 - Tcutoff:
207
208 The cut-off period for the sinc filter, periods larger than this one will
209 be removed from the signal before the transform. If no value is given,
210 no detrending is performed. At least a gracious cut-off of around ~3 times
211 the largest period to be expected is recommended.
212
213 - Sliding window size
214
215 Length (in time units, e.g. hours) of the sliding window to estimate
216 an amplitude envelope. The signal then gets normalized by this envelope,
217 meaning that all amplitudes will be around ~1 after the transform. The
218 advantage is that signal with strong amplitude trends will have more
219 meaningful Wavelet powers after normalization.
220
221 ]]></help>
222 </tool>