Add sge
This commit is contained in:
parent
3a1c84443c
commit
d618e1b5d7
1 changed files with 48 additions and 0 deletions
48
sge_scripts/bm_correct_sampling.sh
Executable file
48
sge_scripts/bm_correct_sampling.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#$ -V
|
||||||
|
#$ -cwd
|
||||||
|
#$ -N bmcorrectsamp
|
||||||
|
#$ -m besa
|
||||||
|
#$ -q short.q
|
||||||
|
#$ -t 1-6
|
||||||
|
#$ -pe thread 64
|
||||||
|
#$ -M louis.lacoste+migale@agroparistech.fr
|
||||||
|
#$ -o logs/$JOB_NAME
|
||||||
|
#$ -e logs/$JOB_NAME
|
||||||
|
|
||||||
|
# Creating log directory if it doesn't exists
|
||||||
|
BASE_DIR="/home/$USER/work/human-microbiome-compendium"
|
||||||
|
LOG_DIR=$(echo "$BASE_DIR/logs")
|
||||||
|
|
||||||
|
if [ ! -d "$LOG_DIR" ]; then
|
||||||
|
mkdir -p $LOG_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Finding directory
|
||||||
|
APPLICATIONS_DIR=$(echo "$BASE_DIR")
|
||||||
|
|
||||||
|
echo $APPLICATIONS_DIR
|
||||||
|
|
||||||
|
ARGID=$(($SGE_TASK_ID % 3))
|
||||||
|
|
||||||
|
case $ARGID in
|
||||||
|
0)
|
||||||
|
echo -n "Model will be Chaillou"
|
||||||
|
MODE="chaillou"
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
echo -n "Model will be Ravel"
|
||||||
|
MODE="ravel"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
echo -n "Model will be Mach"
|
||||||
|
MODE="mach"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
readonly NB_CORES=$(sed -n 's/^#\$ -pe thread \(.*\)/\1/p' -- "$0")
|
||||||
|
|
||||||
|
|
||||||
|
echo -n "Model will be $MODE with $NB_CORES"
|
||||||
|
|
||||||
|
Rscript "${APPLICATIONS_DIR}/blockmodels_correct_sampling_effort.R.R" $MODE &>> logs/$JOB_NAME.$SGE_TASK_ID
|
||||||
Loading…
Add table
Reference in a new issue