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
6
+ − 49 --young_nymph_accumulation $young_nymph_accumulation]]></command>
0
+ − 50 <inputs>
4
+ − 51 <param name="input" type="data" format="csv" label="Temperature data" />
2
+ − 52 <param name="location" type="text" value="" optional="false" label="Location" />
5
+ − 53 <param name="insect" type="select" label="Select insect">
9
+ − 54 <option value="BMSB" selected="True">Brown Marmorated Stink Bug</option>
5
+ − 55 </param>
9
+ − 56 <param name="replications" type="integer" value="10" min="2" label="Number of replications" />
6
+ − 57 <param name="insects_per_replication" type="integer" value="1000" min="1" label="Number of insects with which to start each replication" />
0
+ − 58 <param name="photoperiod" type="float" value="13.5" min="0" label="Critical photoperiod for diapause induction/termination" />
6
+ − 59 <param name="egg_mortality" type="integer" value="1" min="0" label="Adjustment rate for egg mortality" />
+ − 60 <param name="nymph_mortality" type="integer" value="1" min="0" label="Adjustment rate for nymph mortality" />
+ − 61 <param name="adult_mortality" type="integer" value="1" min="0" label="Adjustment rate for adult mortality" />
0
+ − 62 <param name="oviposition" type="integer" value="1" min="0" label="Adjustment oviposition rate" />
+ − 63 <param name="min_clutch_size" type="integer" value="0" min="0" label="Adjustment of minimum clutch size" />
+ − 64 <param name="max_clutch_size" type="integer" value="0" min="0" label="Adjustment of maximum clutch size" />
6
+ − 65 <param name="young_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (egg->young nymph)" />
+ − 66 <param name="old_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (young nymph->old nymph)" />
+ − 67 <param name="adult_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (old nymph->adult)" />
9
+ − 68 <param name="plot_generations_separately" type="select" label="Plot generations separately?">
+ − 69 <option value="yes" selected="True">Yes</option>
+ − 70 <option value="no">No</option>
+ − 71 </param>
13
+ − 72 <param name="plot_egg_life_stage" type="select" label="Plot egg life stage?">
+ − 73 <option value="yes" selected="true">Yes</option>
+ − 74 <option value="no">No</option>
+ − 75 </param>
+ − 76 <conditional name="plot_nymph_life_stage_cond">
+ − 77 <param name="plot_nymph_life_stage" type="select" label="Plot nymph life stage?">
+ − 78 <option value="yes" selected="true">Yes</option>
+ − 79 <option value="no">No</option>
9
+ − 80 </param>
13
+ − 81 <when value="yes">
17
+ − 82 <param name="life_stages_nymph" type="select" multiple="true" label="Select nymph life stage">
9
+ − 83 <option value="Total" selected="true">All</option>
+ − 84 <option value="Young">Young</option>
+ − 85 <option value="Old">Old</option>
+ − 86 </param>
+ − 87 </when>
13
+ − 88 <when value="no"/>
+ − 89 </conditional>
+ − 90 <conditional name="plot_adult_life_stage_cond">
+ − 91 <param name="plot_adult_life_stage" type="select" label="Plot adult life stage?">
+ − 92 <option value="yes" selected="true">Yes</option>
+ − 93 <option value="no">No</option>
+ − 94 </param>
+ − 95 <when value="yes">
17
+ − 96 <param name="life_stages_adult" type="select" multiple="true" label="Select adult life stage">
9
+ − 97 <option value="Total" selected="true">All</option>
+ − 98 <option value="Pre-vittelogenic">Pre-vittelogenic</option>
+ − 99 <option value="Vittelogenic">Vittelogenic</option>
+ − 100 <option value="Diapausing">Diapausing</option>
+ − 101 </param>
+ − 102 </when>
13
+ − 103 <when value="no"/>
9
+ − 104 </conditional>
+ − 105 <param name="plot_std_error" type="select" label="Plot standard error?">
+ − 106 <option value="yes" selected="True">Yes</option>
+ − 107 <option value="no">No</option>
0
+ − 108 </param>
+ − 109 </inputs>
+ − 110 <outputs>
9
+ − 111 <collection name="output_collection" type="list" label="${tool.name} ${location}, on ${on_string}">
+ − 112 <discover_datasets pattern="__name__" directory="output_dir" format="pdf" />
+ − 113 </collection>
0
+ − 114 </outputs>
+ − 115 <tests>
+ − 116 <test>
3
+ − 117 <param name="input" value="state_college.csv" ftype="csv" />
+ − 118 <param name="location" value="State College PA" />
12
+ − 119 <param name="replications" value="2" />
9
+ − 120 <output_collection name="output_collection" type="list">
12
+ − 121 <element name="total_pop_by_generation.pdf" file="total_pop_by_generation.pdf" ftype="pdf" compare="contains"/>
9
+ − 122 </output_collection>
0
+ − 123 </test>
+ − 124 </tests>
+ − 125 <help>
+ − 126 **What it does**
6
+ − 127
0
+ − 128 Provides an agent-based stochastic model expressing stage-specific phenology and population dynamics for an insect species across geographic regions.
+ − 129
+ − 130 -----
+ − 131
+ − 132 **Required options**
+ − 133
+ − 134 * **Location** - the location associated with the selected temperature data.
+ − 135 * **Temperature data** - select the dataset from your history containing the temperature data.
7
+ − 136 * **Select insect** - currently only the Brown Marmorated Stink Bug can be analyzed.
0
+ − 137 * **Number of replications** - number of replications.
6
+ − 138 * **Number of insects with which to start each replication** - the analysis for each replication will start with this number of insects.
0
+ − 139 * **Critical photoperiod for diapause induction/termination** - critical photoperiod for diapause induction/termination.
+ − 140 * **Adjustment rate for egg mortality** - adjustment rate for egg mortality.
+ − 141 * **Adjustment rate for nymph mortality** - adjustment rate for nymph mortality.
+ − 142 * **Adjustment rate for adult mortality** - adjustment rate for adult mortality.
+ − 143 * **Adjustment oviposition rate** - adjustment oviposition rate.
+ − 144 * **Adjustment of minimum clutch size** - adjustment of minimum clutch size.
+ − 145 * **Adjustment of maximum clutch size** - adjustment of maximum clutch size
6
+ − 146 * **Adjustment of degree-days accumulation (egg->young nymph)** - adjustment of degree-days accumulation (egg->young nymph).
+ − 147 * **Adjustment of degree-days accumulation (young nymph->old nymph)** - adjustment of degree-days accumulation (young nymph->old nymph).
+ − 148 * **Adjustment of degree-days accumulation (old nymph->adult)** - adjustment of degree-days accumulation (old nymph->adult).
9
+ − 149 * **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
+ − 150 * **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.
+ − 151 * **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.
+ − 152
+ − 153 * **Select nymph life stage** - select the nymph life stage for plotting.
+ − 154
+ − 155 * **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.
+ − 156
+ − 157 * **Select adult life stage** - select the adult life stage for plotting.
+ − 158
6
+ − 159 * **Plot standard error** - add standard error lines to plot.
0
+ − 160 </help>
+ − 161 <citations>
+ − 162 <citation type="doi">10.3389/fphys.2016.00165</citation>
3
+ − 163 <citation type="doi">10.1175/JTECH-D-11-00103.1</citation>
+ − 164 <citation type="doi">10.7289/V5D21VHZ</citation>
0
+ − 165 </citations>
+ − 166 </tool>