diff --git a/script/geno_prep/geno_prep.sh b/script/geno_prep/geno_prep.sh index 3e2c9cc..f90aa31 100755 --- a/script/geno_prep/geno_prep.sh +++ b/script/geno_prep/geno_prep.sh @@ -1,3 +1,5 @@ +trap "exit -1" 10 +export job_id="$$" $SIGNET_SCRIPT_ROOT/geno_prep/plink.sh && $SIGNET_SCRIPT_ROOT/geno_prep/imputation.sh $SIGNET_SCRIPT_ROOT/geno_prep/combine_geno.sh diff --git a/script/geno_prep/imputation.sh b/script/geno_prep/imputation.sh index a43a839..3b20198 100755 --- a/script/geno_prep/imputation.sh +++ b/script/geno_prep/imputation.sh @@ -83,3 +83,8 @@ done ## employ parallel computing for imputation time ParaFly -c impute_params.txt -CPU $ncores +if [[ $(wc -l < impute_params.txt) -ne $(wc -l < impute_params.txt.completed) ]];then +echo -e "\nPlease note that some of the jobs are not finished !!! This could be a memeory allocation issue\n" +kill -10 $job_id +fi +