Skip to content

Commit 20403a1

Browse files
ahmed-shuaibiclaude
andcommitted
fix: set-u-safe empty cb_arg expansion (cohorts without q_values.txt)
When CBaSE's qvals step is absent (no q_values.txt, e.g. CNS_Cancer where qvals crashed but params succeeded), the empty cb_arg array expansion aborted the whole pipeline under set -u, blocking DIG + MutSig identify. Use ${cb_arg[@]+...} guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4be6974 commit 20403a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/run_cohort_pipeline.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ if [ ! -f "${ROOT}/${C}/id_cbase/pairwise_interaction_results.csv" ] \
5252
mkdir -p "${ROOT}/${C}/id_cbase"
5353
cb_arg=(); [ -f "$CB_Q" ] && cb_arg=(-cb "$CB_Q")
5454
"$DIALECT" identify -c "${ROOT}/${C}/count_matrix.csv" -b "${ROOT}/${C}/bmr_pmfs.csv" \
55-
-o "${ROOT}/${C}/id_cbase" -k 100 "${cb_arg[@]}" >>"$LOGF" 2>&1 || log "STAGE-FAIL id_cbase"
55+
-o "${ROOT}/${C}/id_cbase" -k 100 "${cb_arg[@]+"${cb_arg[@]}"}" >>"$LOGF" 2>&1 \
56+
|| log "STAGE-FAIL id_cbase"
5657
fi
5758
if [ ! -f "${ROOT}/${C}/id_dig/pairwise_interaction_results.csv" ] \
5859
&& [ -f "${ROOT}/${C}/bmr_pmfs.dig.csv" ]; then

0 commit comments

Comments
 (0)