File: test_cox_nocovar.sh

package info (click to toggle)
probabel 0.5.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,680 kB
  • sloc: cpp: 6,357; sh: 2,355; ansic: 1,676; makefile: 934; asm: 284; perl: 263; awk: 47
file content (82 lines) | stat: -rwxr-xr-x 2,018 bytes parent folder | download | duplicates (4)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
# This script runs checks on ProbABEL's pacoxph module
# These are almost identical to the checks in test_cox.sh, but this
# time without covariate data (see bug #1266).


echo "Analysing Cox model without covariates..."

scriptdir=$(dirname $0)

if [ -z ${PA_BINDIR} ]; then
    PA_BINDIR="${scriptdir}/../src/"
fi
if [ -z ${srcdir} ]; then
    srcdir="."
    PA_BINDIR=${scriptdir}/../src/
fi

. ${scriptdir}/run_diff.sh

inputdir=${scriptdir}/inputfiles
pacoxph=${PA_BINDIR}/pacoxph

# Redirect all output to file descriptor 3 to /dev/null except if
# the first argument is "verbose" then redirect handle 3 to stdout
exec 3>/dev/null
if [ "$1" = "verbose" ]; then
    echo "Verbose mode ON"
    exec 3>&1
fi

$pacoxph \
    -p ${inputdir}/coxph_data_nocovar.txt \
    -d ${inputdir}/test.mldose \
    -i ${inputdir}/test.mlinfo \
    -m ${inputdir}/test.map \
    -c 19 \
    -o coxph_dose_nocovar \
    >& 3

$pacoxph \
    -p ${inputdir}/coxph_data_nocovar.txt \
    -d ${inputdir}/test.dose.fvi \
    -i ${inputdir}/test.mlinfo \
    -m ${inputdir}/test.map \
    -c 19 \
    -o coxph_dose_nocovar_fv \
    >& 3

run_diff coxph_dose_nocovar_add.out.txt coxph_dose_nocovar_fv_add.out.txt \
    "pacoxph check: dose vs. dose_fv"


$pacoxph \
    -p ${inputdir}/coxph_data_nocovar.txt \
    -d ${inputdir}/test.mlprob \
    -i ${inputdir}/test.mlinfo \
    -m ${inputdir}/test.map \
    --ngpreds=2 \
    -c 19 \
    -o coxph_prob_nocovar \
    >& 3

run_diff coxph_dose_nocovar_add.out.txt coxph_prob_nocovar_add.out.txt \
    "pacoxph check: dose vs. prob" -I SNP


$pacoxph \
    -p ${inputdir}/coxph_data_nocovar.txt \
    -d ${inputdir}/test.prob.fvi \
    -i ${inputdir}/test.mlinfo \
    -m ${inputdir}/test.map \
    --ngpreds=2 \
    -c 19 \
    -o coxph_prob_nocovar_fv \
    >& 3

for model in add domin recess over_domin 2df; do
    run_diff coxph_prob_nocovar_${model}.out.txt \
        coxph_prob_nocovar_fv_${model}.out.txt \
        "pacoxph check ($model model): prob vs. prob_fv"
done