-
Notifications
You must be signed in to change notification settings - Fork 0
/
remake.yml
executable file
·243 lines (200 loc) · 5.27 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
packages:
- ade4
- adephylo
- ape
- mixchar
- dplyr
- grDevices
- graphics
- knitr
- magrittr
- minpack.lm
- phytools
- stats
- tools
- utils
- vegan
- xtable
sources:
- 'R/analyse_data.R'
- 'R/figures.R'
- 'R/load_data.R'
- 'R/tables.R'
- 'R/manuscript_functions.R'
targets:
all:
depends:
- figures
- tables
- manuscript.pdf
figures:
depends:
- figs/boxplot.png
- figs/fs_simulate.png
- figs/pairplot.png
- figs/phylo_all.png
- figs/raw_pca.png
- figs/raw_tga_three.png
- figs/tga_ar.png
- figs/tga_at.png
- figs/tga_pure_samples.png
- figs/tga_tda.png
- figs/tga_tdr.png
- figs/theory_plot.png
tables:
depends:
- figs/gen_bank_accessions.tex
- figs/mantel_results.tex
- figs/pca_loadings.tex
- figs/tga_param_table.tex
- figs/traits_table.tex
# --------- data ------------------------
species:
command: load_species(species_data = I("data-raw/species.csv"))
cleanup_level: purge
check: exists
carbon_nitrogen:
command: load_leco_traits(leco_data = I("data-raw/leco.csv"))
cleanup_level: purge
check: exists
economic_traits:
command: load_les_traits(trait_data = I("data-raw/traits.csv"),
species_data = species)
cleanup_level: purge
check: exists
tga_output:
command: tga_wrapper(species_data = species,
function_name = I(tga_deconvolve),
data_folder = I('data-raw/tga/'),
ranseed = I(1))
cleanup_level: purge
check: exists
biomass_traits:
command: load_tga_traits(tga_output)
cleanup_level: purge
check: exists
# ------- combine data -----------------
combined_traits:
command: traits_combine(species, carbon_nitrogen, economic_traits, biomass_traits)
cleanup_level: purge
mean_traits:
command: traits_mean_only(combined_traits)
cleanup_level: purge
logged_trait_matrix:
command: traits_log(mean_traits)
cleanup_level: purge
pca_output:
command: pca_data(logged_trait_matrix)
cleanup_level: purge
phylo_tree:
command: phylo_readtree("data-raw/phylo_tree.nwk")
cleanup_level: purge
check: exists
phylo_trts:
command: phylo_traits(phylo_tree, mean_traits)
cleanup_level: purge
raw_cl:
command: single_deconvolve("data-raw/raw_biomass/CL.csv")
cleanup_level: purge
raw_lg:
command: single_deconvolve("data-raw/raw_biomass/LG.csv")
cleanup_level: purge
tga_params:
command: extract_parameters(tga_output, species)
cleanup_level: purge
# -------- figures -------------
figs/theory_plot.png:
command: tga_theory_plots('data-raw/TGA/A_TGA.csv')
plot:
width: 1500
height: 480
figs/raw_tga_three.png:
command: tga_plot_three(tga_output, species,
species_names = I(c('T', 'LL', 'KK')))
plot:
width: 1500
height: 500
figs/tga_ar.png:
command: tga_plot_ar(tga_output, species, subfig = I('a'), gf = I('AR'))
plot:
width: 1500
height: 980
figs/tga_at.png:
command: tga_plot_at(tga_output, species, subfig = I('b'), gf = I('AT'))
plot:
width: 1500
height: 1940
figs/tga_tda.png:
command: tga_plot_tda(tga_output, species, subfig = I('c'), gf = I('Tda'))
plot:
width: 1500
height: 1460
figs/tga_tdr.png:
command: tga_plot_tdr(tga_output, species, subfig = I('d'), gf = I('Tdr'))
plot:
width: 1500
height: 980
figs/boxplot.png:
command: box_plot(mean_traits)
plot:
width: 1200
height: 950
figs/raw_pca.png:
command: pca(pca_output, logged_trait_matrix, species)
plot:
width: 1000
height: 950
figs/pairplot.png:
command: pair_plot(logged_trait_matrix)
plot:
width: 1500
height: 1500
figs/fs_simulate.png:
command: simulate_fraser_suzuki()
plot:
width: 800
height: 700
figs/tga_pure_samples.png:
command: tga_raw_plots(raw_cl, raw_lg)
plot:
width: 1200
height: 600
figs/phylo_all.png:
command: phylo_plot(phylo_tree, phylo_trts)
plot:
width: 1500
height: 1000
# --------- tables ---------
figs/tga_param_table.tex:
command: tga_param_table(tga_params, target_name)
figs/traits_table.tex:
command: traits_table(combined_traits, target_name)
figs/gen_bank_accessions.tex:
command: phylo_accessions("data-raw/GenBankAccessions.txt", target_name)
figs/mantel_results.tex:
command: phylo_mantel(phylo_tree, phylo_trts, target_name)
figs/pca_loadings.tex:
command: pca_loadings(pca_output, target_name)
# ------ report ---------
manuscript.tex:
depends:
- species
- carbon_nitrogen
- economic_traits
- tga_output
- biomass_traits
- combined_traits
- mean_traits
- logged_trait_matrix
- pca_output
- phylo_tree
- phylo_trts
- raw_cl
- raw_lg
- tga_params
knitr: TRUE
manuscript.pdf:
command: texi2pdf("manuscript.tex", clean = TRUE)
depends:
- figures
- tables