diff options
Diffstat (limited to 'test/test-uvlmm-integration.scm')
| -rw-r--r--[-rwxr-xr-x] | test/test-uvlmm-integration.scm | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/test/test-uvlmm-integration.scm b/test/test-uvlmm-integration.scm index 97539b8..10af32f 100755..100644 --- a/test/test-uvlmm-integration.scm +++ b/test/test-uvlmm-integration.scm @@ -11,13 +11,38 @@ exec guile --debug -s "$0" "$@" #:use-module (ice-9 rdelim) ) -(test-begin "external-gemma-run") +(define kinship-fn "./output/mouse_hs1940.cXX.txt") +(define gwa-fn "./output/mouse_hs1940.assoc.txt") -(let [(err (system "./build/bin/Debug/gemma -g ./example/mouse_hs1940.geno.txt.gz -p ./example/mouse_hs1940.pheno.txt -gk -o mouse_hs1940 -debug"))] +(test-begin "uvlmm-mdb-kinship-run") + +(when (file-exists? kinship-fn) + (delete-file kinship-fn)) +(let [(err (system "./build/bin/Debug/gemma -g ./example/mouse_hs1940.geno.mdb -p ./example/mouse_hs1940.pheno.txt -gk -o mouse_hs1940 -debug"))] (test-eqv 0 err)) -(let [(err (system "./build/bin/Debug/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 -o mouse_hs1940 -lmm 9 -debug"))] + +(test-end "uvlmm-mdb-kinship-run") + +#! +(test-begin "uvlmm-bimbam-kinship-run") + +(when (file-exists? kinship-fn) + (delete-file kinship-fn)) +(let [(err (system "./build/bin/Debug/gemma -g ./example/mouse_hs1940.geno.txt.gz -gk -p ./example/mouse_hs1940.pheno.txt -o mouse_hs1940 -debug"))] (test-eqv 0 err)) -(call-with-input-file "output/mouse_hs1940.assoc.txt" + +(test-end "uvlmm-bimbam-kinship-run") + + +(test-begin "uvlmm-bimbam-gwa-run") + +(when (file-exists? gwa-fn) + (delete-file gwa-fn)) +;; The following integration test runs gemma uvlmm and adds up the output column as a check. +;; It uses the kinship-run matrix from the earlier test +(let [(err (system (string-append "./build/bin/Debug/gemma -g ./example/mouse_hs1940.geno.txt.gz -p ./example/mouse_hs1940.pheno.txt -n 1 -a ./example/mouse_hs1940.anno.txt -k " kinship-fn " -o mouse_hs1940 -lmm 9 -debug")))] + (test-eqv 0 err)) +(call-with-input-file gwa-fn (lambda (port) (read-line port) ; skip first line (let* ((fields (string-split (read-line port) #\tab)) @@ -34,4 +59,6 @@ exec guile --debug -s "$0" "$@" (loop (read-line port) (+ sum (truncate (* 1000 value)))))))))) -(test-end "external-gemma-run") +(test-end "uvlmm-bimbam-gwa-run") + +!# |
