diff --git a/R/analysis/lmer.run.R b/R/analysis/lmer.run.R index e2b935c1dcf0f79515113c2934d387ee8fb7af33..00833dc5ffd6fba3dc023e028e79f72539cb2e08 100644 --- a/R/analysis/lmer.run.R +++ b/R/analysis/lmer.run.R @@ -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")) diff --git a/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species.R b/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species.R index 7d535d2a84fbdfa1d5ed272985f99e2ad2ee1593..9145d0423687a31299dfaf19c48f688ec06d43fe 100644 --- a/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species.R +++ b/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species.R @@ -1,6 +1,6 @@ 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)")) } diff --git a/R/analysis/model.lmer/model.lmer.LOGLIN.r.set.fixed.biomes.species.R b/R/analysis/model.lmer/model.lmer.LOGLIN.r.set.fixed.biomes.species.R new file mode 100644 index 0000000000000000000000000000000000000000..087e7ae6d93426af511c917051b0eff3a4b16d3c --- /dev/null +++ b/R/analysis/model.lmer/model.lmer.LOGLIN.r.set.fixed.biomes.species.R @@ -0,0 +1,6 @@ +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)")) +} + diff --git a/R/analysis/model.lmer/model.lmer.LOGLIN.r.set.species.R b/R/analysis/model.lmer/model.lmer.LOGLIN.r.set.species.R new file mode 100644 index 0000000000000000000000000000000000000000..008f0fa34ff4f620688bba326cea8f9112c82787 --- /dev/null +++ b/R/analysis/model.lmer/model.lmer.LOGLIN.r.set.species.R @@ -0,0 +1,8 @@ +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)")) +} + + + diff --git a/launch.cluster/launch_all_lmer.bash b/launch.cluster/launch_all_lmer.bash index cf16d4c74042568780ffc23a9b1a9bd6e11c5591..dea36ca46359ab0ea38bdf644275f7c179b527a2 100644 --- a/launch.cluster/launch_all_lmer.bash +++ b/launch.cluster/launch_all_lmer.bash @@ -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