From c2f1bd0cce6fe4f6483be48e342c6b396dea8fe8 Mon Sep 17 00:00:00 2001 From: Louis Lacoste Date: Fri, 19 Apr 2024 17:06:33 +0200 Subject: [PATCH] Fixing order --- code/scripts/migale_simulations_NA_robustness.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/code/scripts/migale_simulations_NA_robustness.sh b/code/scripts/migale_simulations_NA_robustness.sh index 95148eb..9e03f05 100755 --- a/code/scripts/migale_simulations_NA_robustness.sh +++ b/code/scripts/migale_simulations_NA_robustness.sh @@ -7,8 +7,8 @@ #$ -q short.q #$ -pe thread 64 #$ -M louis.lacoste+migale@agroparistech.fr -#$ -o logs/$JOB_NAME.$TASK_ID.out -#$ -e logs/$JOB_NAME.$TASK_ID.err +#$ -o logs/$JOB_NAME.$TASK_ID +#$ -e logs/$JOB_NAME.$TASK_ID # Creating log directory if it doesn't exists @@ -16,7 +16,15 @@ STRUCTA=("nested" "modular") SAMPLINGA=("uniform" "row" "col" "rowcol") +STRUCT=${STRUCTA[$(($(($((SGE_TASK_ID - 1)) + $((SGE_TASK_ID - 1)) / 4)) % 2))]} +SAMPLING=${SAMPLINGA[$(($((SGE_TASK_ID - 1)) % 4))]} + BASE_DIR="/home/llacoste/work/mia-stage-2024/" +LOG_DIR=$(echo "$BASE_DIR/logs") + +if [ ! -d "$LOG_DIR" ]; then + mkdir -p $LOG_DIR +fi # Finding simulations directory SIMULATIONS_DIR=$(echo "$BASE_DIR/code/simulations") @@ -25,4 +33,4 @@ echo $SIMULATIONS_DIR # Parsing sge array id -Rscript "${SIMULATIONS_DIR}/simulations_NA_robustness.R" --struct ${STRUCTA[$(($((SGE_TASK_ID - 1)) % 2))]} --sampling ${SAMPLINGA[$(($((SGE_TASK_ID - 1)) % 4))]} +Rscript "${SIMULATIONS_DIR}/simulations_NA_robustness.R" --struct $STRUCT --sampling $SAMPLING