Commit cb7917e8 authored by kunstler's avatar kunstler
Browse files

add null model

parent 7da76571
......@@ -27,6 +27,9 @@ run.model.for.set.one.trait <- function(model.file, fun.model, trait,
#=====================================================================
path.model <- "R/analysis/model.lmer"
model.files.lmer.Tf.0 <- file.path(path.model,
c("model.lmer.LOGLIN.r.set.species.R",
"model.lmer.LOGLIN.r.set.fixed.biomes.species.R"))
model.files.lmer.Tf.1 <- file.path(path.model,
c("model.lmer.LOGLIN.ER.AD.Tf.r.set.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species.R"))
......
load.model <- function () {
list(name="lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species",
list(name="lmer.LOGLIN.r.set.fixed.biomes.species",
var.BLUP = 'set.id',
lmer.formula.tree.id=formula("logG~1+(1|set.id)+(1|species.id)+(1|plot.id)+biomes.id+Tf+Tf:biomes.id+logD+sumBn+sumBn:biomes.id+sumTfBn+sumTfBn:biomes.id+sumTnBn+sumTnBn:biomes.id+sumTnTfBn.abs+sumTnTfBn.abs:biomes.id +(logD-1|species.id) +(sumBn-1|species.id)+(Tf-1|set.id)+(sumBn-1|set.id)+(sumTfBn-1|set.id)+(sumTnBn-1|set.id)+(sumTnTfBn.abs-1|set.id)"))
lmer.formula.tree.id=formula("logG~1+(1|set.id)+(1|species.id)+(1|plot.id)+biomes.id+Tf+Tf:biomes.id+logD+sumBn+sumBn:biomes.id+sumTfBn+sumTfBn:biomes.id+sumTnBn+sumTnBn:biomes.id+sumTnTfBn.abs+sumTnTfBn.abs:biomes.id +(logD-1|species.id) +(sumBn-1|species.id)+(sumBn-1|set.id)+(Tf-1|set.id)+(sumBn-1|set.id)+(sumTfBn-1|set.id)+(sumTnBn-1|set.id)+(sumTnTfBn.abs-1|set.id)"))
}
load.model <- function () {
list(name="lmer.LOGLIN.r.set.fixed.biomes.species",
var.BLUP = 'set.id',
lmer.formula.tree.id=formula("logG~1+(1|set.id)+(1|species.id)+(1|plot.id)+biomes.id+logD+sumBn+sumBn:biomes.id +(logD-1|species.id) +(sumBn-1|species.id)+(sumBn-1|set.id)"))
}
load.model <- function () {
list(name="lmer.LOGLIN.r.set.species",
var.BLUP = 'set.id',
lmer.formula.tree.id=formula("logG~1+(1|set.id)+(1|species.id)+(1|plot.id)+logD+sumBn +(logD-1|species.id) +(sumBn-1|species.id)+(sumBn-1|set.id)"))
}
......@@ -22,30 +22,37 @@ samplesize=$1
# "'Seed.mass'" "'Leaf.N'"
for trait in "'SLA'" "'Wood.density'" "'Max.height'" ; do
# # ALL data
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[1], run.lmer,$trait);print('done')\"" > Rscript_temp/allf${trait}.sh
qsub Rscript_temp/allf${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0[1], run.lmer,$trait);print('done')\"" > Rscript_temp/all0${trait}.sh
qsub Rscript_temp/all0${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.0${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/all02${trait}.sh
qsub Rscript_temp/all02${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.02${trait}" -q opt32G -j oe
# # # ALL data
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[1], run.lmer,$trait);print('done')\"" > Rscript_temp/allf${trait}.sh
# qsub Rscript_temp/allf${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/allf2${trait}.sh
qsub Rscript_temp/allf2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f2${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/allf2${trait}.sh
# qsub Rscript_temp/allf2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f2${trait}" -q opt32G -j oe
# # ALL MAT MAP
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[1], run.lmer,$trait, data.type = 'simple');print('done')\"" > Rscript_temp/allTP${trait}.sh
qsub Rscript_temp/allTP${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP${trait}" -q opt32G -j oe
# # # ALL MAT MAP
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[1], run.lmer,$trait, data.type = 'simple');print('done')\"" > Rscript_temp/allTP${trait}.sh
# qsub Rscript_temp/allTP${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[2], merge.biomes.TF = TRUE, run.lmer,$trait,data.type = 'simple');print('done')\"" > Rscript_temp/allTP2${trait}.sh
qsub Rscript_temp/allTP2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP2${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[2], merge.biomes.TF = TRUE, run.lmer,$trait,data.type = 'simple');print('done')\"" > Rscript_temp/allTP2${trait}.sh
# qsub Rscript_temp/allTP2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP2${trait}" -q opt32G -j oe
done
# # # MULTI
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.Multi[1], run.lmer,'SLA', data.type = 'Multi');print('done')\"" > Rscript_temp/allMulti.sh
# qsub Rscript_temp/allMulti.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall.Multi" -q opt32G -j oe
# # MULTI
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.Multi[1], run.lmer,'SLA', data.type = 'Multi');print('done')\"" > Rscript_temp/allMulti.sh
qsub Rscript_temp/allMulti.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall.Multi" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.Multi[2], merge.biomes.TF = TRUE, run.lmer, 'SLA',data.type = 'Multi');print('done')\"" > Rscript_temp/allMulti2.sh
# qsub Rscript_temp/allMulti2.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall.Multi2" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.Multi[2], merge.biomes.TF = TRUE, run.lmer, 'SLA',data.type = 'Multi');print('done')\"" > Rscript_temp/allMulti2.sh
qsub Rscript_temp/allMulti2.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall.Multi2" -q opt32G -j oe
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