Skip to content

Commit

Permalink
test mechanism changes
Browse files Browse the repository at this point in the history
  • Loading branch information
atks committed May 27, 2015
1 parent 2fa2498 commit ace3c44
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
File renamed without changes.
13 changes: 6 additions & 7 deletions test/decompose_blocksub/_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
. ${DIR}/../common/_helpers.sh
# put path to vt binary into handy variable
VT=${DIR}/../../vt
STRIP_VAR=${DIR}/../common/strip_var
# immediately quit on errors
set -e

# create temporary directory and ensure cleanup on termination
#export TMPDIR=$(mktemp -d)
export TMPDIR=${DIR}/tmp
mkdir -p ${TMPDIR}
trap "set -x; rm -rf ${TMPDIR}" EXIT KILL TERM INT HUP

echo "-------------------------------" >&2
echo "Tests for vt decompose_blocksub" >&2
echo "-------------------------------" >&2

Expand All @@ -24,14 +25,13 @@ echo "-------------------------------" >&2
# ---------------------------------------------------------------------------

set -x
#mkdir -p ${TMPDIR}/01

# call program
${VT} \
decompose_blocksub \
${DIR}/01_IN_even_length.vcf \
>${TMPDIR}/01_OUT_even_length.vcf \
2> >(strip_stderr > ${TMPDIR}/01_OUT_even_length.stderr)
-o ${TMPDIR}/01_OUT_even_length.vcf \
2>&1 | ${STRIP_VAR} > ${TMPDIR}/01_OUT_even_length.stderr

# compare results
diff ${DIR}/01_OUT_even_length.vcf ${TMPDIR}/01_OUT_even_length.vcf
Expand All @@ -44,14 +44,13 @@ set +x
# ---------------------------------------------------------------------------

set -x
#mkdir -p ${TMPDIR}/02

# call program
${VT} \
decompose_blocksub -a \
${DIR}/02_IN_uneven_length.vcf \
>${TMPDIR}/02_OUT_uneven_length.vcf \
2> >(strip_stderr > ${TMPDIR}/02_OUT_uneven_length.stderr) \
-o ${TMPDIR}/02_OUT_uneven_length.vcf \
2>&1 | ${STRIP_VAR} > ${TMPDIR}/02_OUT_uneven_length.stderr \

# compare results
diff ${DIR}/02_OUT_uneven_length.vcf ${TMPDIR}/02_OUT_uneven_length.vcf
Expand Down
13 changes: 7 additions & 6 deletions test/normalize/_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,36 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
VT=${DIR}/../../vt
# put path to vt binary into handy variable
REF=${DIR}/../ref/20.fa.gz
STRIP_VAR=${DIR}/../common/strip_var
# immediately quit on errors
set -e

# create temporary directory and ensure cleanup on termination
#export TMPDIR=$(mktemp -d)
export TMPDIR=${DIR}/tmp
mkdir -p ${TMPDIR}
trap "set -x; rm -rf ${TMPDIR}" EXIT KILL TERM INT HUP

echo "----------------------" >&2
echo "Tests for vt normalize" >&2
echo "----------------------" >&2


# ---------------------------------------------------------------------------
# Test 01: normalization of indels from Mills et al. chromosome 20
# ---------------------------------------------------------------------------

# call program

set -x

# call program
${VT} \
normalize \
${DIR}/01_IN.vcf \
-r ${REF} \
>${TMPDIR}/01_OUT.vcf \
2> >(strip_stderr > ${TMPDIR}/01_OUT.stderr)
-o ${TMPDIR}/01_OUT.vcf \
2>&1 | ${STRIP_VAR} > ${TMPDIR}/01_OUT.stderr

# compare results
diff ${DIR}/01_OUT.vcf ${TMPDIR}/01_OUT.vcf
diff ${DIR}/01_OUT.stderr ${TMPDIR}/01_OUT.stderr

set +x

0 comments on commit ace3c44

Please sign in to comment.