#! @SHELL@

if test -z "$srcdir"; then
  srcdir=.
fi
. ${srcdir}/defs

cp ${top_builddir}/util/fa_coords.pl ${top_builddir}/src/fa_coords
chmod +x ${top_builddir}/src/fa_coords
cp ${top_builddir}/util/gmap_process.pl ${top_builddir}/src/gmap_process
chmod +x ${top_builddir}/src/gmap_process	
${top_builddir}/util/gmap_build -k 12 -B ${top_builddir}/src -D . -d chr17test ${srcdir}/ss.chr17test
#${top_builddir}/util/gmap_setup -k 12 -B ${top_builddir}/src -D . -d chr17test ${srcdir}/ss.chr17test
#make -f Makefile.chr17test coords
#make -f Makefile.chr17test gmapdb
#make -f Makefile.chr17test install

if diff ./chr17test/chr17test.genomecomp ${srcdir}/setup.genomecomp.ok; then
    :
else
    echo "Difference found between chr17test.genomecomp and setup.genomecomp.ok" >& 2
    exit 1
fi
if diff ./chr17test/chr17test.ref123positions ${srcdir}/setup.ref123positions.ok; then
    :
else
    echo "Difference found between chr17test.ref123positions and setup.ref123positions.ok" >& 2
    exit 1
fi

${top_builddir}/src/gmap -D . -d chr17test ${srcdir}/ss.her2 > map.test.out
if diff map.test.out ${srcdir}/map.test.ok; then
    :
else
    echo "Difference found between map.test.out and map.test.ok" >& 2
    exit 1
fi

