blob: 8adc5c936ef0178b6888879ad84eff3794cb4609 (
plain)
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
|
#!/usr/bin/env bash
gemma=../bin/gemma
testCenteredRelatednessMatrixK() {
$gemma -g ../example/mouse_hs1940.geno.txt.gz -p ../example/mouse_hs1940.pheno.txt \
-a ../example/mouse_hs1940.anno.txt -gk -o mouse_hs1940
assertEquals "3763600" `wc -w < output/mouse_hs1940.cXX.txt`
# assertEquals "15f680c" `md5sum < output/mouse_hs1940.cXX.txt | head -c 7`
assertEquals "0.335" `head -c 5 output/mouse_hs1940.cXX.txt`
assertEquals "29.691" `awk '{s+=substr($1,0,6)}END{print s}' output/mouse_hs1940.cXX.txt`
}
testUnivariateLinearMixedModel() {
$gemma -g ../example/mouse_hs1940.geno.txt.gz -p ../example/mouse_hs1940.pheno.txt -n 1 \
-a ../example/mouse_hs1940.anno.txt -k ./output/mouse_hs1940.cXX.txt -lmm \
-o mouse_hs1940_CD8_lmm
assertEquals "118459" `wc -w < output/mouse_hs1940_CD8_lmm.assoc.txt`
assertEquals "92047" `awk '{s+=substr($1,0,6)}END{print s}' output/mouse_hs1940_CD8_lmm.assoc.txt`
}
testMultivariateLinearMixedModel() {
$gemma -g ../example/mouse_hs1940.geno.txt.gz -p ../example/mouse_hs1940.pheno.txt \
-n 1 6 -a ../example/mouse_hs1940.anno.txt -k ./output/mouse_hs1940.cXX.txt \
-lmm -o mouse_hs1940_CD8MCH_lmm
outfn=output/mouse_hs1940_CD8MCH_lmm.assoc.txt
assertEquals "139867" `wc -w < $outfn`
assertEquals "92079" `awk '{s+=substr($1,0,6)}END{print s}' $outfn`
}
shunit2=`which shunit2`
if [ -x "$shunit2" ]; then
. $shunit2
else
# try to run the locally installed shunit2
. ../shunit2-2.0.3/src/shell/shunit2
fi
|