1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/bin/sh
# Tests scramble compatibility with a simple cramtools.jar cram file.
# Minimal, but potentially useful compatibility test.
# We also add a non-java cram here, but one manually tweaked to stress
# test threading with multi-slice containers.
scramble="${VALGRIND} $top_builddir/progs/scramble ${SCRAMBLE_ARGS}"
compare_sam=$srcdir/compare_sam.pl
for i in `/bin/ls $srcdir/data/*_java.cram` $srcdir/data/9827_rand3.cram
do
echo "=== testing $i ==="
ref=`echo $i | sed 's/#.*/.fa/'`
root=`echo $i | sed 's/\.cram$//;s:.*/::'`
if [ -e "$ref" -a "$ref" != "$root" ]
then
echo "$scramble -t4 -r $ref $i $outdir/$root.scramble.sam"
$scramble -r $ref $i $outdir/$root.scramble.sam || exit 1
else
echo "$scramble -t4 $i $outdir/$root.scramble.sam"
REF_PATH=/fail $scramble -t4 $i $outdir/$root.scramble.sam || exit 1
fi
echo $compare_sam $srcdir/data/${root}.sam $outdir/$root.scramble.sam
$compare_sam $srcdir/data/${root}.sam $outdir/$root.scramble.sam || exit 1
done
|