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