Skip to content

Commit 081eb56

Browse files
committed
bug fix
1 parent d579819 commit 081eb56

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/sv_shell/cnmops.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,16 @@ function CNSampleNormalArm() {
5252
EMPTY_OUTPUT_ERROR="No CNV regions in result object. Rerun cn.mops with different parameters!"
5353
set +e
5454
echo "Starting to run cnMOPS_workflow"
55-
bash /opt/WGD/bin/cnMOPS_workflow.sh -S "${exclude_list}" -x "${exclude_list}" -r "${_r}" -o . -M "${_chr}.${_mode}.RD.txt" </dev/null wor2>&1 | tee cnmops.out
55+
bash /opt/WGD/bin/cnMOPS_workflow.sh -S "${exclude_list}" -x "${exclude_list}" -r "${_r}" -o . -M "${_chr}.${_mode}.RD.txt" </dev/null 2>&1 | tee cnmops.out
5656
echo "Finished running cnMOPS_workflow"
5757
RC=$?
5858
set -e
59-
if [ ! $RC -eq 0 ]; then
60-
if grep -q "$EMPTY_OUTPUT_ERROR" "cnmops.out"; then
61-
touch calls/cnMOPS.cnMOPS.gff
62-
else
63-
echo "cnMOPS_workflow.sh returned a non-zero code that was not due to an empty call file."
64-
exit $RC
65-
fi
59+
if grep -q "$EMPTY_OUTPUT_ERROR" "cnmops.out"; then
60+
echo "No CNV regions detected, creating empty GFF."
61+
touch calls/cnMOPS.cnMOPS.gff
62+
elif [ ! $RC -eq 0 ]; then
63+
echo "cnMOPS_workflow.sh returned a non-zero code that was not due to an empty call file."
64+
exit $RC
6665
fi
6766

6867
echo "----------- Finished CN Sample Normal -------------"

0 commit comments

Comments
 (0)