launch_all_lmer.bash 3.69 KB
Newer Older
1
#!/bin/bash
2
3
# Georges Kunstler 14/05/2014
# read one variable
4
5
export LD_LIBRARY_PATH=/usr/lib64/R/library

6
mkdir -p Rscript_temp
7

8
9
10
11
12
13
14
15
16
17
18
19
20

# 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


21
samplesize=$1
kunstler's avatar
kunstler committed
22
# "'Seed.mass'" "'Leaf.N'"
23
 for trait in "'SLA'" "'Wood.density'" "'Max.height'" ; do
24

25

kunstler's avatar
kunstler committed
26
# ALL data
kunstler's avatar
kunstler committed
27
  	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);print('done')\"" > Rscript_temp/allf${trait}.sh
kunstler's avatar
kunstler committed
28
	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
kunstler's avatar
kunstler committed
29

kunstler's avatar
kunstler committed
30
  	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], run.lmer,$trait);print('done')\"" > Rscript_temp/allf2${trait}.sh
kunstler's avatar
kunstler committed
31
	qsub Rscript_temp/allf2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.fb${trait}" -q opt32G -j oe
kunstler's avatar
kunstler committed
32

kunstler's avatar
kunstler committed
33
  	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[3], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/allf3${trait}.sh
kunstler's avatar
kunstler committed
34
	qsub Rscript_temp/allf3${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.fb2${trait}" -q opt32G -j oe
kunstler's avatar
kunstler committed
35

kunstler's avatar
kunstler committed
36
37
38
# ALL data All census
  	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.4[1], run.lmer,$trait, select.one.census = FALSE);print('done')\"" > Rscript_temp/allcensus${trait}.sh
	qsub Rscript_temp/allcensus${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.census${trait}" -q opt32G -j oe
kunstler's avatar
kunstler committed
39

kunstler's avatar
kunstler committed
40
41
  	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.4[2], run.lmer,$trait, select.one.census = FALSE);print('done')\"" > Rscript_temp/allcensus2${trait}.sh
	qsub Rscript_temp/allcensus2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.censusb${trait}" -q opt32G -j oe
42

kunstler's avatar
kunstler committed
43
44
  	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.4[3], merge.biomes.TF = TRUE, run.lmer,$trait,select.one.census = FALSE);print('done')\"" > Rscript_temp/allcensus3${trait}.sh
	qsub Rscript_temp/allcensus3${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.censusb2${trait}" -q opt32G -j oe
45

kunstler's avatar
kunstler committed
46
47
48


done
kunstler's avatar
kunstler committed
49

kunstler's avatar
kunstler committed
50
51
  	# 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.Multi[1]), run.lmer,'Multi', data.type ='Multi');print('done')\"" > Rscript_temp/Multi1.sh
	# qsub Rscript_temp/Multi1.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "Multi1" -q opt32G -j oe
kunstler's avatar
kunstler committed
52

53
54
#  	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.Multi[2]), run.lmer,'Multi', data.type ='Multi');print('done')\"" > Rscript_temp/Multi2.sh
#	qsub Rscript_temp/Multi2.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "Multi2" -q opt32G -j oe
kunstler's avatar
kunstler committed
55

kunstler's avatar
kunstler committed
56
57
  	# 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.Multi[3]), run.lmer,'Multi', data.type ='Multi');print('done')\"" > Rscript_temp/Multi3.sh
	# qsub Rscript_temp/Multi3.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "Multi3" -q opt32G -j oe