aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--INSTALL.md4
-rw-r--r--Makefile2
-rwxr-xr-xtest/test_suite.sh17
4 files changed, 26 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 108e607..d6c227e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,9 +2,11 @@
*.tar.gz
src/Eigen
example/output
+test/output
+./output
doc/manual.aux
doc/manual.bbl
doc/manual.blg
doc/manual.log
doc/manual.out
-doc/manual.toc \ No newline at end of file
+doc/manual.toc
diff --git a/INSTALL.md b/INSTALL.md
index f6eb0c0..32d37f3 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -48,3 +48,7 @@ if you get an Eigen error you may need to override the include
path. E.g. on GNU Guix with shared libs this may work
make EIGEN_INCLUDE_PATH=~/.guix-profile/include/eigen3 FORCE_DYNAMIC=1
+
+to run GEMMA tests
+
+ make check
diff --git a/Makefile b/Makefile
index 0f25d88..a15c043 100644
--- a/Makefile
+++ b/Makefile
@@ -95,6 +95,8 @@ $(OBJS) : $(HDR)
$(CPP) $(CPPFLAGS) $(HEADERS) -c $*.cpp -o $*.o
.SUFFIXES : .cpp .c .o $(SUFFIXES)
+check:
+ ./run_tests.sh
clean:
rm -rf ${SRC_DIR}/*.o ${SRC_DIR}/*~ *~ $(OUTPUT)
diff --git a/test/test_suite.sh b/test/test_suite.sh
index effc056..8adc5c9 100755
--- a/test/test_suite.sh
+++ b/test/test_suite.sh
@@ -11,6 +11,23 @@ testCenteredRelatednessMatrixK() {
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