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