3
|
1 <tool id="insect_phenology_model" name="Insect phenology model" version="1.1.0">
|
0
|
2 <description>expressing stage-specific phenology and population dynamics</description>
|
|
3 <requirements>
|
4
|
4 <requirement type="package" version="1.4.4">r-optparse</requirement>
|
0
|
5 </requirements>
|
2
|
6 <command detect_errors="exit_code"><![CDATA[
|
33
|
7 #import os
|
|
8 #set output_data_dir = "output_data_dir"
|
|
9 #set output_plots_dir = "output_plots_dir"
|
|
10 #set error_file = $os.path.join($output_data_dir, "04_combined_generations.csv")
|
17
|
11 #set life_stages = list()
|
13
|
12 #set plot_adult_life_stage = $plot_adult_life_stage_cond.plot_adult_life_stage
|
|
13 #set plot_nymph_life_stage = $plot_nymph_life_stage_cond.plot_nymph_life_stage
|
17
|
14 #if str($plot_egg_life_stage) == "yes":
|
|
15 $life_stages.append("Egg")
|
|
16 #end if
|
|
17 #if str($plot_nymph_life_stage) == "yes":
|
|
18 $life_stages.append("Nymph")
|
|
19 #end if
|
|
20 #if str($plot_adult_life_stage) == "yes":
|
|
21 $life_stages.append("Adult")
|
|
22 #end if
|
13
|
23 #if str($plot_egg_life_stage) == "yes" and str($plot_nymph_life_stage) == "yes" and str($plot_adult_life_stage) == "yes":
|
17
|
24 $life_stages.append("Total")
|
13
|
25 #end if
|
17
|
26 #set life_stages = ",".join($life_stages)
|
33
|
27 mkdir output_data_dir &&
|
|
28 mkdir output_plots_dir &&
|
0
|
29 Rscript '$__tool_directory__/insect_phenology_model.R'
|
6
|
30 --adult_mortality $adult_mortality
|
|
31 --adult_accumulation $adult_accumulation
|
|
32 --egg_mortality $egg_mortality
|
37
|
33 --input_ytd '$input_ytd'
|
|
34 --input_norm '$input_norm'
|
6
|
35 --insect '$insect'
|
|
36 --insects_per_replication $insects_per_replication
|
17
|
37 --life_stages '$life_stages'
|
|
38 #if str($plot_adult_life_stage) == "yes":
|
|
39 --life_stages_adult '$plot_adult_life_stage_cond.life_stages_adult'
|
9
|
40 #end if
|
17
|
41 #if str($plot_nymph_life_stage) == "yes":
|
|
42 --life_stages_nymph '$plot_nymph_life_stage_cond.life_stages_nymph'
|
9
|
43 #end if
|
6
|
44 --location '$location'
|
|
45 --max_clutch_size $max_clutch_size
|
|
46 --min_clutch_size $min_clutch_size
|
|
47 --nymph_mortality $nymph_mortality
|
37
|
48 --num_days_ytd $input_ytd.metadata.data_lines
|
6
|
49 --old_nymph_accumulation $old_nymph_accumulation
|
|
50 --oviposition $oviposition
|
|
51 --photoperiod $photoperiod
|
|
52 --replications $replications
|
9
|
53 --plot_generations_separately $plot_generations_separately
|
|
54 --plot_std_error $plot_std_error
|
26
|
55 --young_nymph_accumulation $young_nymph_accumulation
|
29
|
56 &>ipm_log.txt;
|
|
57 if [[ $? -ne 0 ]]; then
|
33
|
58 cp ipm_log.txt '$error_file';
|
29
|
59 exit 1;
|
|
60 fi]]></command>
|
0
|
61 <inputs>
|
37
|
62 <param name="input_ytd" type="data" format="csv" label="Year-to-date temperature data">
|
|
63 <validator type="expression" message="Year-to-date temperature data must have 6 columns">value is not None and value.metadata.columns==6</validator>
|
|
64 </param>
|
|
65 <param name="input_norm" type="data" format="csv" label="30 year normals temperature data">
|
|
66 <validator type="expression" message="30 year normals temperature data must have 10 columns and 366 rows">value is not None and value.metadata.columns==10 and value.metadata.data_lines==366</validator>
|
|
67 </param>
|
2
|
68 <param name="location" type="text" value="" optional="false" label="Location" />
|
5
|
69 <param name="insect" type="select" label="Select insect">
|
9
|
70 <option value="BMSB" selected="True">Brown Marmorated Stink Bug</option>
|
5
|
71 </param>
|
9
|
72 <param name="replications" type="integer" value="10" min="2" label="Number of replications" />
|
6
|
73 <param name="insects_per_replication" type="integer" value="1000" min="1" label="Number of insects with which to start each replication" />
|
0
|
74 <param name="photoperiod" type="float" value="13.5" min="0" label="Critical photoperiod for diapause induction/termination" />
|
6
|
75 <param name="egg_mortality" type="integer" value="1" min="0" label="Adjustment rate for egg mortality" />
|
|
76 <param name="nymph_mortality" type="integer" value="1" min="0" label="Adjustment rate for nymph mortality" />
|
|
77 <param name="adult_mortality" type="integer" value="1" min="0" label="Adjustment rate for adult mortality" />
|
0
|
78 <param name="oviposition" type="integer" value="1" min="0" label="Adjustment oviposition rate" />
|
|
79 <param name="min_clutch_size" type="integer" value="0" min="0" label="Adjustment of minimum clutch size" />
|
|
80 <param name="max_clutch_size" type="integer" value="0" min="0" label="Adjustment of maximum clutch size" />
|
6
|
81 <param name="young_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (egg->young nymph)" />
|
|
82 <param name="old_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (young nymph->old nymph)" />
|
|
83 <param name="adult_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (old nymph->adult)" />
|
9
|
84 <param name="plot_generations_separately" type="select" label="Plot generations separately?">
|
|
85 <option value="yes" selected="True">Yes</option>
|
|
86 <option value="no">No</option>
|
|
87 </param>
|
13
|
88 <param name="plot_egg_life_stage" type="select" label="Plot egg life stage?">
|
|
89 <option value="yes" selected="true">Yes</option>
|
|
90 <option value="no">No</option>
|
|
91 </param>
|
|
92 <conditional name="plot_nymph_life_stage_cond">
|
|
93 <param name="plot_nymph_life_stage" type="select" label="Plot nymph life stage?">
|
|
94 <option value="yes" selected="true">Yes</option>
|
|
95 <option value="no">No</option>
|
9
|
96 </param>
|
13
|
97 <when value="yes">
|
17
|
98 <param name="life_stages_nymph" type="select" multiple="true" label="Select nymph life stage">
|
9
|
99 <option value="Total" selected="true">All</option>
|
|
100 <option value="Young">Young</option>
|
|
101 <option value="Old">Old</option>
|
|
102 </param>
|
|
103 </when>
|
13
|
104 <when value="no"/>
|
|
105 </conditional>
|
|
106 <conditional name="plot_adult_life_stage_cond">
|
|
107 <param name="plot_adult_life_stage" type="select" label="Plot adult life stage?">
|
|
108 <option value="yes" selected="true">Yes</option>
|
|
109 <option value="no">No</option>
|
|
110 </param>
|
|
111 <when value="yes">
|
17
|
112 <param name="life_stages_adult" type="select" multiple="true" label="Select adult life stage">
|
9
|
113 <option value="Total" selected="true">All</option>
|
|
114 <option value="Pre-vittelogenic">Pre-vittelogenic</option>
|
|
115 <option value="Vittelogenic">Vittelogenic</option>
|
|
116 <option value="Diapausing">Diapausing</option>
|
|
117 </param>
|
|
118 </when>
|
13
|
119 <when value="no"/>
|
9
|
120 </conditional>
|
|
121 <param name="plot_std_error" type="select" label="Plot standard error?">
|
|
122 <option value="yes" selected="True">Yes</option>
|
|
123 <option value="no">No</option>
|
0
|
124 </param>
|
|
125 </inputs>
|
|
126 <outputs>
|
33
|
127 <collection name="output_data_collection" type="list" label="${tool.name} (data), on ${on_string}">
|
|
128 <discover_datasets pattern="__name__" directory="output_data_dir" format="csv" />
|
|
129 </collection>
|
|
130 <collection name="output_plots_collection" type="list" label="${tool.name} (plots), on ${on_string}">
|
|
131 <discover_datasets pattern="__name__" directory="output_plots_dir" format="pdf" />
|
9
|
132 </collection>
|
0
|
133 </outputs>
|
|
134 <tests>
|
|
135 <test>
|
40
|
136 <param name="input_ytd" value="state_college_partial.csv" ftype="csv" />
|
|
137 <param name="input_norm" value="30_year_normals.csv" ftype="csv" />
|
3
|
138 <param name="location" value="State College PA" />
|
12
|
139 <param name="replications" value="2" />
|
22
|
140 <param name="plot_generations_separately" value="no" />
|
|
141 <param name="plot_egg_life_stage" value="no" />
|
|
142 <param name="life_stages_nymph" value="Young" />
|
|
143 <param name="life_stages_adult" value="Pre-vittelogenic" />
|
33
|
144 <output_collection name="output_data_collection" type="list">
|
|
145 <element name="04_combined_generations.csv" file="output_combined1.csv" ftype="csv" compare="contains"/>
|
|
146 </output_collection>
|
|
147 <output_collection name="output_plots_collection" type="list">
|
28
|
148 <element name="02_young_nymph_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
|
149 <element name="05_pre-vittelogenic_adult_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
22
|
150 </output_collection>
|
|
151 </test>
|
|
152 <test>
|
40
|
153 <param name="input_ytd" value="state_college_ytd.csv" ftype="csv" />
|
|
154 <param name="input_norm" value="30_year_normals.csv" ftype="csv" />
|
22
|
155 <param name="location" value="State College PA" />
|
|
156 <param name="replications" value="2" />
|
|
157 <param name="plot_generations_separately" value="no" />
|
33
|
158 <output_collection name="output_data_collection" type="list">
|
|
159 <element name="04_combined_generations.csv" file="output_combined2.csv" ftype="csv" compare="contains"/>
|
|
160 </output_collection>
|
|
161 <output_collection name="output_plots_collection" type="list">
|
28
|
162 <element name="01_egg_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
|
163 <element name="04_total_nymph_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
|
164 <element name="08_total_adult_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
|
165 <element name="09_total_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
22
|
166 </output_collection>
|
|
167 </test>
|
|
168 <test>
|
40
|
169 <param name="input_ytd" value="state_college_partial.csv" ftype="csv" />
|
|
170 <param name="input_norm" value="30_year_normals.csv" ftype="csv" />
|
22
|
171 <param name="location" value="State College PA" />
|
|
172 <param name="replications" value="2" />
|
|
173 <param name="plot_egg_life_stage" value="no" />
|
|
174 <param name="life_stages_nymph" value="Old" />
|
|
175 <param name="plot_adult_life_stage" value="no" />
|
33
|
176 <output_collection name="output_data_collection" type="list">
|
|
177 <element name="01_generation_P.csv" file="output_p_3.csv" ftype="csv" compare="contains"/>
|
|
178 <element name="02_generation_F1.csv" file="output_f1_3.csv" ftype="csv" compare="contains"/>
|
|
179 <element name="03_generation_F2.csv" file="output_f2_3.csv" ftype="csv" compare="contains"/>
|
|
180 <element name="04_combined_generations.csv" file="output_combined3.csv" ftype="csv" compare="contains"/>
|
|
181 </output_collection>
|
|
182 <output_collection name="output_plots_collection" type="list">
|
28
|
183 <element name="03_old_nymph_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
22
|
184 </output_collection>
|
|
185 </test>
|
|
186 <test>
|
40
|
187 <param name="input_ytd" value="state_college_ytd.csv" ftype="csv" />
|
|
188 <param name="input_norm" value="30_year_normals.csv" ftype="csv" />
|
22
|
189 <param name="location" value="State College PA" />
|
|
190 <param name="replications" value="2" />
|
33
|
191 <output_collection name="output_data_collection" type="list">
|
|
192 <element name="01_generation_P.csv" file="output_p_4.csv" ftype="csv" compare="contains"/>
|
|
193 <element name="02_generation_F1.csv" file="output_f1_4.csv" ftype="csv" compare="contains"/>
|
|
194 <element name="03_generation_F2.csv" file="output_f2_4.csv" ftype="csv" compare="contains"/>
|
|
195 <element name="04_combined_generations.csv" file="output_combined4.csv" ftype="csv" compare="contains"/>
|
|
196 </output_collection>
|
|
197 <output_collection name="output_plots_collection" type="list">
|
28
|
198 <element name="01_egg_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
|
199 <element name="04_total_nymph_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
|
200 <element name="08_total_adult_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
|
201 <element name="09_total_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/>
|
9
|
202 </output_collection>
|
0
|
203 </test>
|
|
204 </tests>
|
|
205 <help>
|
|
206 **What it does**
|
6
|
207
|
0
|
208 Provides an agent-based stochastic model expressing stage-specific phenology and population dynamics for an insect species across geographic regions.
|
|
209
|
|
210 -----
|
|
211
|
|
212 **Required options**
|
|
213
|
|
214 * **Location** - the location associated with the selected temperature data.
|
|
215 * **Temperature data** - select the dataset from your history containing the temperature data.
|
7
|
216 * **Select insect** - currently only the Brown Marmorated Stink Bug can be analyzed.
|
0
|
217 * **Number of replications** - number of replications.
|
6
|
218 * **Number of insects with which to start each replication** - the analysis for each replication will start with this number of insects.
|
0
|
219 * **Critical photoperiod for diapause induction/termination** - critical photoperiod for diapause induction/termination.
|
|
220 * **Adjustment rate for egg mortality** - adjustment rate for egg mortality.
|
|
221 * **Adjustment rate for nymph mortality** - adjustment rate for nymph mortality.
|
|
222 * **Adjustment rate for adult mortality** - adjustment rate for adult mortality.
|
|
223 * **Adjustment oviposition rate** - adjustment oviposition rate.
|
|
224 * **Adjustment of minimum clutch size** - adjustment of minimum clutch size.
|
|
225 * **Adjustment of maximum clutch size** - adjustment of maximum clutch size
|
6
|
226 * **Adjustment of degree-days accumulation (egg->young nymph)** - adjustment of degree-days accumulation (egg->young nymph).
|
|
227 * **Adjustment of degree-days accumulation (young nymph->old nymph)** - adjustment of degree-days accumulation (young nymph->old nymph).
|
|
228 * **Adjustment of degree-days accumulation (old nymph->adult)** - adjustment of degree-days accumulation (old nymph->adult).
|
9
|
229 * **Plot generations separately** - select "Yes" to plot P, F1 and F2 as separate lines or "no" to pool across generations, resulting in a total for the selected life states.
|
14
|
230 * **Plot egg life stage** - select "Yes" to plot the egg life stage. If all life stages (egg, nymph and adult) are selected for plotting, one output for the total will be produced.
|
|
231 * **Plot nymph life stage** - select "Yes" to plot the nymph life stage. If all life stages (egg, nymph and adult) are selected for plotting, one output for the total will be produced.
|
|
232
|
|
233 * **Select nymph life stage** - select the nymph life stage for plotting.
|
|
234
|
|
235 * **Plot adult life stage** - select "Yes" to plot the adult life stage. If all life stages (egg, nymph and adult) are selected for plotting, one output for the total will be produced.
|
|
236
|
|
237 * **Select adult life stage** - select the adult life stage for plotting.
|
|
238
|
6
|
239 * **Plot standard error** - add standard error lines to plot.
|
0
|
240 </help>
|
|
241 <citations>
|
|
242 <citation type="doi">10.3389/fphys.2016.00165</citation>
|
3
|
243 <citation type="doi">10.1175/JTECH-D-11-00103.1</citation>
|
|
244 <citation type="doi">10.7289/V5D21VHZ</citation>
|
0
|
245 </citations>
|
|
246 </tool>
|