-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremake.yml
209 lines (147 loc) · 8.16 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
packages:
- dplyr
- tidyr
- ggplot2
- gridExtra
- GGally
- taxonlookup
- phytools
- diversitree
- vegan
- ggtree
- viridis
- mvabund
- boral #NOTE---- boral uses JAGS so you need to first install from http://sourceforge.net/projects/mcmc-jags/files/JAGS/
- circlize
- RCPmod
sources:
- code
targets:
all:
depends:
- derived_data/complete_subset_list.RData # data intermediate -- cleaned otu table and sample metadata
- output/otuSummary/otuSummary.csv
- output/otuSummary/sampleEffortCurves.pdf # Fig S4
- output/otuSummary/richness.pdf # Fig S1
- output/distances/fig_woodPhylo_woodTrait_fungDist.pdf # Fig 6
- output/distances/summary_woodPhylo_woodTrait_fungDist.csv # Table S3
- output/roleOfTraits/unconstrained_envfit.pdf # Fig S5
- output/roleOfTraits/constrained_bestmodelsummary.csv # Table S1
- output/roleOfTraits/mvabundAICs.csv # Table 1
- output/boral_roleOfTraits/summary_Xcoefs_allX.csv # Table 2
- output/boral_roleOfTraits/signifXcoefs_byOTUId_allX.pdf # Fig S6
- output/boral_cooccur/cor_distributions_allX.pdf # Fig 2
- output/boral_cooccur/chordDiagrams_allX.pdf # Fig 2
- output/boral_cooccur/cor_distributions_selectX.pdf # Fig S7
- output/boral_cooccur/corFreq_phylo_allX.pdf # Fig 3
- output/boral_cooccur/corFreq_troph_allX.pdf # Fig 3
- output/boral_cooccur/chordDiagrams_allX.csv # Table S2
- output/rcp_diagnostics/numOfgroups_diagnostics.pdf # Fig S3
- output/rcp_results/species_confmat.pdf # Fig 5
- output/rcp_results/species_studydesign.pdf # Fig 5
- output/rcp_results/partialEffects_select4.pdf # Fig 4
- output/rcp_results/partialEffects_theRest1.pdf # Fig S9
- output/rcp_results/partialEffects_theRest2.pdf # Fig S9
- output/rcp_results/expectedAbund_perRCP.pdf # Fig S8
# -------------------------------------------------------------------#
# load_data.R and plottingTheme.R : Load data and plotting theme
comm.otu.tmp:
command: load_matotu()
seqSamples:
command: load_seqSamples(mat.otu = comm.otu.tmp)
taxAndFunguild:
command: load_TaxAndFunguild(comm.otu = comm.otu.tmp)
comm.otu:
command: clean_comm(comm.otu.tmp = comm.otu.tmp, taxAndFunguild = taxAndFunguild)
zanneTree:
command: load_zanne_tree()
traits.code:
command: mergeTraitData()
complete_subset_list:
command: subset_and_make_list(seqSamples, traits.code, mat.otu = comm.otu)
derived_data/complete_subset_list.RData:
command: save_complete_subset_list(complete_subset_list)
# -------------------------------------------------------------------#
# summarize_OTUmat.R : Summarize the OTU matrix
output/otuSummary/otuSummary.csv:
command: calc_otu_summStats(comm.otu, taxAndFunguild)
output/otuSummary/sampleEffortCurves.pdf:
command: plot_sampleEffortCurves(comm.otu)
output/otuSummary/richness_fig.pdf:
command: plot_richness(comm.otu, seqSamples, taxAndFunguild, zanneTree)
# -------------------------------------------------------------------#
# distances.R : Compare wood phylogenetic distances, wood trait distances, and fungal community distances
pairDist:
command: calc_pairdist(zanneTree, comm.otu, traits.code, seqSamples)
output/distances/fig_woodPhylo_woodTrait_fungDist.pdf:
command: plot_woodDistfungDist_bothContinuous(pairDist)
output/distances/summary_woodPhylo_woodTrait_fungDist.csv:
command: write_woodDistfungDist_summary(pairDist)
# -------------------------------------------------------------------#
# roleOf_traits_on_fungi.R : Find out which wood traits are most important in shaping the fungal community
## distance-based methods
output/roleOfTraits/unconstrained_envfit.pdf:
command: plot_envfit_on_unconstrainedOrd(complete_subset_list, seqSamples)
output/roleOfTraits/constrained_bestmodelsummary.csv:
command: summary_bestmodel_constrainedOrd(complete_subset_list)
## mvabund methods
mod.m.list:
command: fit_mvabund(complete_subset_list)
output/roleOfTraits/mvabundAICs.csv:
command: write_mvabund_aicTable(mod.m.list)
# -------------------------------------------------------------------#
# boral_modfit.R : Run model-based constrained and unconstrained ordinations using the boral package
# Load the intermediate data into this workflow
# see linear_remake.R for details about how intermediate data was produced
TraitLVs_allXs.Xcoefs.df:
command: readRDS("derived_data/boralFits/Traits-and-LVs_allXs_allruns_Xcoefsreal.RData")
TraitLVs_allXs.cor.df:
command: readRDS("derived_data/boralFits/Traits-and-LVs_allXs_allruns_cordfreal.RData")
TraitLVs_selectXs.cor.df:
command: readRDS("derived_data/boralFits/Traits-and-LVs_selectXs_allruns_cordfreal.RData")
# -------------------------------------------------------------------#
# boral_roleOf_traits_on_fungi.R : Summarize the direction and magnitude that wood traits explain OTU abundances
output/boral_roleOfTraits/summary_Xcoefs_allX.csv:
command: write_summary_Xcoefs(fit.list = TraitLVs_allXs.Xcoefs.df, allXs = TRUE)
output/boral_roleOfTraits/signifXcoefs_byOTUId_allX.pdf:
command: plot_summary_Xcoefs_byOTUId(fit.list = TraitLVs_allXs.Xcoefs.df, taxAndFunguild, allXs = TRUE)
# -------------------------------------------------------------------#
# boral_cooccur.R : Summarize the direction and magnitude that OTU environmental and LV predictors covary
output/boral_cooccur/cor_distributions_allX.pdf:
command: plot_cor_distributions(fit.list = TraitLVs_allXs.cor.df, taxAndFunguild, allXs = TRUE)
output/boral_cooccur/chordDiagrams_allX.pdf:
command: make_chordDiagrams(fit.list = TraitLVs_allXs.cor.df, taxAndFunguild, allXs = TRUE)
output/boral_cooccur/cor_distributions_selectX.pdf:
command: plot_cor_distributions(fit.list = TraitLVs_selectXs.cor.df, taxAndFunguild, allXs = FALSE)
output/boral_cooccur/chordDiagrams_allX.csv:
command: make_chordDiagrams_table(fit.list = TraitLVs_allXs.cor.df, taxAndFunguild, complete_subset_list = complete_subset_list, allXs = TRUE)
output/boral_cooccur/corFreq_phylo_allX.pdf:
command: plot_corFreq_phylo(fit.list = TraitLVs_allXs.cor.df, taxAndFunguild, allXs = TRUE)
output/boral_cooccur/corFreq_troph_allX.pdf:
command: plot_corFreq_troph(fit.list = TraitLVs_allXs.cor.df, taxAndFunguild, allXs = TRUE)
# -------------------------------------------------------------------#
# rcp_modfit.R : Run mixtures-of-experts models to identify regions of common profiles (RCPs) among OTUs using wood trait measures as covariates
# Load the intermediate data into this workflow
# see linear_remake.R for details about how intermediate data was produced
rcp_output_results:
command: load_rcp_output_results(test = FALSE)
fm_rcp:
command: load_fm_rcp(test = FALSE)
# -------------------------------------------------------------------#
# rcp_diagnostics.R : Report fit diagnostics
output/rcp_diagnostics/numOfgroups_diagnostics.pdf:
command: plot_numOfgroups_diagnostics(rcp_output_results = rcp_output_results)
# -------------------------------------------------------------------#
# rcp_results.R
output/rcp_results/species_confmat.pdf:
command: plot_confus(fm_rcp = fm_rcp, complete_subset_list = complete_subset_list, seqSamples = seqSamples, zanneTree = zanneTree)
output/rcp_results/studydesign.pdf:
command: plot_studyDesign(seqSamples = seqSamples, zanneTree = zanneTree)
output/rcp_results/partialEffects_select4.pdf:
command: plot_partialEffects_select4(complete_subset_list = complete_subset_list, fm_rcp = fm_rcp)
output/rcp_results/partialEffects_theRest1.pdf:
command: plot_partialEffect_theRest1(complete_subset_list = complete_subset_list, fm_rcp = fm_rcp)
output/rcp_results/partialEffects_theRest2.pdf:
command: plot_partialEffect_theRest2(complete_subset_list = complete_subset_list, fm_rcp = fm_rcp)
output/rcp_results/expectedAbund_perRCP.pdf:
command: plot_mostabundTaxa_perRCP(fm_rcp = fm_rcp, taxAndFunguild = taxAndFunguild)