Skip to content

Commit

Permalink
fix shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Jan 9, 2023
1 parent 54c3476 commit e1d3480
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions snappy_pipeline/apps/tpls/pipeline_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,12 @@ set -x
set +e
SNAKEMAKE_BATCH_END=$SLURM_ARRAY_TASK_MAX
SNAKEMAKE_BATCH_CUR=$SLURM_ARRAY_TASK_ID
if [[ ! -z "$SNAKEMAKE_BATCH_CUR"]]; then
SNAKEMAKE_BATCH_ARG="${SNAKEMAKE_BATCH_RULE-default}=${SNAKEMAKE_BATCH_CUR}/${SNAKEMAKE_BATCH_END}"
if [[ ! -z "$SNAKEMAKE_BATCH_CUR" ]]; then
if [[ $SLURM_ARRAY_TASK_ID -lt 1 ]]; then
>&2 echo "Snakemake batches start couting at 1"
exit 1
fi
SNAKEMAKE_BATCH_ARG="--batch ${SNAKEMAKE_BATCH_RULE-default}=${SNAKEMAKE_BATCH_CUR}/${SNAKEMAKE_BATCH_END}"
else
SNAKEMAKE_BATCH_ARG=
fi
Expand Down

0 comments on commit e1d3480

Please sign in to comment.