Skip to content

Commit

Permalink
geno_prep erro protection
Browse files Browse the repository at this point in the history
  • Loading branch information
jiang548 committed May 11, 2022
1 parent f190fe2 commit e877fa0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions script/geno_prep/geno_prep.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions script/geno_prep/imputation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e877fa0

Please sign in to comment.