File: check_dose_input.sh

package info (click to toggle)
probabel 0.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,552 kB
  • ctags: 1,269
  • sloc: cpp: 6,571; ansic: 2,270; sh: 1,826; makefile: 449; perl: 351
file content (36 lines) | stat: -rwxr-xr-x 963 bytes parent folder | download | duplicates (2)
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
28
29
30
31
32
33
34
35
36
#!/bin/bash
#
# This script tests whether dose data without a MaCH/minimac-style
# arrow is read correctly by palinear (and by palogist, since reading
# genetic data is done using the same code).

echo "Checking palinear with dose data without '->'"
# Exit with error when one of the steps in the script fails
set -e

if [ -z ${srcdir} ]; then
    srcdir="."
fi
inputdir="${srcdir}/inputfiles/"
results="${srcdir}/verified_results/"
outfile="height_base_add.out.txt"

sed 's/^[[:digit:]]*->//' $inputdir/test.mldose > test.mldose


../src/palinear \
    -p ${inputdir}/height.txt \
    -d test.mldose \
    -i ${inputdir}/test.mlinfo \
    -m ${inputdir}/test.map \
    -c 19 \
    -o height_base > /dev/null

blanks="                                                          "
echo -n "  Verifying "
if diff $outfile $results/$outfile; then
    echo -e "${outfile}${blanks:${#outfile}} OK"
else
    echo -e "${outfile}${blanks:${#outfile}} FAILED"
    exit 1
fi