Mercurial > repos > iuc > spyboat
comparison spyboat.xml @ 0:76733d05d8ef draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/packages/spyboat commit 5c60a414c785246371beac23ce52d8bbab3602d1"
author | iuc |
---|---|
date | Sat, 28 Nov 2020 13:45:34 +0000 |
parents | |
children | 639d2031d998 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76733d05d8ef |
---|---|
1 <tool id="spyboat" name="SpyBOAT" version="@TOOL_VERSION@" profile="20.01" license="GPL-3.0-or-later"> | |
2 <description>wavelet transforms image stacks</description> | |
3 <macros> | |
4 <token name="@TOOL_VERSION@">0.1.1</token> | |
5 </macros> | |
6 <requirements> | |
7 <requirement type="package" version="@TOOL_VERSION@">spyboat</requirement> | |
8 </requirements> | |
9 <version_command>python '$__tool_directory__/spyboat_cli.py' --version</version_command> | |
10 <command detect_errors="exit_code"><![CDATA[ | |
11 ## needed for pulsar combat | |
12 cat '$__tool_directory__/output_report.py' > /dev/null && | |
13 ## run tool | |
14 python '$__tool_directory__/spyboat_cli.py' | |
15 --input_path '$movie' | |
16 #if str($PreProc.gauss_sigma): | |
17 --gauss_sigma $PreProc.gauss_sigma | |
18 #end if | |
19 #if str($PreProc.rescale_factor): | |
20 --rescale $PreProc.rescale_factor | |
21 #end if | |
22 | |
23 #if $masking.selection_mode == "create_static_mask": | |
24 --masking static | |
25 --mask_frame $masking.mask_frame | |
26 --mask_thresh $masking.mask_thresh | |
27 #else if $masking.selection_mode == "create_dynamic_mask": | |
28 --masking dynamic | |
29 --mask_thresh $masking.mask_thresh | |
30 #end if | |
31 | |
32 --dt $wavana.dt | |
33 --Tmin $wavana.tmin | |
34 --Tmax $wavana.tmax | |
35 --nT $wavana.nt | |
36 #if str($wavana.tcutoff) | |
37 --Tcutoff $wavana.tcutoff | |
38 #end if | |
39 #if str($wavana.win_size): | |
40 --win_size $wavana.win_size | |
41 #end if | |
42 | |
43 #if 'save_phase' in $outputs: | |
44 --phase_out '$phase_out' | |
45 #end if | |
46 | |
47 #if 'save_period' in $outputs: | |
48 --period_out '$period_out' | |
49 #end if | |
50 | |
51 #if 'save_power' in $outputs: | |
52 --power_out '$power_out' | |
53 #end if | |
54 | |
55 #if 'save_amplitude' in $outputs: | |
56 --amplitude_out '$amplitude_out' | |
57 #end if | |
58 | |
59 #if 'save_preprocessed' in $outputs: | |
60 --preprocessed_out '$preprocessed_out' | |
61 #end if | |
62 | |
63 --html_fname '$html_out' | |
64 --report_img_path '$html_out.extra_files_path' | |
65 | |
66 --ncpu "\${GALAXY_SLOTS:-8}" | |
67 | |
68 | |
69 ]]></command> | |
70 <inputs> | |
71 <param name="movie" type="data" format="tiff" label="Movie to analyze" help="Select a movie to wavelet analyze"/> | |
72 | |
73 <!-- | |
74 The following Wavelet parameters must have the same numerical type as defined in the | |
75 argparse parser in spyboat_cli.py | |
76 --> | |
77 <section name="PreProc" title="Preprocessing" expanded="true"> | |
78 <param argument="gauss_sigma" type="float" min="0" max="9999999" optional="true" label="Sigma" | |
79 help="Width of the Gaussian smoothing kernel, leave blank if no pre-smoothing desired" /> | |
80 <param argument="rescale_factor" type="integer" value="" min="0" max="99" optional="true" label="Rescale factor" | |
81 help="Downsamples the input movie by this factor given in %, leave blank to disable downsampling" /> | |
82 </section> | |
83 <section name="wavana" title="Wavelet Analysis" expanded="true"> | |
84 <param name="dt" type="float" value="1" min="0" max="9999999" label="Sampling interval" help="Time span between two frames" /> | |
85 <param name="tmin" type="float" value="20" min="0" max="9999999" label="Smallest period" help="Lowest period for the wavelet transform" /> | |
86 <param name="tmax" type="float" value="30" min="0" max="9999999" label="Largest period" | |
87 help="Largest period for the wavelet transform" /> | |
88 <param name="nt" type="integer" value="150" min="0" max="9999999" label="Number of periods to scan for" | |
89 help="Determines period resolution of the Wavelet power spectra" /> | |
90 <param name="tcutoff" type="float" value="40" min="0" max="9999999" label="T cutoff" | |
91 help="Cut-off-period for sinc filter detrending, a blank field disables detrending" optional="true" /> | |
92 <param name="win_size" type="float" value="" min="0" max="9999999" optional="true" label="Sliding window size" | |
93 help="Window size for amplitude envelope estimation, leave blank to disable normalization" /> | |
94 </section> | |
95 <conditional name="masking"> | |
96 <param name="selection_mode" type="select" label="Masking the output" help="Create a mask from the (blurred/rescaled) input to mask out regions without oscillations/signal in the output"> | |
97 <option selected="true" value="no_masking">No masking</option> | |
98 <option value="create_static_mask">Create a static mask</option> | |
99 <option value="create_dynamic_mask">Create a dynamic mask</option> | |
100 </param> | |
101 <when value="no_masking" /> | |
102 <when value="create_static_mask"> | |
103 <param name="mask_frame" type="integer" value="1" min="1" max="99999" label="Create mask from frame" | |
104 help="Creates a static mask from the chosen frame of the input movie." /> | |
105 <param name="mask_thresh" type="float" value="0" min="0" max="999999" label="Threshold" | |
106 help="All pixels below this threshold will be masked in the output." /> | |
107 </when> | |
108 <when value="create_dynamic_mask"> | |
109 <param name="mask_thresh" type="float" value="0" min="0" max="999999" label="Threshold" | |
110 help="For each frame of the input, all pixels below this threshold will be masked in the output." /> | |
111 </when> | |
112 </conditional> | |
113 <param name="outputs" type="select" optional="true" multiple="true" label="Select optional outputs" help=""> | |
114 <option value="save_phase">Phase Movie</option> | |
115 <option value="save_period">Period Movie</option> | |
116 <option value="save_amplitude">Amplitude Movie</option> | |
117 <option value="save_power">Power Movie</option> | |
118 <option value="save_preprocessed">Preprocessed Movie</option> | |
119 </param> | |
120 </inputs> | |
121 | |
122 <outputs> | |
123 <data name="phase_out" format="tiff" label="${movie.name[:-4]}_phase"> | |
124 <filter>'save_phase' in ouputs</filter> | |
125 </data> | |
126 <data name="period_out" format="tiff" label="${movie.name[:-4]}_period"> | |
127 <filter>'save_period' in outputs</filter> | |
128 </data> | |
129 <data name="power_out" format="tiff" label="${movie.name[:-4]}_power"> | |
130 <filter>'save_power' in outputs</filter> | |
131 </data> | |
132 <data name="amplitude_out" format="tiff" label="${movie.name[:-4]}_amplitude"> | |
133 <filter>'save_amplitude' in outputs</filter> | |
134 </data> | |
135 <data name="preprocessed_out" format="tiff" label="${movie.name[:-4]}_preproc"> | |
136 <filter>'save_preprocessed' in outputs</filter> | |
137 </data> | |
138 <data name="html_out" format="html" label="Report ${movie.name[:-4]}" /> | |
139 </outputs> | |
140 | |
141 <tests> | |
142 <test expect_num_outputs="2"> | |
143 <param name="movie" value="test-movie.tif" ftype="tiff"/> | |
144 <param name="outputs" value="save_phase"/> | |
145 <conditional name="masking"> | |
146 <param name="selection_mode" value="no_masking" /> | |
147 </conditional> | |
148 <output name="phase_out" ftype="tiff"> | |
149 <assert_contents> | |
150 <has_size value="1764430" delta="100" /> | |
151 </assert_contents> | |
152 </output> | |
153 <output name="html_out" file="output1.html" ftype="html"/> | |
154 </test> | |
155 <test expect_num_outputs="4"> | |
156 <section name="wavana"> | |
157 <param name="tmin" value="20"/> | |
158 <param name="nt" value="150"/> | |
159 <param name="tcutoff" value="40"/> | |
160 </section> | |
161 <conditional name="masking"> | |
162 <param name="selection_mode" value="create_static_mask" /> | |
163 </conditional> | |
164 <param name="movie" value="test-movie.tif" ftype="tiff"/> | |
165 <param name="outputs" value="save_phase,save_preprocessed,save_power"/> | |
166 <output name="phase_out" ftype="tiff"> | |
167 <assert_contents> | |
168 <has_size value="1764430" delta="100" /> | |
169 </assert_contents> | |
170 </output> | |
171 <output name="html_out" file="output1.html" ftype="html"/> | |
172 </test> | |
173 <test expect_num_outputs="4"> | |
174 <section name="wavana"> | |
175 <param name="tmin" value="20"/> | |
176 <param name="nt" value="150"/> | |
177 <param name="tcutoff" value="40"/> | |
178 </section> | |
179 <conditional name="masking"> | |
180 <param name="selection_mode" value="create_dynamic_mask" /> | |
181 </conditional> | |
182 <param name="movie" value="test-movie.tif" ftype="tiff"/> | |
183 <param name="outputs" value="save_phase,save_preprocessed,save_power"/> | |
184 <output name="phase_out" ftype="tiff"> | |
185 <assert_contents> | |
186 <has_size value="1764430" delta="100" /> | |
187 </assert_contents> | |
188 </output> | |
189 <output name="html_out" file="output1.html" ftype="html"/> | |
190 </test> | |
191 </tests> | |
192 <help><![CDATA[ | |
193 .. class:: infomark | |
194 | |
195 **What it does** | |
196 | |
197 ------------------- | |
198 | |
199 Wavelet transforms a 3d-image stack (time,Y,X) pixel by pixel along the time axis and extracts/evaluates the wavelet ridge. Removal of low-frequency trends is provided via sinc filtering. | |
200 There are four output movies generated (phase, period, amplitude and power). They have exactly the same dimensions (time,Y,X) as the (rescaled) input. | |
201 | |
202 Pre-smoothing of the data with Gaussian kernels is supported and often recommendable. | |
203 | |
204 To limit the number of Wavelet transformations (computing time), downscaling of the input movie resolution is recommended. | |
205 Trimming away parts of the movie with no relevant data (e.g. outer dark edges) also speeds up the processing. | |
206 | |
207 If multiple channels are present in your data, extract the channel of interest beforehand (e.g. with Fiji). | |
208 | |
209 **Author**: Gregor Mönke (gregor.moenke@embl.de). | |
210 | |
211 **Wrapper by**: Jelle Scholtalbers (jelle.scholtalbers@embl.de). | |
212 | |
213 **Know what you are doing** | |
214 | |
215 .. class:: warningmark | |
216 | |
217 You need to have a basic understanding of time-frequency analysis with Wavelets, find more information about the analysis strategy employed at https://github.com/tensionhead/pyBOAT or the publication cited below. | |
218 | |
219 ------------------- | |
220 | |
221 **Parameter List** | |
222 | |
223 - Sigma: | |
224 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. | |
225 | |
226 - Rescale factor: | |
227 Given in %, downsamples the spatial resolution of the input movie. This speeds up the whole analysis by a lot. | |
228 | |
229 - Masking: | |
230 SpyBOAT offers 'static' and 'dynamic' masking. 'static' means that a single mask is created by thresholding from a user selected frame. 'dynamic' creates a mask for each frame by thresholding, works better for moving/expanding/shrinking oscillatory fields. | |
231 | |
232 - Sampling interval: | |
233 Time passed between consecutive measurements, e.g 'an image every 10 minutes'. | |
234 | |
235 - Smallest Period: | |
236 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). | |
237 | |
238 - Largest period: | |
239 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. | |
240 | |
241 - Number of periods to scan for: | |
242 This is the the number of convolutions computed per pixel. | |
243 | |
244 Spectral resolution = ( biggest period - smallest period ) / number of periods | |
245 | |
246 - Tcutoff: | |
247 The cut-off period for the sinc filter, periods larger than this one will | |
248 be removed from the signal before the transform. If no value is given, | |
249 no detrending is performed. At least a gracious cut-off of around ~3 times | |
250 the largest period to be expected is recommended. | |
251 | |
252 - Sliding window size | |
253 Length (in time units, e.g. hours) of the sliding window to estimate | |
254 an amplitude envelope. The signal then gets normalized by this envelope, | |
255 meaning that all amplitudes will be around ~1 after the transform. The | |
256 advantage is that signal with strong amplitude trends will have more | |
257 meaningful Wavelet powers after normalization. | |
258 | |
259 | |
260 ]]></help> | |
261 <citations> | |
262 <citation type="doi">10.1101/2020.04.29.067744</citation> | |
263 </citations> | |
264 </tool> |