Skip to content

Commit

Permalink
error handling if gp.R does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffersonfparil committed Jun 23, 2024
1 parent c927873 commit 7789a32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
12 changes: 11 additions & 1 deletion inst/exec_Rscript/1-checks_and_submision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ then
else
echo "Passed: You have permission to write in the output directory: $DIR_OUT."
fi
### Check if the confighured slurm array job script exists
### Check if the configured slurm array job script exists
if [ ! -f ${DIR_SRC}/2-gp_slurm_job.sh ]
then
echo "Error: The executable code directory: $DIR_SRC does not contain the script: 2-gp_slurm_job.sh. Are you sure this is the genomic_selection repo directory?"
Expand All @@ -114,6 +114,16 @@ then
else
echo "Passed: The executable code directory: $DIR_SRC contains the script: 2-gp_slurm_job.sh."
fi
### Check if the executable Rscript exists
if [ ! -f ${DIR_SRC}/gp.R ]
then
echo "Error: The executable code directory: $DIR_SRC does not contain the script: gp.R. Are you sure this is the genomic_selection repo directory?"
rm $0
rm 2-gp_slurm_job.sh
exit 108
else
echo "Passed: The executable Rscript: $DIR_SRC contains the Rscript: gp.R."
fi
### Initialise the output directory which will contain all the output Rds files across populations and traits
if [ ! -d ${DIR_OUT}/output ]
then
Expand Down
14 changes: 1 addition & 13 deletions inst/exec_Rscript/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,4 @@ SBATCH --account="dbiopast2"
SBATCH --ntasks=1
SBATCH --cpus-per-task=8
SBATCH --mem=64G
SBATCH --time=0-2:0:00

# GENOTYPE_DATA_RDS=${DIR_SRC}/input/test_geno.Rds
# PHENOTYPE_DATA_TSV=${DIR_SRC}/input/test_pheno.tsv
# KFOLDS=2
# NREPS=2
# DIR_OUT=${DIR_SRC}
# SBATCH --job-name="test"
# SBATCH --account="dbiopast2"
# SBATCH --ntasks=1
# SBATCH --cpus-per-task=8
# SBATCH --mem=64G
# SBATCH --time=0-2:0:00
SBATCH --time=0-2:0:00

0 comments on commit 7789a32

Please sign in to comment.