set -o xtrace
rm -f regtools_valgrind.op; valgrind --error-exitcode=1 --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./regtools junctions create ../tests/integration-test/data/test_hcc1395.bam 2>regtools_valgrind.op
rm -f regtools_valgrind.op; valgrind --error-exitcode=1 --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./regtools junctions annotate ../tests/integration-test/data/test_hcc1395_junctions.bed ../tests/integration-test/data/test_chr22.fa ../tests/integration-test/data/test_ensemble_chr22.gtf 2>regtools_valgrind.op
rm -f regtools_valgrind.op; valgrind --error-exitcode=1 --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./regtools junctions annotate ../tests/integration-test/data/test_hcc1395_junctions.bed ../tests/integration-test/data/test_chr22.fa ../tests/integration-test/data/test_ensemble_chr22.gtf -o valgrind_test.op 2>regtools_valgrind.op
rm -f regtools_valgrind.op; valgrind --error-exitcode=1 --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes  ./regtools cis-splice-effects identify -o  observed-cse-identify.out ../tests/integration-test/data/vcf/test1.vcf ../tests/integration-test/data/bam/test_hcc1395.2.bam ../tests/integration-test/data/fa/test_chr22.fa ../tests/integration-test/data/gtf/test_ensemble_chr22.2.gtf
rm -f regtools_valgrind.op; valgrind --error-exitcode=1 --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes  ./regtools cis-ase identify ../tests/integration-test/data/vcf/test3.vcf ../tests/integration-test/data/bam/test_hcc1395.bam ../tests/integration-test/data/bam/test_hcc1395.bam ~/dat/ref/hs37d5/all_sequences.fa ../tests/integration-test/data/gtf/test_ensemble_chr22.gtf 2>regtools_valgrind.op
