-
Notifications
You must be signed in to change notification settings - Fork 4
/
remake.yml
408 lines (324 loc) · 12 KB
/
remake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
packages:
- knitr
- plyr
- dplyr
- tidyr
- rstan
- cowplot
- ggplot2
- grid
- lubridate
- reshape2
sources:
- 'R/data_processing.R'
- 'R/models.R'
- 'R/model_output_processing.R'
- 'R/figures.R'
- 'R/build.R'
- 'R/manuscript_functions.R'
plot_options:
2col_wide_rectangle:
width: 6
height: 3.5
1col_wide_rectangle:
width: 3.46
height: 2.5
1col_widenarrow_rectangle:
width: 3.46
height: 2
2col_widenarrow_rectangle:
width: 6
height: 2.5
1_col_square:
width: 3.46
height: 3.46
2col_square:
width: 6.6
height: 6.6
1col_tall_rectangle:
width: 3.46
height: 4.2
targets:
all:
depends:
- export_processed_data
- export_model_fits
- figures
- manuscript/manuscript.pdf
- manuscript/supplementary.pdf
export_processed_data:
depends:
- processed_data/complete_field_survey_data.rds
- processed_data/complete_otc_seedling_data.rds
- processed_data/hourly_microclimate_data.rds
- processed_data/daily_microclimate_data.rds
- processed_data/overall_microclimate_summary.rds
export_model_fits:
depends:
- models/poadist_censored_model.rds
- models/gap_dynamic_model.rds
- models/non_tussock_otc_growth_model.rds
- models/tussock_otc_growth_model.rds
- models/non_tussock_otc_mortality_model.rds
- models/tussock_otc_mortality_model.rds
- models/recruit_model.rds
- models/greaus_seedling_density_model.rds
- models/asttry_seedling_density_model.rds
- models/greaus_seedling_max_ht_model.rds
- models/asttry_seedling_max_ht_model.rds
figures:
depends:
- manuscript/figures/fig2.pdf
- manuscript/figures/fig3.pdf
- manuscript/figures/fig4.pdf
- manuscript/figures/fig5.pdf
- manuscript/figures/fig6.pdf
- manuscript/figures/figS6.pdf
- manuscript/figures/figS7.pdf
- manuscript/figures/figS8.pdf
- manuscript/figures/figS11.pdf
- manuscript/figures/figS12.pdf
- manuscript/figures/figS13.pdf
- manuscript/figures/figS14.pdf
#------------- Clean data ---------------------------
cleaned_poa_distances:
command: clean_raw_censored_poa('raw_data/raw_poa_distances.csv')
cleanup_level: purge
check: exists
median_poa_distances:
command: calculate_median_poa_distances(cleaned_poa_distances, poadist_censored_model)
cleanup_level: purge
cleaned_otc_seedling_data:
command: clean_seedling_data('raw_data/seedling_growth.csv')
cleanup_level: purge
complete_otc_seedling_data:
command: merge_seedling_poa(cleaned_otc_seedling_data, median_poa_distances)
cleanup_level: purge
non_tussock_otc_growth_data:
command: get_growth_data(complete_otc_seedling_data, FALSE)
cleanup_level: purge
tussock_otc_growth_data:
command: get_growth_data(complete_otc_seedling_data, TRUE)
cleanup_level: purge
non_tussock_otc_mortality_data:
command: get_mortality_data(complete_otc_seedling_data, FALSE)
cleanup_level: purge
tussock_otc_mortality_data:
command: get_mortality_data(complete_otc_seedling_data, TRUE)
cleanup_level: purge
greaus_recruit_data:
command: read.csv("raw_data/grevillea_recruits.csv")
cleanup_level: purge
cleaned_unburnt_data:
command: clean_unburnt_data('raw_data/shrub_density_heights_unburnt.csv')
cleanup_level: purge
summarised_unburnt_data:
command: summarise_unburnt_data(cleaned_unburnt_data)
cleanup_level: purge
cleaned_burnt_density_data:
command: clean_burnt_density('raw_data/shrub_density_burnt.csv')
cleanup_level: purge
summarised_burnt_height_data:
command: clean_burnt_ht('raw_data/seedling_heights_burnt.csv')
cleanup_level: purge
site_vars:
command: read.csv('raw_data/site_variables.csv')
cleanup_level: purge
complete_field_survey_data:
command: merge_all_quadrat_data(summarised_unburnt_data,
cleaned_burnt_density_data,
summarised_burnt_height_data,
site_vars)
cleanup_level: purge
hmax_prior_data:
command: read.csv('raw_data/hmax.csv')
cleanup_level: purge
hmax:
command: hmax_priors(hmax_prior_data)
cleanup_level: purge
chamber_dates:
command: readRDS('raw_data/chamber_dates.rds')
cleanup_level: purge
hourly_microclimate_data:
command: process_hourly_microclimate('raw_data/otc_microstation_data.rds','raw_data/microstation_metadata.csv',I('ITEX2.0'),FALSE)
cleanup_level: purge
daily_microclimate_data:
command: aggregate_microclimate_to_day(hourly_microclimate_data)
cleanup_level: purge
overall_microclimate_summary:
command: calculate_overall_treatment_effects(hourly_microclimate_data, TRUE)
cleanup_level: purge
#------------- Run stan models ---------------------------
non_tussock_otc_growth_model:
command: run_non_tussock_growth_analysis(non_tussock_otc_growth_data, 70)
cleanup_level: purge
tussock_otc_growth_model:
command: run_tussock_growth_analysis(tussock_otc_growth_data)
cleanup_level: purge
non_tussock_otc_mortality_model:
command: run_non_tussock_mortalilty_model(non_tussock_otc_mortality_data)
cleanup_level: purge
tussock_otc_mortality_model:
command: run_tussock_mortality_model(tussock_otc_mortality_data)
cleanup_level: purge
recruit_model:
command: run_recruit_model(greaus_recruit_data)
cleanup_level: purge
greaus_seedling_density_model:
command: run_density_model(complete_field_survey_data, I("Grevillea"))
cleanup_level: purge
asttry_seedling_density_model:
command: run_density_model(complete_field_survey_data, I("Asterolasia"))
cleanup_level: purge
greaus_seedling_max_ht_model:
command: run_max_height_model(complete_field_survey_data, I("Grevillea"))
cleanup_level: purge
asttry_seedling_max_ht_model:
command: run_max_height_model(complete_field_survey_data, I("Asterolasia"))
cleanup_level: purge
gap_dynamic_model:
command: run_gap_dynamic_model(median_poa_distances, 10)
cleanup_level: purge
poadist_censored_model:
command: run_censored_model(cleaned_poa_distances)
cleanup_level: purge
check: exists
#------------ Export processed data ---------------------------
processed_data/complete_otc_seedling_data.rds:
command: saveRDS(complete_otc_seedling_data, target_name)
cleanup_level: purge
processed_data/grevillea_recruit_data.rds:
command: saveRDS(greaus_recruit_data, target_name)
cleanup_level: purge
processed_data/complete_field_survey_data.rds:
command: saveRDS(complete_field_survey_data, target_name)
cleanup_level: purge
processed_data/hourly_microclimate_data.rds:
command: saveRDS(hourly_microclimate_data, target_name)
cleanup_level: purge
processed_data/daily_microclimate_data.rds:
command: saveRDS(daily_microclimate_data, target_name)
cleanup_level: purge
processed_data/overall_microclimate_summary.rds:
command: saveRDS(overall_microclimate_summary, target_name)
cleanup_level: purge
#------------- Export stan models ---------------------------
models/poadist_censored_model.rds:
command: saveRDS(poadist_censored_model, target_name)
cleanup_level: purge
models/non_tussock_otc_growth_model.rds:
command: saveRDS(non_tussock_otc_growth_model, target_name)
cleanup_level: purge
models/tussock_otc_growth_model.rds:
command: saveRDS(tussock_otc_growth_model, target_name)
cleanup_level: purge
models/non_tussock_otc_mortality_model.rds:
command: saveRDS(non_tussock_otc_mortality_model, target_name)
cleanup_level: purge
models/tussock_otc_mortality_model.rds:
command: saveRDS(tussock_otc_mortality_model, target_name)
cleanup_level: purge
models/recruit_model.rds:
command: saveRDS(recruit_model, target_name)
cleanup_level: purge
models/gap_dynamic_model.rds:
command: saveRDS(gap_dynamic_model, target_name)
cleanup_level: purge
models/greaus_seedling_density_model.rds:
command: saveRDS(greaus_seedling_density_model, target_name)
cleanup_level: purge
models/asttry_seedling_density_model.rds:
command: saveRDS(asttry_seedling_density_model, target_name)
cleanup_level: purge
models/greaus_seedling_max_ht_model.rds:
command: saveRDS(greaus_seedling_max_ht_model, target_name)
cleanup_level: purge
models/asttry_seedling_max_ht_model.rds:
command: saveRDS(asttry_seedling_max_ht_model, target_name)
cleanup_level: purge
#------------- make figures ---------------------------
manuscript/figures/fig2.pdf:
command: density_count_plots(greaus_seedling_density_model, I('Grevillea'),I(c(0,25)))
plot: 1col_tall_rectangle
manuscript/figures/fig3.pdf:
command: obs_pred_ht_growth(non_tussock_otc_growth_data, non_tussock_otc_growth_model)
plot: 2col_wide_rectangle
manuscript/figures/fig4.pdf:
command: non_tussock_mortality_plot(non_tussock_otc_mortality_model)
plot: 1col_wide_rectangle
manuscript/figures/fig5.pdf:
command: tussock_plots(tussock_otc_growth_model,tussock_otc_mortality_model)
plot: 1_col_square
manuscript/figures/fig6.pdf:
command: gap_dynamics_plot(gap_dynamic_model)
plot: 1col_widenarrow_rectangle
manuscript/figures/figS6.pdf:
command: microclimate_diff_plots(hourly_microclimate_data,I('ITEX2.0'),I('mean'), stat_label = I('Mean'))
plot: 2col_square
manuscript/figures/figS7.pdf:
command: microclimate_diff_plots(hourly_microclimate_data,I('ITEX2.0'),I('mean_min'), stat_label = I('Mean minimum'))
plot: 2col_square
manuscript/figures/figS8.pdf:
command: microclimate_diff_plots(hourly_microclimate_data,I('ITEX2.0'),I('mean_max'), stat_label = I('Mean maximum'))
plot: 2col_square
manuscript/figures/figS11.pdf:
command: density_count_plots(asttry_seedling_density_model, I('Asterolasia'),I(c(0,50)))
plot:
width: 4
height: 6
manuscript/figures/figS12.pdf:
command: recruit_plot(recruit_model)
plot: 1col_wide_rectangle
manuscript/figures/figS13.pdf:
command: plot_obs_growth(non_tussock_otc_growth_data,I('stem_diam'), ylab =I('Observed stem diameter (cm)'))
plot: 2col_widenarrow_rectangle
manuscript/figures/figS14.pdf:
command: max_ht_plots(greaus_seedling_max_ht_model, asttry_seedling_max_ht_model)
plot:
width: 4
height: 6
#------------- make manuscript ---------------------------
manuscript/manuscript.tex:
depends:
- greaus_seedling_density_model
- asttry_seedling_density_model
- non_tussock_otc_growth_data
- non_tussock_otc_growth_model
- greaus_seedling_max_ht_model
- non_tussock_otc_mortality_data
- non_tussock_otc_mortality_model
- gap_dynamic_model
- chamber_dates
- hmax
- overall_microclimate_summary
- complete_field_survey_data
knitr: TRUE
manuscript/manuscript.pdf:
command: latex_build("manuscript/manuscript.tex", "manuscript/refs.bib", clean=TRUE)
depends:
- figures
- manuscript/gcb.cls
- manuscript/gcbresearcharticle.sty
- manuscript/widetext.sty
manuscript/supplementary.tex:
depends:
- non_tussock_otc_growth_data
- non_tussock_otc_mortality_data
- complete_field_survey_data
- cleaned_poa_distances
- chamber_dates
- hmax
- tussock_otc_growth_data
- complete_otc_seedling_data
- recruit_model
- greaus_seedling_density_model
- asttry_seedling_density_model
- overall_microclimate_summary
knitr: TRUE
manuscript/supplementary.pdf:
command: latex_build("manuscript/supplementary.tex", "manuscript/refs.bib", clean=TRUE)
depends:
- figures
- manuscript/gcb.cls
- manuscript/gcbresearcharticle.sty
- manuscript/widetext.sty