Mercurial > repos > greg > insect_phenology_model
comparison insect_phenology_model.xml @ 33:ef5add7dea47 draft
Uploaded
author | greg |
---|---|
date | Mon, 19 Mar 2018 14:48:57 -0400 |
parents | 94afb3e484c3 |
children | b7dcecf5476a |
comparison
equal
deleted
inserted
replaced
32:94afb3e484c3 | 33:ef5add7dea47 |
---|---|
2 <description>expressing stage-specific phenology and population dynamics</description> | 2 <description>expressing stage-specific phenology and population dynamics</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="1.4.4">r-optparse</requirement> | 4 <requirement type="package" version="1.4.4">r-optparse</requirement> |
5 </requirements> | 5 </requirements> |
6 <command detect_errors="exit_code"><![CDATA[ | 6 <command detect_errors="exit_code"><![CDATA[ |
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") | |
7 #set life_stages = list() | 11 #set life_stages = list() |
8 #set plot_adult_life_stage = $plot_adult_life_stage_cond.plot_adult_life_stage | 12 #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 | 13 #set plot_nymph_life_stage = $plot_nymph_life_stage_cond.plot_nymph_life_stage |
10 #if str($plot_egg_life_stage) == "yes": | 14 #if str($plot_egg_life_stage) == "yes": |
11 $life_stages.append("Egg") | 15 $life_stages.append("Egg") |
18 #end if | 22 #end if |
19 #if str($plot_egg_life_stage) == "yes" and str($plot_nymph_life_stage) == "yes" and str($plot_adult_life_stage) == "yes": | 23 #if str($plot_egg_life_stage) == "yes" and str($plot_nymph_life_stage) == "yes" and str($plot_adult_life_stage) == "yes": |
20 $life_stages.append("Total") | 24 $life_stages.append("Total") |
21 #end if | 25 #end if |
22 #set life_stages = ",".join($life_stages) | 26 #set life_stages = ",".join($life_stages) |
23 mkdir output_dir && | 27 mkdir output_data_dir && |
28 mkdir output_plots_dir && | |
24 Rscript '$__tool_directory__/insect_phenology_model.R' | 29 Rscript '$__tool_directory__/insect_phenology_model.R' |
25 --adult_mortality $adult_mortality | 30 --adult_mortality $adult_mortality |
26 --adult_accumulation $adult_accumulation | 31 --adult_accumulation $adult_accumulation |
27 --egg_mortality $egg_mortality | 32 --egg_mortality $egg_mortality |
28 --input '$input' | 33 --input '$input' |
45 --photoperiod $photoperiod | 50 --photoperiod $photoperiod |
46 --replications $replications | 51 --replications $replications |
47 --plot_generations_separately $plot_generations_separately | 52 --plot_generations_separately $plot_generations_separately |
48 --plot_std_error $plot_std_error | 53 --plot_std_error $plot_std_error |
49 --young_nymph_accumulation $young_nymph_accumulation | 54 --young_nymph_accumulation $young_nymph_accumulation |
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 | |
56 &>ipm_log.txt; | 55 &>ipm_log.txt; |
57 if [[ $? -ne 0 ]]; then | 56 if [[ $? -ne 0 ]]; then |
58 cp ipm_log.txt '$output_combined'; | 57 cp ipm_log.txt '$error_file'; |
59 exit 1; | 58 exit 1; |
60 fi]]></command> | 59 fi]]></command> |
61 <inputs> | 60 <inputs> |
62 <param name="input" type="data" format="csv" label="Temperature data" /> | 61 <param name="input" type="data" format="csv" label="Temperature data" /> |
63 <param name="location" type="text" value="" optional="false" label="Location" /> | 62 <param name="location" type="text" value="" optional="false" label="Location" /> |
117 <option value="yes" selected="True">Yes</option> | 116 <option value="yes" selected="True">Yes</option> |
118 <option value="no">No</option> | 117 <option value="no">No</option> |
119 </param> | 118 </param> |
120 </inputs> | 119 </inputs> |
121 <outputs> | 120 <outputs> |
122 <data name="output_p" format="csv" label="${tool.name} (P) on ${on_string}"> | 121 <collection name="output_data_collection" type="list" label="${tool.name} (data), on ${on_string}"> |
123 <filter>plot_generations_separately == 'yes'</filter> | 122 <discover_datasets pattern="__name__" directory="output_data_dir" format="csv" /> |
124 </data> | 123 </collection> |
125 <data name="output_f1" format="csv" label="${tool.name} (F1) on ${on_string}"> | 124 <collection name="output_plots_collection" type="list" label="${tool.name} (plots), on ${on_string}"> |
126 <filter>plot_generations_separately == 'yes'</filter> | 125 <discover_datasets pattern="__name__" directory="output_plots_dir" format="pdf" /> |
127 </data> | |
128 <data name="output_f2" format="csv" label="${tool.name} (F2) on ${on_string}"> | |
129 <filter>plot_generations_separately == 'yes'</filter> | |
130 </data> | |
131 <data name="output_combined" format="csv" label="${tool.name} (combined generations) on ${on_string}"/> | |
132 <collection name="output_collection" type="list" label="${tool.name} (plots), on ${on_string}"> | |
133 <discover_datasets pattern="__name__" directory="output_dir" format="pdf" /> | |
134 </collection> | 126 </collection> |
135 </outputs> | 127 </outputs> |
136 <tests> | 128 <tests> |
137 <test> | 129 <test> |
138 <param name="input" value="state_college.csv" ftype="csv" /> | 130 <param name="input" value="state_college.csv" ftype="csv" /> |
140 <param name="replications" value="2" /> | 132 <param name="replications" value="2" /> |
141 <param name="plot_generations_separately" value="no" /> | 133 <param name="plot_generations_separately" value="no" /> |
142 <param name="plot_egg_life_stage" value="no" /> | 134 <param name="plot_egg_life_stage" value="no" /> |
143 <param name="life_stages_nymph" value="Young" /> | 135 <param name="life_stages_nymph" value="Young" /> |
144 <param name="life_stages_adult" value="Pre-vittelogenic" /> | 136 <param name="life_stages_adult" value="Pre-vittelogenic" /> |
145 <output name="output_combined" file="output_combined1.csv" ftype="csv" compare="contains"/> | 137 <output_collection name="output_data_collection" type="list"> |
146 <output_collection name="output_collection" type="list"> | 138 <element name="04_combined_generations.csv" file="output_combined1.csv" ftype="csv" compare="contains"/> |
139 </output_collection> | |
140 <output_collection name="output_plots_collection" type="list"> | |
147 <element name="02_young_nymph_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> | 141 <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"/> | 142 <element name="05_pre-vittelogenic_adult_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> |
149 </output_collection> | 143 </output_collection> |
150 </test> | 144 </test> |
151 <test> | 145 <test> |
152 <param name="input" value="state_college.csv" ftype="csv" /> | 146 <param name="input" value="state_college.csv" ftype="csv" /> |
153 <param name="location" value="State College PA" /> | 147 <param name="location" value="State College PA" /> |
154 <param name="replications" value="2" /> | 148 <param name="replications" value="2" /> |
155 <param name="plot_generations_separately" value="no" /> | 149 <param name="plot_generations_separately" value="no" /> |
156 <output name="output_combined" file="output_combined2.csv" ftype="csv" compare="contains"/> | 150 <output_collection name="output_data_collection" type="list"> |
157 <output_collection name="output_collection" type="list"> | 151 <element name="04_combined_generations.csv" file="output_combined2.csv" ftype="csv" compare="contains"/> |
152 </output_collection> | |
153 <output_collection name="output_plots_collection" type="list"> | |
158 <element name="01_egg_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> | 154 <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"/> | 155 <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"/> | 156 <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"/> | 157 <element name="09_total_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> |
162 </output_collection> | 158 </output_collection> |
166 <param name="location" value="State College PA" /> | 162 <param name="location" value="State College PA" /> |
167 <param name="replications" value="2" /> | 163 <param name="replications" value="2" /> |
168 <param name="plot_egg_life_stage" value="no" /> | 164 <param name="plot_egg_life_stage" value="no" /> |
169 <param name="life_stages_nymph" value="Old" /> | 165 <param name="life_stages_nymph" value="Old" /> |
170 <param name="plot_adult_life_stage" value="no" /> | 166 <param name="plot_adult_life_stage" value="no" /> |
171 <output name="output_p" file="output_p_3.csv" ftype="csv" compare="contains"/> | 167 <output_collection name="output_data_collection" type="list"> |
172 <output name="output_f1" file="output_f1_3.csv" ftype="csv" compare="contains"/> | 168 <element name="01_generation_P.csv" file="output_p_3.csv" ftype="csv" compare="contains"/> |
173 <output name="output_f2" file="output_f2_3.csv" ftype="csv" compare="contains"/> | 169 <element name="02_generation_F1.csv" file="output_f1_3.csv" ftype="csv" compare="contains"/> |
174 <output name="output_combined" file="output_combined3.csv" ftype="csv" compare="contains"/> | 170 <element name="03_generation_F2.csv" file="output_f2_3.csv" ftype="csv" compare="contains"/> |
175 <output_collection name="output_collection" type="list"> | 171 <element name="04_combined_generations.csv" file="output_combined3.csv" ftype="csv" compare="contains"/> |
172 </output_collection> | |
173 <output_collection name="output_plots_collection" type="list"> | |
176 <element name="03_old_nymph_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> | 174 <element name="03_old_nymph_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> |
177 </output_collection> | 175 </output_collection> |
178 </test> | 176 </test> |
179 <test> | 177 <test> |
180 <param name="input" value="state_college.csv" ftype="csv" /> | 178 <param name="input" value="state_college.csv" ftype="csv" /> |
181 <param name="location" value="State College PA" /> | 179 <param name="location" value="State College PA" /> |
182 <param name="replications" value="2" /> | 180 <param name="replications" value="2" /> |
183 <output name="output_p" file="output_p_4.csv" ftype="csv" compare="contains"/> | 181 <output_collection name="output_data_collection" type="list"> |
184 <output name="output_f1" file="output_f1_4.csv" ftype="csv" compare="contains"/> | 182 <element name="01_generation_P.csv" file="output_p_4.csv" ftype="csv" compare="contains"/> |
185 <output name="output_f2" file="output_f2_4.csv" ftype="csv" compare="contains"/> | 183 <element name="02_generation_F1.csv" file="output_f1_4.csv" ftype="csv" compare="contains"/> |
186 <output name="output_combined" file="output_combined4.csv" ftype="csv" compare="contains"/> | 184 <element name="03_generation_F2.csv" file="output_f2_4.csv" ftype="csv" compare="contains"/> |
187 <output_collection name="output_collection" type="list"> | 185 <element name="04_combined_generations.csv" file="output_combined4.csv" ftype="csv" compare="contains"/> |
186 </output_collection> | |
187 <output_collection name="output_plots_collection" type="list"> | |
188 <element name="01_egg_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> | 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"/> | 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"/> | 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"/> | 191 <element name="09_total_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> |
192 </output_collection> | 192 </output_collection> |