Mercurial > repos > greg > insect_phenology_model
changeset 9:d9371485aaf5 draft
Uploaded
author | greg |
---|---|
date | Tue, 27 Feb 2018 13:31:49 -0500 (2018-02-27) |
parents | 37f1ad91a949 |
children | 61bc6bd8807d |
files | insect_phenology_model.xml |
diffstat | 1 files changed, 65 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/insect_phenology_model.xml Tue Feb 13 13:53:37 2018 -0500 +++ b/insect_phenology_model.xml Tue Feb 27 13:31:49 2018 -0500 @@ -4,6 +4,20 @@ <requirement type="package" version="1.4.4">r-optparse</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ +#set stages = list() +#set life_stages_adult = "None" +#set life_stage_nymph = "None" +#set life_stages = $life_stages_cond.life_stages +#for life_stage in str($life_stages).split(","): + #if $life_stage == "Adult": + #set life_stages_adult = $life_stages_cond.life_stages_adult + #else if $life_stage == "Nymph": + #set life_stage_nymph = $life_stages_cond.life_stage_nymph + #end if + $stages.append($life_stage) +#end for +#set stages = ",".join($stages) +mkdir output_dir && Rscript '$__tool_directory__/insect_phenology_model.R' --adult_mortality $adult_mortality --adult_accumulation $adult_accumulation @@ -11,25 +25,32 @@ --input '$input' --insect '$insect' --insects_per_replication $insects_per_replication +--life_stages '$stages' +#if str($life_stages_adult) != "None": + --life_stages_adult $life_stages_adult +#end if +#if str($life_stage_nymph) != "None": + --life_stage_nymph $life_stage_nymph +#end if --location '$location' --max_clutch_size $max_clutch_size --min_clutch_size $min_clutch_size --nymph_mortality $nymph_mortality --num_days $input.metadata.data_lines --old_nymph_accumulation $old_nymph_accumulation ---output '$output' --oviposition $oviposition --photoperiod $photoperiod --replications $replications ---std_error_plot $std_error_plot +--plot_generations_separately $plot_generations_separately +--plot_std_error $plot_std_error --young_nymph_accumulation $young_nymph_accumulation]]></command> <inputs> <param name="input" type="data" format="csv" label="Temperature data" /> <param name="location" type="text" value="" optional="false" label="Location" /> <param name="insect" type="select" label="Select insect"> - <option value="Brown Marmorated Stink Bug" selected="True">Brown Marmorated Stink Bug</option> + <option value="BMSB" selected="True">Brown Marmorated Stink Bug</option> </param> - <param name="replications" type="integer" value="10" min="1" label="Number of replications" /> + <param name="replications" type="integer" value="10" min="2" label="Number of replications" /> <param name="insects_per_replication" type="integer" value="1000" min="1" label="Number of insects with which to start each replication" /> <param name="photoperiod" type="float" value="13.5" min="0" label="Critical photoperiod for diapause induction/termination" /> <param name="egg_mortality" type="integer" value="1" min="0" label="Adjustment rate for egg mortality" /> @@ -41,20 +62,53 @@ <param name="young_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (egg->young nymph)" /> <param name="old_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (young nymph->old nymph)" /> <param name="adult_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (old nymph->adult)" /> - <param name="std_error_plot" type="select" label="Plot standard error?"> - <option value="1" selected="True">Yes</option> - <option value="0">No</option> + <param name="plot_generations_separately" type="select" label="Plot generations separately?"> + <option value="yes" selected="True">Yes</option> + <option value="no">No</option> + </param> + <conditional name="life_stages_cond" label="Select life_stages for plotting"> + <param name="life_stages" type="select" label="Select life stages for plotting"> + <option value="Total" selected="true">All</option> + <option value="Egg">Egg</option> + <option value="Nymph">Nymph</option> + <option value="Adult">Adult</option> + </param> + <when value="Total"/> + <when value="Egg"/> + <when value="Nymph"> + <param name="life_stage_nymph" type="select" label="Select nymph life stage"> + <option value="Total" selected="true">All</option> + <option value="Young">Young</option> + <option value="Old">Old</option> + </param> + </when> + <when value="Adult"> + <param name="life_stages_adult" type="select" label="Select adult life stage"> + <option value="Total" selected="true">All</option> + <option value="Pre-vittelogenic">Pre-vittelogenic</option> + <option value="Vittelogenic">Vittelogenic</option> + <option value="Diapausing">Diapausing</option> + </param> + </when> + </conditional> + <param name="plot_std_error" type="select" label="Plot standard error?"> + <option value="yes" selected="True">Yes</option> + <option value="no">No</option> </param> </inputs> <outputs> - <data name="output" format="pdf" label="${tool.name} ${location}, on ${on_string}" /> + <collection name="output_collection" type="list" label="${tool.name} ${location}, on ${on_string}"> + <discover_datasets pattern="__name__" directory="output_dir" format="pdf" /> + </collection> </outputs> <tests> <test> <param name="input" value="state_college.csv" ftype="csv" /> <param name="location" value="State College PA" /> <param name="replications" value="10" /> - <output name="output" file="output.pdf" ftype="pdf" compare="contains" /> + <output_collection name="output_collection" type="list"> + <element name="output.pdf" file="output.pdf" ftype="pdf" compare="contains"/> + </output_collection> </test> </tests> <help> @@ -81,6 +135,8 @@ * **Adjustment of degree-days accumulation (egg->young nymph)** - adjustment of degree-days accumulation (egg->young nymph). * **Adjustment of degree-days accumulation (young nymph->old nymph)** - adjustment of degree-days accumulation (young nymph->old nymph). * **Adjustment of degree-days accumulation (old nymph->adult)** - adjustment of degree-days accumulation (old nymph->adult). + * **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. + * **Select life stages for plotting** - select any combinaton of Egg, Nymph, Adult or "All" for plotting. * **Plot standard error** - add standard error lines to plot. </help>