Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kunstler Georges
traitcompet
Commits
42999f9f
Commit
42999f9f
authored
Sep 12, 2014
by
Georges Kunstler
Browse files
clean to git on cluster
parent
af84e86f
Changes
6
Hide whitespace changes
Inline
Side-by-side
R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.fixed.biomes.species.R
View file @
42999f9f
load.model
<-
function
()
{
list
(
name
=
"lmer.LOGLIN.ER.AD.Tf.fixed.biomes.species"
,
var.BLUP
=
'biomes.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
+
(
1
|
species.id
)
+
(
logD
-1
|
species.id
)
+
(
sumBn
-1
|
species.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+(1|species.id) +(logD-1|species.id) +(sumBn-1|species.id)
"
))
}
R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.fixed.species.R
View file @
42999f9f
load.model
<-
function
()
{
list
(
name
=
"lmer.LOGLIN.ER.AD.Tf.fixed.species"
,
var.BLUP
=
'biomes.id'
,
lmer.formula.tree.id
=
formula
(
"
logG
~
1
+
(
1
|
set.id
)
+
(
1
|
species.id
)
+
(
1
|
plot.id
)
+
Tf
+
logD
+
sumBn
+
sumTfBn
+
sumTnBn
+
sumTnTfBn.abs
+
(
1
|
species.id
)
+
(
logD
-1
|
species.id
)
+
(
sumBn
-1
|
species.id
)))
lmer.formula.tree.id
=
formula
(
"logG~1+(1|set.id)+(1|species.id)+(1|plot.id)+Tf+logD+sumBn+sumTfBn+sumTnBn+sumTnTfBn.abs+(1|species.id) +(logD-1|species.id) +(sumBn-1|species.id)
"
))
}
launch.cluster/jobR32Gdir.sh
deleted
100755 → 0
View file @
af84e86f
#!/bin/sh
# Georges Kunstler
# 12/08/2013
# commande de soumission de jobs sur le cluster via qsub
# incremente par un numero d'ordre du fichier de donnees
# lancement ./jobJAGS.sh debut fin racineR subdir
# ou
# debut est l'indice du premier fichier à traiter
# fin est l'indice du dernier fichier à traiter
# racineR est le début du nom du fichier R
# subdir est la subdirectory ou run R
# les fichiers à traiter seront de la forme racine.Z.R
# ou Z est compris entre debut et fin
# test d'absence de parametre
nbargs
=
$#
echo
"nombre d'arguments="
$nbargs
if
[
$nbargs
-eq
0
]
then
echo
" il manque des parametres de lancement il en faut 4"
echo
" usage :"
echo
" ./jobJAGS.sh 1 5 racineR subdir"
exit
100
else
if
[
$nbargs
-lt
3
]
then
echo
" il faut 4 parametres indice de debut, indice de fin et la racine R"
echo
" usage :"
echo
" ./jobJAGS.sh 3 8 racineR subdir"
exit
100
fi
fi
# initialisation
# echo "lancer "$1" jobs"
JOB
=
R
REP
=
/data1/kunstler/workshop/
EXP
=
export
LD
=
LD_LIBRARY_PATH
=
/usr/lib64/R/library
NAME
=
Rcran
# boucle
min
=
$1
max
=
$2
for
n
in
`
seq
$min
$max
`
;
do
# constitution du nom du fichier de donnees
DATA
=
$3$n
.R
cd
workshop
#ls
echo
"
$EXP
$LD
;
$JOB
CMD BATCH
$DATA
"
echo
"
$EXP
$LD
;
$JOB
CMD BATCH
$DATA
"
|qsub
-l
nodes
=
1:ppn
=
1
-N
"
$NAME$n
"
-q
opt32G
-j
oe
cd
/data1/kunstler/
#echo " n vaut="$n
done
launch.cluster/launch_all_lmer.bash
View file @
42999f9f
...
...
@@ -22,13 +22,13 @@ samplesize=$1
#
for
trait
in
"'SLA'"
"'Wood.density'"
"'Max.height'"
"'Seed.mass'"
"'Leaf.N'"
;
do
echo
"/usr/local/R/R-3.1.1/bin/Rscript -e
\"
source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.1,model.files.lmer.Tf.2), run.lmer,
$trait
,type.filling='species', sample.size =
$samplesize
, var.sample = 'ecocode');print('done')
\"
"
>
trait.workshop/species2
${
trait
}
.sh
echo
"/usr/local/R/R-3.1.1/bin/Rscript -e
\"
source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.1,
model.files.lmer.Tf.2), run.lmer,
$trait
,type.filling='species', sample.size =
$samplesize
, var.sample = 'ecocode');print('done')
\"
"
>
trait.workshop/species2
${
trait
}
.sh
qsub trait.workshop/species2
${
trait
}
.sh
-l
nodes
=
1:ppn
=
1,mem
=
8gb
-N
"lmerall2
${
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(c(model.files.lmer.Tf.1,model.files.lmer.Tf.2), run.lmer,
$trait
,type.filling='species', sample.size = NA, var.sample = NA);print('done')
\"
"
>
trait.workshop/species2T
${
trait
}
.sh
echo
"/usr/local/R/R-3.1.1/bin/Rscript -e
\"
source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.1,
model.files.lmer.Tf.2), run.lmer,
$trait
,type.filling='species', sample.size = NA, var.sample = NA);print('done')
\"
"
>
trait.workshop/species2T
${
trait
}
.sh
qsub trait.workshop/species2T
${
trait
}
.sh
-l
nodes
=
1:ppn
=
1,mem
=
8gb
-N
"lmerall2T
${
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(c(model.files.lmer.Tf.1,
model.files.lmer.Tf.2), run.lmer,
$trait
,type.filling='species', sample.size =
$samplesize
, var.sample = 'sp.name');print('done')
\"
"
>
trait.workshop/species2S
${
trait
}
.sh
echo
"/usr/local/R/R-3.1.1/bin/Rscript -e
\"
source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.1, model.files.lmer.Tf.2), run.lmer,
$trait
,type.filling='species', sample.size =
$samplesize
, var.sample = 'sp.name');print('done')
\"
"
>
trait.workshop/species2S
${
trait
}
.sh
qsub trait.workshop/species2S
${
trait
}
.sh
-l
nodes
=
1:ppn
=
1,mem
=
8gb
-N
"lmerall2S
${
trait
}
"
-q
opt32G
-j
oe
done
launch.cluster/launch_all_lmer.resid.bash
deleted
100644 → 0
View file @
af84e86f
#!/bin/bash
# Georges Kunstler 14/05/2014
# read one variable
export
LD_LIBRARY_PATH
=
/usr/lib64/R/library
mkdir
-p
trait.workshop
# "'Seed.mass'" "'Leaf.N'"
for
trait
in
"'SLA'"
"'Wood.density'"
"'Max.height'"
;
do
# echo "/usr/local/R/R-3.0.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.1,model.files.lmer.Tf.2), run.lmer,$trait,type.filling='species', sample.size = $samplesize, var.sample = 'ecocode.id');print('done')\"" > trait.workshop/species1${trait}.sh
# qsub trait.workshop/species1${trait}.sh -l nodes=1:ppn=1,mem=8gb -N "lmerall1${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.0.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.3,model.files.lmer.Tf.4), run.lmer,$trait,type.filling='species', sample.size = $samplesize, var.sample = 'ecocode.id');print('done')\"" > trait.workshop/species2${trait}.sh
# qsub trait.workshop/species2${trait}.sh -l nodes=1:ppn=1,mem=8gb -N "lmerall2${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.0.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.5, run.lmer,$trait,type.filling='species', sample.size = $samplesize, var.sample = 'ecocode.id');print('done')\"" > trait.workshop/species3${trait}.sh
# qsub trait.workshop/species3${trait}.sh -l nodes=1:ppn=1,mem=8gb -N "lmerall3${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.0.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.1, model.files.lmer.Tf.2), run.lmer,$trait,type.filling='species', sample.size = $samplesize, var.sample = 'species.id');print('done')\"" > trait.workshop/species1S${trait}.sh
# qsub trait.workshop/species1S${trait}.sh -l nodes=1:ppn=1,mem=8gb -N "lmerall1S${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.0.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.3, model.files.lmer.Tf.4), run.lmer,$trait,type.filling='species', sample.size = $samplesize, var.sample = 'species.id');print('done')\"" > trait.workshop/species2S${trait}.sh
# qsub trait.workshop/species2S${trait}.sh -l nodes=1:ppn=1,mem=8gb -N "lmerall2S${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.0.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.5, run.lmer,$trait,type.filling='species', sample.size = $samplesize, var.sample = 'species.id');print('done')\"" > trait.workshop/speciesS3${trait}.sh
# qsub trait.workshop/speciesS3${trait}.sh -l nodes=1:ppn=1,mem=8gb -N "lmerallS3${trait}" -q opt32G -j oe
# CAT model
echo
"/usr/local/R/R-3.0.1/bin/Rscript -e
\"
source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.CAT.2), run.lmer,
$trait
,type.filling='species', sample.size =
$samplesize
, var.sample = 'ecocode.id', cat.TF = TRUE);print('done')
\"
"
>
trait.workshop/speciesCAT1
${
trait
}
.sh
qsub trait.workshop/speciesCAT1
${
trait
}
.sh
-l
nodes
=
1:ppn
=
1,mem
=
8gb
-N
"lmerallCAT1
${
trait
}
"
-q
opt32G
-j
oe
echo
"/usr/local/R/R-3.0.1/bin/Rscript -e
\"
source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(c(model.files.lmer.Tf.CAT.2), run.lmer,
$trait
,type.filling='species', sample.size =
$samplesize
, var.sample = 'species.id', cat.TF = TRUE);print('done')
\"
"
>
trait.workshop/speciesCATS1
${
trait
}
.sh
qsub trait.workshop/speciesCATS1
${
trait
}
.sh
-l
nodes
=
1:ppn
=
1,mem
=
8gb
-N
"lmerallCATS1
${
trait
}
"
-q
opt32G
-j
oe
done
launch.cluster/launch_all_lmer_biomes.bash
deleted
100644 → 0
View file @
af84e86f
#!/bin/bash
# Georges Kunstler 14/05/2014
# read one variable
export
LD_LIBRARY_PATH
=
/usr/lib64/R/library
mkdir
-p
trait.workshop
# test parameter
nbargs
=
$#
echo
"number of arguments="
$nbargs
if
[
$nbargs
-ne
1
]
then
echo
"need one and only one argument"
echo
" usage :"
echo
" ./launch_all_lmer.sh sample.size"
exit
100
fi
samplesize
=
$1
# "'Seed.mass'" "'Leaf.N'"
for
trait
in
"'SLA'"
"'Wood.density'"
"'Max.height'"
;
do
for
biome
in
"'Temperate rain forest'"
"'Temperate grassland desert'"
"'Tropical rain forest'"
"'Tropical forest savanna'"
"'Boreal forest'"
"'Woodland shrubland'"
"'Temperate forest'"
;
do
echo
"/usr/local/R/R-3.0.1/bin/Rscript -e
\"
source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1, run.lmer,
$trait
,type.filling='species', sample.size =
$samplesize
, var.sample = 'ecocode.id', select.biome =
$biome
);print('done')
\"
"
>
trait.workshop/species1
${
trait
}
_
"
${
biome
}
"
.sh
qsub trait.workshop/species1
${
trait
}
_
"
${
biome
}
"
.sh
-l
nodes
=
1:ppn
=
1,mem
=
8gb
-N
"lmerall1
${
trait
}
"
-q
opt32G
-j
oe
done
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment