aboutsummaryrefslogtreecommitdiff
path: root/test/test_suite.sh
diff options
context:
space:
mode:
authorPjotr Prins2017-10-05 09:18:59 +0000
committerPjotr Prins2017-10-05 09:19:09 +0000
commit530488454ae6a35b098b81b45581f88f02d6de0e (patch)
tree7ee31c78a678ea4fa364267a9de8564faf4b159e /test/test_suite.sh
parente90c2d25cdb77d41d6587188db9e61cb988f2c78 (diff)
downloadpangemma-530488454ae6a35b098b81b45581f88f02d6de0e.tar.gz
Adding debug statements on entering functions and added test for issue 58
Diffstat (limited to 'test/test_suite.sh')
-rwxr-xr-xtest/test_suite.sh35
1 files changed, 31 insertions, 4 deletions
diff --git a/test/test_suite.sh b/test/test_suite.sh
index 44eb14c..fa66b7a 100755
--- a/test/test_suite.sh
+++ b/test/test_suite.sh
@@ -36,7 +36,7 @@ testUnivariateLinearMixedModelFullLOCO1() {
testCenteredRelatednessMatrixK() {
$gemma -g ../example/mouse_hs1940.geno.txt.gz \
-p ../example/mouse_hs1940.pheno.txt \
- -gk -o mouse_hs1940
+ -gk -o mouse_hs1940 -debug
assertEquals 0 $?
outfn=output/mouse_hs1940.cXX.txt
assertEquals "1940" `wc -l < $outfn`
@@ -52,7 +52,8 @@ testUnivariateLinearMixedModel() {
-a ../example/mouse_hs1940.anno.txt \
-k ./output/mouse_hs1940.cXX.txt \
-lmm \
- -o mouse_hs1940_CD8_lmm
+ -o mouse_hs1940_CD8_lmm \
+ -debug
assertEquals 0 $?
grep "total computation time" < output/mouse_hs1940_CD8_lmm.log.txt
assertEquals 0 $?
@@ -67,7 +68,8 @@ testMultivariateLinearMixedModel() {
-n 1 6 \
-a ../example/mouse_hs1940.anno.txt \
-k ./output/mouse_hs1940.cXX.txt \
- -lmm -o mouse_hs1940_CD8MCH_lmm
+ -lmm -o mouse_hs1940_CD8MCH_lmm \
+ -debug
assertEquals 0 $?
outfn=output/mouse_hs1940_CD8MCH_lmm.assoc.txt
@@ -81,7 +83,8 @@ testPlinkStandardRelatednessMatrixK() {
outfn=output/$testname.sXX.txt
rm -f $outfn
$gemma -bfile $datadir/HLC \
- -gk 2 -o $testname
+ -gk 2 -o $testname \
+ -debug
assertEquals 0 $?
assertEquals "427" `wc -l < $outfn`
assertEquals "-358.07" `perl -nle 'foreach $x (split(/\s+/,$_)) { $sum += sprintf("%.2f",(substr($x,,0,6))) } END { printf "%.2f",$sum }' $outfn`
@@ -97,6 +100,30 @@ testPlinkMultivariateLinearMixedModel() {
-lmm 1 \
-maf 0.1 \
-c $datadir/HLC_covariates.txt \
+ -debug \
+ -o $testname
+ assertEquals 0 $?
+ outfn=output/$testname.assoc.txt
+ assertEquals "223243" `wc -l < $outfn`
+ assertEquals "89756559859.06" `perl -nle 'foreach $x (split(/\s+/,$_)) { $sum += sprintf("%.2f",(substr($x,,0,6))) } END { printf "%.2f",$sum }' $outfn`
+}
+
+testPlinkMultivariateLinearMixedModelMultiplePhenotypes_Issue58() {
+ # n=2 is original pheno in fam file
+ # n=1 is causal1
+ # n=3..12 is causal2
+ # n=13..22 is causal3
+ # -n 1 2 3 15 is independent
+ testname=testPlinkMultivariateLinearMixedModelMultiplePhenotypes
+ datadir=../example
+ $gemma -bfile $datadir/HLC \
+ -p $datadir/HLC.simu.pheno.txt \
+ -k output/testPlinkStandardRelatednessMatrixK.sXX.txt \
+ -lmm 1 \
+ -maf 0.1 \
+ -n 1 2 3 15 \
+ -c $datadir/HLC_covariates.txt \
+ -debug \
-o $testname
assertEquals 0 $?
outfn=output/$testname.assoc.txt