Commit d5f590e9 authored by Georges Kunstler's avatar Georges Kunstler
Browse files

fixed bug in new version for tropicla plots

parent 0c2b3aa2
......@@ -4,7 +4,7 @@ D3 := output/processed
D4 := figs/test.format.tree
D5 := figs/test.traits
D6 := figs/test.CWM
sites:= Fushan NSW Paracou BCI Mbaiki Luquillo Japan Spain Sweden Canada France Swiss NVS US
sites:= Fushan NSW Paracou BCI Mbaiki Luquillo Japan Spain Sweden Canada France Swiss NVS US
D3Done := $(addsuffix /Done.no.txt,$(addprefix $(D3)/, $(sites) ))
D2traits := $(addsuffix /traits.csv,$(addprefix $(D2)/, $(sites) ))
D2tree := $(addsuffix /tree.csv,$(addprefix $(D2)/, $(sites) ))
......@@ -37,36 +37,36 @@ include mk/cible.tree.traits.mk
TRY: $(D2)/TRY/data.TRY.std.rds
$(D2)/TRY/data.TRY.std.rds:
R CMD BATCH scripts/format.data/TRY.R
Rscript scripts/format.data/TRY.R
#-------------------------------------------------------
GLOBAL: $(D3)/Done.txt
$(D3)/Done.txt: scripts/process.data/remove.out.R scripts/process.data/summarise.data.R $(D3)/Done.t.txt
R CMD BATCH $< ; rm remove.out.Rout
R CMD BATCH scripts/process.data/summarise.data.R ; rm summarise.data.Rout
R CMD BATCH scripts/process.data/plot.data.all.R ; rm plot.data.all.Rout
Rscript $<
Rscript scripts/process.data/summarise.data.R
Rscript scripts/process.data/plot.data.all.R
$(D3)/Done.t.txt: scripts/process.data/merge.all.processed.data.R $(sites)
R CMD BATCH $< ; rm merge.all.processed.data.Rout
Rscript $<
#-------------------------------------------------------
TEST.TREE: $(D4)/Done.txt tree.all.sites
$(D4)/Done.txt: scripts/format.data/test.tree.R $(D3tree)
R CMD BATCH $< ; rm test.tree.Rout; convert figs/test.format.tree/*.png figs/test.format.tree/all.tree.pdf
Rscript $< ; convert figs/test.format.tree/*.png figs/test.format.tree/all.tree.pdf
#-------------------------------------------------------
TEST.TRAITS: $(D5)/Done.txt #traits.all.sites
TEST.TRAITS: $(D5)/Done.txt traits.all.sites
$(D5)/Done.txt: scripts/find.trait/test.traits.R $(D3traits)
R CMD BATCH $< ; rm test.traits.Rout; convert figs/test.traits/*.pdf figs/test.traits/all.traits.pdf
Rscript $< ; convert figs/test.traits/*.pdf figs/test.traits/all.traits.pdf
#-------------------------------------------------------
TEST.CWM: $(D6)/Done.txt
$(D6)/Done.txt: scripts/process.data/test.tree.CWM.R $(D3Done)
R CMD BATCH $< ; rm test.tree.CWM.Rout ; convert figs/test.processed/*.p* figs/test.processed/all.CWM.pdf
Rscript $< ; convert figs/test.processed/*.p* figs/test.processed/all.CWM.pdf
#-------------------------------------------------------
......
......@@ -77,14 +77,13 @@ fun.trait.format <- function(trait, traits.data, vec.sp) {
# extract genus
genus <- fun.extract.trait.add.missing.sp.NA(vec.sp, traits.data,
genus.name)
cat <- fun.extract.cat.add.missing.sp.A_EV(vec.sp, traits.data)
## fill with mean or keep only species value
trait.fill <- trait.species <-trait.genus
trait.fill[is.na(trait.fill)] <- mean( traits.data[, trait.name],
na.rm = TRUE)
trait.species[genus == TRUE & !is.na(genus)] <- NA
res <- cbind(trait.species, trait.genus, trait.fill, cat)
dimnames(res) <- list(vec.sp, c('species', 'genus', 'fill', 'cat'))
res <- cbind(trait.species, trait.genus, trait.fill)
dimnames(res) <- list(vec.sp, c('species', 'genus', 'fill'))
return(res)
}
......@@ -370,7 +369,7 @@ return(res.vec)
##
fun.CWM.traits.all.XY <- function(obs.id, xy.table, diam,
fun.CWM.traits.all.XY <- function(obs.id, xy.table, BA.w,
sp, data.TRAITS, Rlim ){
require(Rcpp, quietly=TRUE)
## require(plyr, quietly=TRUE)
......@@ -379,7 +378,6 @@ name.var <- c("focal", "CWM.fill",
"perc.genus", "perc.species")
cat("Start process data for one census of one cluster with number of observation ",
nrow(xy.table), "\n")
BA.a <- BA.w
sp.num <- unclass(factor(sp))
sp.names <- as.character(levels(factor(sp)))
## format traits list
......@@ -389,22 +387,20 @@ ans <- t(sapply(obs.id,
fun.CWM.traits.xy, obs.id=obs.id,
traits.list=list.traits, sp.num=sp.num, sp.names = sp.names,
sp.length=length(levels(sp.num)),
xy.table=xy.table, BA.a=BA.a, Rlim=Rlim))
xy.table=xy.table, BA.a=BA.w, Rlim=Rlim))
colnames(ans) <- c("obs.id", unlist(lapply(names(list.traits),
FUN=function(x, y) paste(x, y, sep="."),
y=name.var)),
"BATOT")
return(ans)
return(as.data.frame(ans))
}
fun.CWM.XY.cluster.census <- function(data, Rlim){
fun.CWM.XY.cluster.census <- function(data, data.TRAITS, Rlim){
CWM.temp <- fun.CWM.traits.all.XY(data$obs.id,
data[, c('x', 'y')],
data$D,
as.matrix(data[, c('x', 'y')]),
data$BA.w,
data$sp,
data.TRAITS, Rlim)
......@@ -416,13 +412,13 @@ fun.CWM.traits.TOT.XY.dplyr <- function(data, data.TRAITS, Rlim){
require(dplyr)
data <- tbl_df(data)
data <- mutate(data,
plot.c = paste(plot, census, sep ='_'),
plot.c = paste(cluster, census, sep ='_'),
BA.w = BA.fun(D, 1/(pi * Rlim^2)))
# compute CWM
data.CWM <- data %>% group_by(plot.c) %>%
do(fun.CWM.XY.cluster.census(., Rlim = Rlim)) %>%
ungroup() %>% select(-plot.c)
do(fun.CWM.XY.cluster.census(., data.TRAITS = data.TRAITS, Rlim = Rlim)) %>%
ungroup() %>% dplyr::select(-plot.c)
data <- left_join(data, data.CWM, by = 'obs.id')
return(data)
......@@ -546,7 +542,7 @@ for (i in unique(data$ecocode)){
## add Phylo.group and Pheno.T to the data
data.merged <- left_join(data.merged,
data.TRAITS[, c("sp", "Phylo.group",
"Pheno.T", 'LeafType.T')],
"Pheno.T", 'LeafType.T', 'cat')],
by="sp")
if(std.traits == 'local'){
write.csv(data.merged,
......
BCI: $(D3)/BCI/Done.no.txt $(D3)/BCI/Done.log.txt
$(D3)/BCI/Done.no.txt: scripts/process.data/BCI.no.R R/process.data/process-fun.R $(D2)/BCI/traits.csv
R CMD BATCH $< ; rm BCI.no.Rout
$(D3)/BCI/Done.no.txt: R/process.data/process-fun.R $(D2)/BCI/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('BCI', Rlim=15,std.traits='no');"
$(D3)/BCI/Done.log.txt: scripts/process.data/BCI.log.R R/process.data/process-fun.R $(D2)/BCI/traits.csv
R CMD BATCH $< ; rm BCI.log.Rout
$(D3)/BCI/Done.log.txt: R/process.data/process-fun.R $(D2)/BCI/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('BCI', Rlim=15,std.traits='log');"
$(D2)/BCI/traits.csv: scripts/find.trait/BCI.R R/find.trait/trait-fun.R $(D2)/BCI/tree.csv
R CMD BATCH $< ; rm BCI.Rout
Rscript $<
$(D2)/BCI/tree.csv: scripts/format.data/BCI.R $(shell find $(D1)/BCI -type f)
R CMD BATCH $< ; rm BCI.Rout
Rscript $<
Canada: $(D3)/Canada/Done.no.txt $(D3)/Canada/Done.log.txt
$(D3)/Canada/Done.no.txt: scripts/process.data/Canada.no.R R/process.data/process-fun.R $(D2)/Canada/traits.csv
R CMD BATCH $< ; rm Canada.no.Rout
$(D3)/Canada/Done.no.txt: R/process.data/process-fun.R $(D2)/Canada/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Canada',std.traits='no');"
$(D3)/Canada/Done.log.txt: scripts/process.data/Canada.log.R R/process.data/process-fun.R $(D2)/Canada/traits.csv
R CMD BATCH $< ; rm Canada.log.Rout
$(D3)/Canada/Done.log.txt: R/process.data/process-fun.R $(D2)/Canada/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Canada',std.traits='log');"
$(D2)/Canada/traits.csv: scripts/find.trait/Canada.R R/find.trait/trait-fun.R $(D2)/Canada/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm Canada.Rout
Rscript $<
$(D2)/Canada/tree.csv: scripts/format.data/Canada.R $(shell find $(D1)/Canada -type f)
R CMD BATCH $< ; rm Canada.Rout
Rscript $<
France: $(D3)/France/Done.no.txt $(D3)/France/Done.log.txt
$(D3)/France/Done.no.txt: scripts/process.data/France.no.R R/process.data/process-fun.R $(D2)/France/traits.csv
R CMD BATCH $< ; rm France.no.Rout
$(D3)/France/Done.no.txt: R/process.data/process-fun.R $(D2)/France/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('France',std.traits='no');"
$(D3)/France/Done.log.txt: scripts/process.data/France.log.R R/process.data/process-fun.R $(D2)/France/traits.csv
R CMD BATCH $< ; rm France.log.Rout
$(D3)/France/Done.log.txt: R/process.data/process-fun.R $(D2)/France/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('France',std.traits='log');"
$(D2)/France/traits.csv: scripts/find.trait/France.R R/find.trait/trait-fun.R $(D2)/France/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm France.Rout
Rscript $<
$(D2)/France/tree.csv: scripts/format.data/France.R $(shell find $(D1)/France -type f)
R CMD BATCH $< ; rm France.Rout
Rscript $<
Fushan: $(D3)/Fushan/Done.no.txt $(D3)/Fushan/Done.log.txt
$(D3)/Fushan/Done.no.txt: scripts/process.data/Fushan.no.R R/process.data/process-fun.R $(D2)/Fushan/traits.csv
R CMD BATCH $< ; rm Fushan.no.Rout
$(D3)/Fushan/Done.no.txt: R/process.data/process-fun.R $(D2)/Fushan/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Fushan', Rlim=15,std.traits='no');"
$(D3)/Fushan/Done.log.txt: scripts/process.data/Fushan.log.R R/process.data/process-fun.R $(D2)/Fushan/traits.csv
R CMD BATCH $< ; rm Fushan.log.Rout
$(D3)/Fushan/Done.log.txt: R/process.data/process-fun.R $(D2)/Fushan/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Fushan', Rlim=15,std.traits='log');"
$(D2)/Fushan/traits.csv: scripts/find.trait/Fushan.R R/find.trait/trait-fun.R $(D2)/Fushan/tree.csv
R CMD BATCH $< ; rm Fushan.Rout
Rscript $<
$(D2)/Fushan/tree.csv: scripts/format.data/Fushan.R $(shell find $(D1)/Fushan -type f)
R CMD BATCH $< ; rm Fushan.Rout
Rscript $<
Japan: $(D3)/Japan/Done.no.txt $(D3)/Japan/Done.log.txt
$(D3)/Japan/Done.no.txt: scripts/process.data/Japan.no.R R/process.data/process-fun.R $(D2)/Japan/traits.csv
R CMD BATCH $< ; rm Japan.no.Rout
$(D3)/Japan/Done.no.txt: R/process.data/process-fun.R $(D2)/Japan/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Japan', Rlim=15,std.traits='no');"
$(D3)/Japan/Done.log.txt: scripts/process.data/Japan.log.R R/process.data/process-fun.R $(D2)/Japan/traits.csv
R CMD BATCH $< ; rm Japan.log.Rout
$(D3)/Japan/Done.log.txt: R/process.data/process-fun.R $(D2)/Japan/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Japan', Rlim=15,std.traits='log');"
$(D2)/Japan/traits.csv: scripts/find.trait/Japan.R R/find.trait/trait-fun.R $(D2)/Japan/tree.csv
R CMD BATCH $< ; rm Japan.Rout
Rscript $<
$(D2)/Japan/tree.csv: scripts/format.data/Japan.R $(shell find $(D1)/Japan -type f)
R CMD BATCH $< ; rm Japan.Rout
Rscript $<
Luquillo: $(D3)/Luquillo/Done.no.txt $(D3)/Luquillo/Done.log.txt
$(D3)/Luquillo/Done.no.txt: scripts/process.data/Luquillo.no.R R/process.data/process-fun.R $(D2)/Luquillo/traits.csv
R CMD BATCH $< ; rm Luquillo.no.Rout
$(D3)/Luquillo/Done.no.txt: R/process.data/process-fun.R $(D2)/Luquillo/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Luquillo', Rlim=15,std.traits='no');"
$(D3)/Luquillo/Done.log.txt: scripts/process.data/Luquillo.log.R R/process.data/process-fun.R $(D2)/Luquillo/traits.csv
R CMD BATCH $< ; rm Luquillo.log.Rout
$(D3)/Luquillo/Done.log.txt: R/process.data/process-fun.R $(D2)/Luquillo/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Luquillo', Rlim=15,std.traits='log');"
$(D2)/Luquillo/traits.csv: scripts/find.trait/Luquillo.R R/find.trait/trait-fun.R $(D2)/Luquillo/tree.csv
R CMD BATCH $< ; rm Luquillo.Rout
Rscript $<
$(D2)/Luquillo/tree.csv: scripts/format.data/Luquillo.R $(shell find $(D1)/Luquillo -type f)
R CMD BATCH $< ; rm Luquillo.Rout
Rscript $<
Mbaiki: $(D3)/Mbaiki/Done.no.txt $(D3)/Mbaiki/Done.log.txt
$(D3)/Mbaiki/Done.no.txt: scripts/process.data/Mbaiki.no.R R/process.data/process-fun.R $(D2)/Mbaiki/traits.csv
R CMD BATCH $< ; rm Mbaiki.no.Rout
$(D3)/Mbaiki/Done.no.txt: R/process.data/process-fun.R $(D2)/Mbaiki/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Mbaiki', Rlim=15,std.traits='no');"
$(D3)/Mbaiki/Done.log.txt: scripts/process.data/Mbaiki.log.R R/process.data/process-fun.R $(D2)/Mbaiki/traits.csv
R CMD BATCH $< ; rm Mbaiki.log.Rout
$(D3)/Mbaiki/Done.log.txt: R/process.data/process-fun.R $(D2)/Mbaiki/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Mbaiki', Rlim=15,std.traits='log');"
$(D2)/Mbaiki/traits.csv: scripts/find.trait/Mbaiki.R R/find.trait/trait-fun.R $(D2)/Mbaiki/tree.csv
R CMD BATCH $< ; rm Mbaiki.Rout
Rscript $<
$(D2)/Mbaiki/tree.csv: scripts/format.data/Mbaiki.R $(shell find $(D1)/Mbaiki -type f)
R CMD BATCH $< ; rm Mbaiki.Rout
Rscript $<
NSW: $(D3)/NSW/Done.no.txt $(D3)/NSW/Done.log.txt
$(D3)/NSW/Done.no.txt: scripts/process.data/NSW.no.R R/process.data/process-fun.R $(D2)/NSW/traits.csv
R CMD BATCH $< ; rm NSW.no.Rout
$(D3)/NSW/Done.no.txt: R/process.data/process-fun.R $(D2)/NSW/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('NSW',std.traits='no');"
$(D3)/NSW/Done.log.txt: scripts/process.data/NSW.log.R R/process.data/process-fun.R $(D2)/NSW/traits.csv
R CMD BATCH $< ; rm NSW.log.Rout
$(D3)/NSW/Done.log.txt: R/process.data/process-fun.R $(D2)/NSW/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('NSW',std.traits='log');"
$(D2)/NSW/traits.csv: scripts/find.trait/NSW.R R/find.trait/trait-fun.R $(D2)/NSW/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm NSW.Rout
Rscript $<
$(D2)/NSW/tree.csv: scripts/format.data/NSW.R $(shell find $(D1)/NSW -type f)
R CMD BATCH $< ; rm NSW.Rout
Rscript $<
NVS: $(D3)/NVS/Done.no.txt $(D3)/NVS/Done.log.txt
$(D3)/NVS/Done.no.txt: scripts/process.data/NVS.no.R R/process.data/process-fun.R $(D2)/NVS/traits.csv
R CMD BATCH $< ; rm NVS.no.Rout
$(D3)/NVS/Done.no.txt: R/process.data/process-fun.R $(D2)/NVS/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('NVS',std.traits='no');"
$(D3)/NVS/Done.log.txt: scripts/process.data/NVS.log.R R/process.data/process-fun.R $(D2)/NVS/traits.csv
R CMD BATCH $< ; rm NVS.log.Rout
$(D3)/NVS/Done.log.txt: R/process.data/process-fun.R $(D2)/NVS/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('NVS',std.traits='log');"
$(D2)/NVS/traits.csv: scripts/find.trait/NVS.R R/find.trait/trait-fun.R $(D2)/NVS/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm NVS.Rout
Rscript $<
$(D2)/NVS/tree.csv: scripts/format.data/NVS.R $(shell find $(D1)/NVS -type f)
R CMD BATCH $< ; rm NVS.Rout
Rscript $<
Paracou: $(D3)/Paracou/Done.no.txt $(D3)/Paracou/Done.log.txt
$(D3)/Paracou/Done.no.txt: scripts/process.data/Paracou.no.R R/process.data/process-fun.R $(D2)/Paracou/traits.csv
R CMD BATCH $< ; rm Paracou.no.Rout
$(D3)/Paracou/Done.no.txt: R/process.data/process-fun.R $(D2)/Paracou/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Paracou', Rlim=15,std.traits='no');"
$(D3)/Paracou/Done.log.txt: scripts/process.data/Paracou.log.R R/process.data/process-fun.R $(D2)/Paracou/traits.csv
R CMD BATCH $< ; rm Paracou.log.Rout
$(D3)/Paracou/Done.log.txt: R/process.data/process-fun.R $(D2)/Paracou/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('Paracou', Rlim=15,std.traits='log');"
$(D2)/Paracou/traits.csv: scripts/find.trait/Paracou.R R/find.trait/trait-fun.R $(D2)/Paracou/tree.csv
R CMD BATCH $< ; rm Paracou.Rout
Rscript $<
$(D2)/Paracou/tree.csv: scripts/format.data/Paracou.R $(shell find $(D1)/Paracou -type f)
R CMD BATCH $< ; rm Paracou.Rout
Rscript $<
Spain: $(D3)/Spain/Done.no.txt $(D3)/Spain/Done.log.txt
$(D3)/Spain/Done.no.txt: scripts/process.data/Spain.no.R R/process.data/process-fun.R $(D2)/Spain/traits.csv
R CMD BATCH $< ; rm Spain.no.Rout
$(D3)/Spain/Done.no.txt: R/process.data/process-fun.R $(D2)/Spain/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Spain',std.traits='no');"
$(D3)/Spain/Done.log.txt: scripts/process.data/Spain.log.R R/process.data/process-fun.R $(D2)/Spain/traits.csv
R CMD BATCH $< ; rm Spain.log.Rout
$(D3)/Spain/Done.log.txt: R/process.data/process-fun.R $(D2)/Spain/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Spain',std.traits='log');"
$(D2)/Spain/traits.csv: scripts/find.trait/Spain.R R/find.trait/trait-fun.R $(D2)/Spain/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm Spain.Rout
Rscript $<
$(D2)/Spain/tree.csv: scripts/format.data/Spain.R $(shell find $(D1)/Spain -type f)
R CMD BATCH $< ; rm Spain.Rout
Rscript $<
Sweden: $(D3)/Sweden/Done.no.txt $(D3)/Sweden/Done.log.txt
$(D3)/Sweden/Done.no.txt: scripts/process.data/Sweden.no.R R/process.data/process-fun.R $(D2)/Sweden/traits.csv
R CMD BATCH $< ; rm Sweden.no.Rout
$(D3)/Sweden/Done.no.txt: R/process.data/process-fun.R $(D2)/Sweden/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Sweden',std.traits='no');"
$(D3)/Sweden/Done.log.txt: scripts/process.data/Sweden.log.R R/process.data/process-fun.R $(D2)/Sweden/traits.csv
R CMD BATCH $< ; rm Sweden.log.Rout
$(D3)/Sweden/Done.log.txt: R/process.data/process-fun.R $(D2)/Sweden/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Sweden',std.traits='log');"
$(D2)/Sweden/traits.csv: scripts/find.trait/Sweden.R R/find.trait/trait-fun.R $(D2)/Sweden/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm Sweden.Rout
Rscript $<
$(D2)/Sweden/tree.csv: scripts/format.data/Sweden.R $(shell find $(D1)/Sweden -type f)
R CMD BATCH $< ; rm Sweden.Rout
Rscript $<
Swiss: $(D3)/Swiss/Done.no.txt $(D3)/Swiss/Done.log.txt
$(D3)/Swiss/Done.no.txt: scripts/process.data/Swiss.no.R R/process.data/process-fun.R $(D2)/Swiss/traits.csv
R CMD BATCH $< ; rm Swiss.no.Rout
$(D3)/Swiss/Done.no.txt: R/process.data/process-fun.R $(D2)/Swiss/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Swiss',std.traits='no');"
$(D3)/Swiss/Done.log.txt: scripts/process.data/Swiss.log.R R/process.data/process-fun.R $(D2)/Swiss/traits.csv
R CMD BATCH $< ; rm Swiss.log.Rout
$(D3)/Swiss/Done.log.txt: R/process.data/process-fun.R $(D2)/Swiss/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('Swiss',std.traits='log');"
$(D2)/Swiss/traits.csv: scripts/find.trait/Swiss.R R/find.trait/trait-fun.R $(D2)/Swiss/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm Swiss.Rout
Rscript $<
$(D2)/Swiss/tree.csv: scripts/format.data/Swiss.R $(shell find $(D1)/Swiss -type f)
R CMD BATCH $< ; rm Swiss.Rout
Rscript $<
US: $(D3)/US/Done.no.txt $(D3)/US/Done.log.txt
$(D3)/US/Done.no.txt: scripts/process.data/US.no.R R/process.data/process-fun.R $(D2)/US/traits.csv
R CMD BATCH $< ; rm US.no.Rout
$(D3)/US/Done.no.txt: R/process.data/process-fun.R $(D2)/US/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('US',std.traits='no');"
$(D3)/US/Done.log.txt: scripts/process.data/US.log.R R/process.data/process-fun.R $(D2)/US/traits.csv
R CMD BATCH $< ; rm US.log.Rout
$(D3)/US/Done.log.txt: R/process.data/process-fun.R $(D2)/US/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('US',std.traits='log');"
$(D2)/US/traits.csv: scripts/find.trait/US.R R/find.trait/trait-fun.R $(D2)/US/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm US.Rout
Rscript $<
$(D2)/US/tree.csv: scripts/format.data/US.R $(shell find $(D1)/US -type f)
R CMD BATCH $< ; rm US.Rout
Rscript $<
set.big: $(D3)/set.big/Done.no.txt $(D3)/set.big/Done.log.txt
$(D3)/set.big/Done.no.txt: scripts/process.data/set.big.no.R R/process.data/process-fun.R $(D2)/set.big/traits.csv
R CMD BATCH $< ; rm set.big.no.Rout
$(D3)/set.big/Done.no.txt: R/process.data/process-fun.R $(D2)/set.big/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('set.big', Rlim=15,std.traits='no');"
$(D3)/set.big/Done.log.txt: scripts/process.data/set.big.log.R R/process.data/process-fun.R $(D2)/set.big/traits.csv
R CMD BATCH $< ; rm set.big.log.Rout
$(D3)/set.big/Done.log.txt: R/process.data/process-fun.R $(D2)/set.big/traits.csv
Rscript -e "source('$<'); process_bigplot_dataset('set.big', Rlim=15,std.traits='log');"
$(D2)/set.big/traits.csv: scripts/find.trait/set.big.R R/find.trait/trait-fun.R $(D2)/set.big/tree.csv
R CMD BATCH $< ; rm set.big.Rout
Rscript $<
$(D2)/set.big/tree.csv: scripts/format.data/set.big.R $(shell find $(D1)/set.big -type f)
R CMD BATCH $< ; rm set.big.Rout
Rscript $<
set.inv: $(D3)/set.inv/Done.no.txt $(D3)/set.inv/Done.log.txt
$(D3)/set.inv/Done.no.txt: scripts/process.data/set.inv.no.R R/process.data/process-fun.R $(D2)/set.inv/traits.csv
R CMD BATCH $< ; rm set.inv.no.Rout
$(D3)/set.inv/Done.no.txt: R/process.data/process-fun.R $(D2)/set.inv/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('set.inv',std.traits='no');"
$(D3)/set.inv/Done.log.txt: scripts/process.data/set.inv.log.R R/process.data/process-fun.R $(D2)/set.inv/traits.csv
R CMD BATCH $< ; rm set.inv.log.Rout
$(D3)/set.inv/Done.log.txt: R/process.data/process-fun.R $(D2)/set.inv/traits.csv
Rscript -e "source('$<'); process_inventory_dataset('set.inv',std.traits='log');"
$(D2)/set.inv/traits.csv: scripts/find.trait/set.inv.R R/find.trait/trait-fun.R $(D2)/set.inv/tree.csv $(D2)/TRY/data.TRY.std.rds
R CMD BATCH $< ; rm set.inv.Rout
Rscript $<
$(D2)/set.inv/tree.csv: scripts/format.data/set.inv.R $(shell find $(D1)/set.inv -type f)
R CMD BATCH $< ; rm set.inv.Rout
Rscript $<
source('R/process.data/process-fun.R')
process_bigplot_dataset('BCI', Rlim=15,std.traits='log')
source('R/process.data/process-fun.R')
process_bigplot_dataset('BCI', Rlim=15,std.traits='no')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment