echo"$SAMPLE_OUTPUT_PATH is to be deleted and rerun."
if[-d$SAMPLE_OUTPUT_PATH]
rm-fR$SAMPLE_OUTPUT_PATH
then
rm-fR$SAMPLE_OUTPUT_PATH
echo"Re-running $SAMPLE_OUTPUT_PATH ..."
else
echo"Running $SAMPLE_OUTPUT_PATH ..."
fi
mkdir-p$SAMPLE_OUTPUT_PATH
mkdir-p$SAMPLE_OUTPUT_PATH
sbatch -e$SAMPLE_OUTPUT_PATH/"slurm-%j.err"-o$SAMPLE_OUTPUT_PATH/"slurm-%j.out"-p$QUEUE$THIS_FOLDER/analysis_modules.sh $SAMPLE_ID$SAMPLE_INPUT_PATH$SAMPLE_OUTPUT_PATH$FUNCTION$SPECIES$ANALYSIS_MODE"$8""$9""${10}""${11}""${12}""${13}""${14}""${15}""${16}""${17}""${18}""${19}""${20}"#$8 and parameters thereafter are defined by the specific function.
sbatch --exportSCRIPT_FOLDER=$THIS_FOLDER-e$SAMPLE_OUTPUT_PATH/"slurm-%j.err"-o$SAMPLE_OUTPUT_PATH/"slurm-%j.out"-p$QUEUE$THIS_FOLDER/analysis_modules.sh $SAMPLE_ID$SAMPLE_INPUT_PATH$SAMPLE_OUTPUT_PATH$FUNCTION$SPECIES$ANALYSIS_MODE"$8""$9""${10}""${11}""${12}""${13}""${14}""${15}""${16}""${17}""${18}""${19}""${20}"#$8 and parameters thereafter are defined by the specific function.
fi
fi
done
done
elif["$ANALYSIS_TYPE"=="all_sample"]
elif["$ANALYSIS_TYPE"=="all_sample"]
then
then
mkdir-p$OUTPUT_PATH
mkdir-p$OUTPUT_PATH
sbatch -e$OUTPUT_PATH/"slurm-%j.err"-o$OUTPUT_PATH/"slurm-%j.out"-p$QUEUE$THIS_FOLDER/analysis_modules.sh 0 "$INPUT_PATH"$OUTPUT_PATH$FUNCTION$SPECIES$ANALYSIS_MODE"$8""$9""${10}""${11}""${12}""${13}""${14}""${15}""${16}""${17}""${18}""${19}""${20}"#$8 and parameters thereafter are defined by the specific function. Usually they are input file name patterns.
sbatch --exportSCRIPT_FOLDER=$THIS_FOLDER-e$OUTPUT_PATH/"slurm-%j.err"-o$OUTPUT_PATH/"slurm-%j.out"-p$QUEUE$THIS_FOLDER/analysis_modules.sh 0 "$INPUT_PATH"$OUTPUT_PATH$FUNCTION$SPECIES$ANALYSIS_MODE"$8""$9""${10}""${11}""${12}""${13}""${14}""${15}""${16}""${17}""${18}""${19}""${20}"#$8 and parameters thereafter are defined by the specific function. Usually they are input file name patterns.