[Genabel-commits] r1541 - in branches/ProbABEL-pvals/ProbABEL: . checks checks/R-tests doc src src/include src/include/R_ext

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jan 11 15:09:18 CET 2014


Author: lckarssen
Date: 2014-01-11 15:09:17 +0100 (Sat, 11 Jan 2014)
New Revision: 1541

Added:
   branches/ProbABEL-pvals/ProbABEL/checks/check_probabel_chunk.sh
   branches/ProbABEL-pvals/ProbABEL/doc/probabel.1
   branches/ProbABEL-pvals/ProbABEL/doc/probabel.pl.1
   branches/ProbABEL-pvals/ProbABEL/src/probabel
Removed:
   branches/ProbABEL-pvals/ProbABEL/checks/check_probabel.pl_chunk.sh
   branches/ProbABEL-pvals/ProbABEL/doc/probabel.pl.1
   branches/ProbABEL-pvals/ProbABEL/src/include/Colors.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Defn.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Errormsg.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Fileio.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Graphics.h
   branches/ProbABEL-pvals/ProbABEL/src/include/GraphicsBase.h
   branches/ProbABEL-pvals/ProbABEL/src/include/IOStuff.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Internal.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Makefile.in
   branches/ProbABEL-pvals/ProbABEL/src/include/Makefile.win
   branches/ProbABEL-pvals/ProbABEL/src/include/Parse.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Print.h
   branches/ProbABEL-pvals/ProbABEL/src/include/RBufferUtils.h
   branches/ProbABEL-pvals/ProbABEL/src/include/README
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Applic.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/BLAS.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Callbacks.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/GetX11Image.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/GraphicsDevice.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/GraphicsEngine.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Lapack.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Linpack.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Makefile.in
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Parse.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/PrtUtil.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/QuartzDevice.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/R-ftp-http.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/RConverters.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/RStartup.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Rdynload.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Riconv.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/Visibility.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/eventloop.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/rlocale.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/stats_package.h
   branches/ProbABEL-pvals/ProbABEL/src/include/R_ext/stats_stubs.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rconnections.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rdefines.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rdevices.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rdynpriv.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rembedded.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rgraphics.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rinlinedfuns.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rinterface.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rinternals.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Rmath.h0.in
   branches/ProbABEL-pvals/ProbABEL/src/include/Rmodules/
   branches/ProbABEL-pvals/ProbABEL/src/include/S.h
   branches/ProbABEL-pvals/ProbABEL/src/include/Startup.h
   branches/ProbABEL-pvals/ProbABEL/src/include/config.h.in
   branches/ProbABEL-pvals/ProbABEL/src/include/memcheck.h
   branches/ProbABEL-pvals/ProbABEL/src/include/stamp-h.in
   branches/ProbABEL-pvals/ProbABEL/src/include/valgrind.h
   branches/ProbABEL-pvals/ProbABEL/src/probabel.pl
Modified:
   branches/ProbABEL-pvals/ProbABEL/Makefile.am
   branches/ProbABEL-pvals/ProbABEL/checks/Makefile.am
   branches/ProbABEL-pvals/ProbABEL/checks/R-tests/Makefile.am
   branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_pacox.R
   branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palinear.R
   branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palogist.R
   branches/ProbABEL-pvals/ProbABEL/checks/test_bt.sh
   branches/ProbABEL-pvals/ProbABEL/checks/test_cox.sh
   branches/ProbABEL-pvals/ProbABEL/checks/test_mms.sh
   branches/ProbABEL-pvals/ProbABEL/checks/test_qt.sh
   branches/ProbABEL-pvals/ProbABEL/configure.ac
   branches/ProbABEL-pvals/ProbABEL/doc/ChangeLog
   branches/ProbABEL-pvals/ProbABEL/doc/INSTALL
   branches/ProbABEL-pvals/ProbABEL/doc/Makefile.am
   branches/ProbABEL-pvals/ProbABEL/doc/ProbABEL_manual.tex
   branches/ProbABEL-pvals/ProbABEL/doc/pacoxph.1
   branches/ProbABEL-pvals/ProbABEL/doc/palinear.1
   branches/ProbABEL-pvals/ProbABEL/doc/palogist.1
   branches/ProbABEL-pvals/ProbABEL/src/Makefile.am
   branches/ProbABEL-pvals/ProbABEL/src/coxph_data.cpp
   branches/ProbABEL-pvals/ProbABEL/src/coxph_data.h
   branches/ProbABEL-pvals/ProbABEL/src/eigen_mematrix.cpp
   branches/ProbABEL-pvals/ProbABEL/src/gendata.cpp
   branches/ProbABEL-pvals/ProbABEL/src/main.cpp
   branches/ProbABEL-pvals/ProbABEL/src/main_functions_dump.cpp
   branches/ProbABEL-pvals/ProbABEL/src/main_functions_dump.h
   branches/ProbABEL-pvals/ProbABEL/src/reg1.cpp
   branches/ProbABEL-pvals/ProbABEL/src/regdata.cpp
   branches/ProbABEL-pvals/ProbABEL/src/regdata.h
Log:
Merged trunk r1490 through r1540 into the ProbABEL p=values branch.


Modified: branches/ProbABEL-pvals/ProbABEL/Makefile.am
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/Makefile.am	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/Makefile.am	2014-01-11 14:09:17 UTC (rev 1541)
@@ -1,4 +1,4 @@
 ## Process this file with automake to produce Makefile.in
 
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src doc checks examples
+SUBDIRS = src doc checks examples checks/R-tests

Modified: branches/ProbABEL-pvals/ProbABEL/checks/Makefile.am
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/Makefile.am	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/Makefile.am	2014-01-11 14:09:17 UTC (rev 1541)
@@ -42,7 +42,7 @@
 
 
 if BUILD_palinear
-check_SCRIPTS += check_probabel.pl_chunk.sh check_dose_input.sh
+check_SCRIPTS += check_probabel_chunk.sh check_dose_input.sh
 check_SCRIPTS += test_qt.sh test_mms.sh
 endif
 if BUILD_palogist
@@ -52,8 +52,8 @@
 check_SCRIPTS +=  test_cox.sh
 endif
 
-
-
+AM_TESTS_ENVIRONMENT= \
+	PA_BINDIR=$(top_builddir)/src
 TESTS = $(check_SCRIPTS)
 
 EXTRA_DIST = $(verified_results) $(input_files) $(check_SCRIPTS)
@@ -139,7 +139,7 @@
  height_ngp2_over_domin.out.txt height_ngp2_2df.out.txt			\
  height_ngp2_add.out.txt height_base_add.out.txt
 
-other_files = probabel.pl probabel_config.cfg
+other_files = probabel probabel_config.cfg
 
 cleanfiles_probabel_check = height.PHE $(dose_files) $(prob_files)	\
  $(map_files) $(info_files) $(output_files) $(other_files)

Modified: branches/ProbABEL-pvals/ProbABEL/checks/R-tests/Makefile.am
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/R-tests/Makefile.am	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/R-tests/Makefile.am	2014-01-11 14:09:17 UTC (rev 1541)
@@ -2,9 +2,9 @@
 
 AUTOMAKE_OPTIONS = foreign color-tests
 
-R_test_files =  run_models_in_R_palinear.R	\
- run_models_in_R_palogist.R			\
- run_models_in_R_pacox.R			\
+R_test_files = run_models_in_R_palinear.R run_model_linear.R	\
+ run_models_in_R_palogist.R run_model_logist.R			\
+ run_models_in_R_pacox.R run_model_coxph.R			\
  initial_checks.R
 
 check_SCRIPTS =
@@ -23,11 +23,81 @@
 
 
 testsdir = $(pkgdatadir)/checks/R-tests
-dist_tests_DATA = $(R_test_files) $(check_SCRIPTS)
-#dist_tests_SCRIPTS = $(check_SCRIPTS)
+AM_TESTS_ENVIRONMENT= \
+	PA_BINDIR=$(top_builddir)/src
+TESTS = $(check_SCRIPTS)
 
-TESTS_ENVIRONMENT = bash
+## The palogist R test still doesn't run correctly.
+XFAIL_TESTS = run_R_test_palogist.sh
 
+EXTRA_DIST = $(check_SCRIPTS) $(R_test_files)
 
 
-TESTS = $(check_SCRIPTS)
+##################################################
+# Files that need to be cleaned up after testing
+##################################################
+
+cleanfiles_bt = logist_add.out.txt logist_fv_add.out.txt	\
+logist_prob_2df.out.txt logist_prob_fv_2df.out.txt		\
+logist_prob_fv_domin.out.txt logist_prob_add.out.txt		\
+logist_prob_fv_add.out.txt logist_prob_over_domin.out.txt	\
+logist_prob_domin.out.txt logist_prob_fv_recess.out.txt		\
+logist_prob_fv_over_domin.out.txt logist_prob_recess.out.txt
+
+cleanfiles_qt = linear_base_add.out.txt linear_base_fv_add.out.txt	\
+linear_allcov_add.out.txt linear_allcov_fv_add.out.txt			\
+linear_int1_add.out.txt linear_int1_fv_add.out.txt			\
+linear_robust_add.out.txt linear_robust_fv_add.out.txt			\
+linear_robust_int1_add.out.txt linear_robust_int1_fv_add.out.txt	\
+linear_ngp2_add.out.txt linear_ngp2_fv_add.out.txt			\
+linear_ngp2_domin.out.txt linear_ngp2_fv_domin.out.txt			\
+linear_ngp2_over_domin.out.txt linear_ngp2_fv_over_domin.out.txt	\
+linear_ngp2_recess.out.txt linear_ngp2_fv_recess.out.txt		\
+linear_ngp2_2df.out.txt linear_ngp2_fv_2df.out.txt			\
+linear_ngp2_allcov_add.out.txt linear_ngp2_allcov_fv_add.out.txt	\
+linear_ngp2_allcov_domin.out.txt linear_ngp2_allcov_fv_domin.out.txt	\
+linear_ngp2_allcov_over_domin.out.txt					\
+linear_ngp2_allcov_fv_over_domin.out.txt				\
+linear_ngp2_allcov_recess.out.txt linear_ngp2_allcov_fv_recess.out.txt	\
+linear_ngp2_allcov_recess.out.txt linear_ngp2_allcov_fv_recess.out.txt	\
+linear_ngp2_int1_add.out.txt linear_ngp2_int1_fv_add.out.txt		\
+linear_ngp2_int1_domin.out.txt linear_ngp2_int1_fv_domin.out.txt	\
+linear_ngp2_int1_over_domin.out.txt					\
+linear_ngp2_int1_fv_over_domin.out.txt linear_ngp2_int1_recess.out.txt	\
+linear_ngp2_int1_fv_recess.out.txt linear_ngp2_int1_2df.out.txt		\
+linear_ngp2_int1_fv_2df.out.txt linear_ngp2_robust_add.out.txt		\
+linear_ngp2_robust_fv_add.out.txt linear_ngp2_robust_domin.out.txt	\
+linear_ngp2_robust_fv_domin.out.txt					\
+linear_ngp2_robust_over_domin.out.txt					\
+linear_ngp2_robust_fv_over_domin.out.txt				\
+linear_ngp2_robust_recess.out.txt linear_ngp2_robust_fv_recess.out.txt	\
+linear_ngp2_robust_2df.out.txt linear_ngp2_robust_fv_2df.out.txt	\
+linear_ngp2_robust_int1_add.out.txt					\
+linear_ngp2_robust_int1_fv_add.out.txt					\
+linear_ngp2_robust_int1_domin.out.txt					\
+linear_ngp2_robust_int1_fv_domin.out.txt				\
+linear_ngp2_robust_int1_over_domin.out.txt				\
+linear_ngp2_robust_int1_fv_over_domin.out.txt				\
+linear_ngp2_robust_int1_recess.out.txt					\
+linear_ngp2_robust_int1_fv_recess.out.txt				\
+linear_ngp2_robust_int1_2df.out.txt					\
+linear_ngp2_robust_int1_fv_2df.out.txt					\
+linear_ngp2_allcov_fv_2df.out.txt linear_ngp2_robust_fv_add.out.txt	\
+linear_ngp2_allcov_2df.out.txt
+
+cleanfiles_mms = mmscore_dose_add.out.txt mmscore_dose_fv_add.out.txt	\
+mmscore_prob_fv_over_domin.out.txt mmscore_prob_fv_domin.out.txt	\
+mmscore_prob_over_domin.out.txt mmscore_prob_fv_add.out.txt		\
+mmscore_prob_fv_recess.out.txt mmscore_prob_domin.out.txt		\
+mmscore_prob_recess.out.txt mmscore_prob_add.out.txt			\
+mmscore_prob_2df.out.txt mmscore_prob_fv_2df.out.txt
+
+cleanfiles_cox = coxph_dose_add.out.txt coxph_dose_fv_add.out.txt	\
+coxph_prob_fv_over_domin.out.txt coxph_prob_fv_domin.out.txt		\
+coxph_prob_over_domin.out.txt coxph_prob_fv_add.out.txt			\
+coxph_prob_fv_recess.out.txt coxph_prob_domin.out.txt			\
+coxph_prob_recess.out.txt coxph_prob_add.out.txt			\
+coxph_prob_2df.out.txt coxph_prob_fv_2df.out.txt
+
+CLEANFILES = $(cleanfiles_bt) $(cleanfiles_qt) $(cleanfiles_mms)	\
+ $(cleanfiles_cox)

Modified: branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_pacox.R
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_pacox.R	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_pacox.R	2014-01-11 14:09:17 UTC (rev 1541)
@@ -23,29 +23,22 @@
 ## Run ProbABEL to get the output data we want to compare/verify
 ####
 cat("Running ProbABEL...\t\t\t\t")
-tmp <- system(paste0("cd ", tests.path,
-                     "; bash test_cox.sh 2> /dev/null; cd -"),
+tmp <- system(paste0("bash ", tests.path, "test_cox.sh 2> /dev/null"),
               intern=TRUE)
 cat("OK\n")
 
-resPaAddDose <- read.table(
-    paste0(tests.path, "coxph_dose_add.out.txt"),
-    head=TRUE)[, colsAddDose]
-resPaAddProb <- read.table(
-    paste0(tests.path, "coxph_prob_add.out.txt"),
-    head=TRUE)[, colsAddProb]
-resPaDom <- read.table(
-    paste0(tests.path, "coxph_prob_domin.out.txt"),
-    head=TRUE)[, colsDom]
-resPaRec <- read.table(
-    paste0(tests.path, "coxph_prob_recess.out.txt"),
-    head=TRUE)[, colsRec]
-resPaOdom <- read.table(
-    paste0(tests.path, "coxph_prob_over_domin.out.txt"),
-    head=TRUE)[, colsOdom]
-resPa2df <- read.table(
-    paste0(tests.path, "coxph_prob_2df.out.txt"),
-    head=TRUE)[, cols2df]
+dose.add.PA <- read.table("coxph_dose_add.out.txt",
+                          head=TRUE)[, colsAddDose]
+prob.add.PA <- read.table("coxph_prob_add.out.txt",
+                          head=TRUE)[, colsAddProb]
+prob.dom.PA <- read.table("coxph_prob_domin.out.txt",
+                          head=TRUE)[, colsDom]
+prob.rec.PA <- read.table("coxph_prob_recess.out.txt",
+                          head=TRUE)[, colsRec]
+prob.odom.PA <- read.table("coxph_prob_over_domin.out.txt",
+                           head=TRUE)[, colsOdom]
+prob.2df.PA <- read.table("coxph_prob_2df.out.txt",
+                          head=TRUE)[, cols2df]
 
 ####
 ## run analysis in R
@@ -54,7 +47,7 @@
 
 cat("Comparing R output with ProbABEL output\t\t")
 
-source("run_model_coxph.R")
+source(paste0(srcdir, "run_model_coxph.R"))
 
 model.fn.0 <-
     "coxph( Surv(fupt_chd, chd)[noNA] ~ sex[noNA] + age[noNA] + othercov[noNA] )"
@@ -65,7 +58,7 @@
 dose.add.R <- run.model(model.fn.0, model.fn, snpdose)
 colnames(dose.add.R) <- colsAddDose
 rownames(dose.add.R) <- NULL
-stopifnot( all.equal(resPaAddDose, dose.add.R, tol=tol) )
+stopifnot( all.equal(dose.add.PA, dose.add.R, tol=tol) )
 cat("additive ")
 
 
@@ -74,7 +67,7 @@
 prob.add.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.add.R) <- colsAddProb
 rownames(prob.add.R) <- NULL
-stopifnot( all.equal(resPaAddProb, prob.add.R, tol=tol) )
+stopifnot( all.equal(prob.add.PA, prob.add.R, tol=tol) )
 cat("additive ")
 
 ## dominant model
@@ -82,7 +75,7 @@
 prob.dom.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.dom.R) <- colsDom
 rownames(prob.dom.R) <- NULL
-stopifnot( all.equal(resPaDom, prob.dom.R, tol=tol) )
+stopifnot( all.equal(prob.dom.PA, prob.dom.R, tol=tol) )
 cat("dominant ")
 
 ## recessive model
@@ -90,7 +83,7 @@
 prob.rec.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.rec.R) <- colsRec
 rownames(prob.rec.R) <- NULL
-stopifnot( all.equal(resPaRec, prob.rec.R, tol=tol) )
+stopifnot( all.equal(prob.rec.PA, prob.rec.R, tol=tol) )
 cat("recessive ")
 
 ## over-dominant model
@@ -98,7 +91,7 @@
 prob.odom.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.odom.R) <- colsOdom
 rownames(prob.odom.R) <- NULL
-stopifnot( all.equal(resPaOdom, prob.odom.R, tol=tol) )
+stopifnot( all.equal(prob.odom.PA, prob.odom.R, tol=tol) )
 cat("overdominant ")
 
 
@@ -110,7 +103,7 @@
 prob.2df.R <- run.model(model.fn.0, model.fn, snpd1, snpd2)
 colnames(prob.2df.R) <- cols2df
 rownames(prob.2df.R) <- NULL
-stopifnot( all.equal(resPa2df, prob.2df.R, tol=tol) )
+stopifnot( all.equal(prob.2df.PA, prob.2df.R, tol=tol) )
 cat("2df\n")
 
 cat("\t\t\t\t\t\tOK\n")

Modified: branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palinear.R
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palinear.R	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palinear.R	2014-01-11 14:09:17 UTC (rev 1541)
@@ -15,29 +15,29 @@
 ## Run ProbABEL to get the output data we want to compare/verify
 ####
 cat("Running ProbABEL...\t\t\t\t")
-tmp <- system(paste0("cd ", tests.path, "; bash test_qt.sh; cd -"),
+tmp <- system(paste0("bash ", tests.path, "test_qt.sh"),
               intern=TRUE)
 cat("OK\n")
 
-resPaAddDose <- read.table(
-    paste0(tests.path, "height_base_add.out.txt"),
-    head=TRUE)[, colsAddDose]
-resPaAddProb <- read.table(
-    paste0(tests.path, "height_ngp2_add.out.txt"),
-    head=TRUE)[, colsAddProb]
-resPaDom <- read.table(
-    paste0(tests.path, "height_ngp2_domin.out.txt"),
-    head=TRUE)[, colsDom]
-resPaRec <- read.table(
-    paste0(tests.path, "height_ngp2_recess.out.txt"),
-    head=TRUE)[, colsRec]
-resPaOdom <- read.table(
-    paste0(tests.path, "height_ngp2_over_domin.out.txt"),
-    head=TRUE)[, colsOdom]
-resPa2df <- read.table(
-    paste0(tests.path, "height_ngp2_2df.out.txt"),
-    head=TRUE)[, cols2df]
+dose.add.PA <- read.table("linear_base_add.out.txt",
+                          head=TRUE)[, colsAddDose]
+prob.add.PA <- read.table("linear_ngp2_add.out.txt",
+                          head=TRUE)[, colsAddProb]
+prob.dom.PA <- read.table("linear_ngp2_domin.out.txt",
+                          head=TRUE)[, colsDom]
+prob.rec.PA <- read.table("linear_ngp2_recess.out.txt",
+                          head=TRUE)[, colsRec]
+prob.odom.PA <- read.table("linear_ngp2_over_domin.out.txt",
+                           head=TRUE)[, colsOdom]
+prob.2df.PA <- read.table("linear_ngp2_2df.out.txt",
+                          head=TRUE)[, cols2df]
 
+## Fix betas, sebetas, chi^2 for the case that there is no variation
+## (SNP 6 in the info file). ProbABEL lists them all as 0.0, R lists
+## them as:
+prob.dom.PA[6, 2:4] <- c(NaN, NaN, 0.0)
+prob.2df.PA[6, 4:5] <- c(NA, NA)
+
 ####
 ## run analysis in R
 ####
@@ -45,7 +45,7 @@
 
 cat("Comparing R output with ProbABEL output\t\t")
 
-source("run_model_linear.R")
+source(paste0(srcdir, "run_model_linear.R"))
 
 model.fn.0 <- "lm( height[noNA] ~ sex[noNA] + age[noNA] )"
 model.fn   <- "lm( height ~ sex + age + snp )"
@@ -55,7 +55,7 @@
 dose.add.R <- run.model(model.fn.0, model.fn, snpdose)
 colnames(dose.add.R) <- colsAddDose
 rownames(dose.add.R) <- NULL
-stopifnot( all.equal(resPaAddDose, dose.add.R, tol=tol) )
+stopifnot( all.equal(dose.add.PA, dose.add.R, tol=tol) )
 cat("additive ")
 
 
@@ -64,7 +64,7 @@
 prob.add.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.add.R) <- colsAddProb
 rownames(prob.add.R) <- NULL
-stopifnot( all.equal(resPaAddProb, prob.add.R, tol=tol) )
+stopifnot( all.equal(prob.add.PA, prob.add.R, tol=tol) )
 cat("additive ")
 
 ## dominant model
@@ -72,7 +72,7 @@
 prob.dom.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.dom.R) <- colsDom
 rownames(prob.dom.R) <- NULL
-stopifnot( all.equal(resPaDom, prob.dom.R, tol=tol) )
+stopifnot( all.equal(prob.dom.PA, prob.dom.R, tol=tol) )
 cat("dominant ")
 
 ## recessive model
@@ -80,7 +80,7 @@
 prob.rec.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.rec.R) <- colsRec
 rownames(prob.rec.R) <- NULL
-stopifnot( all.equal(resPaRec, prob.rec.R, tol=tol) )
+stopifnot( all.equal(prob.rec.PA, prob.rec.R, tol=tol) )
 cat("recessive ")
 
 ## over-dominant model
@@ -88,7 +88,7 @@
 prob.odom.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.odom.R) <- colsOdom
 rownames(prob.odom.R) <- NULL
-stopifnot( all.equal(resPaOdom, prob.odom.R, tol=tol) )
+stopifnot( all.equal(prob.odom.PA, prob.odom.R, tol=tol) )
 cat("overdominant ")
 
 ## 2df model
@@ -102,10 +102,17 @@
         model.0 <- lm( height[noNA] ~ sex[noNA] + age[noNA] )
         model   <- lm( height ~ sex + age + prob[, indexHet] + prob[, indexHom] )
         smA1A2  <- summary(model)$coef[4, 1:2]
-        smA1A1  <- summary(model)$coef[5, 1:2]
+
+        ## When all coefficients are NA, they don't show up in $coeff
+        if ( nrow(summary(model)$coeff) > 4 ) {
+            smA1A1 <- summary(model)$coef[5, 1:2]
+        } else {
+            smA1A1 <- c(NA, NA)
+        }
+
         lrt     <- 2 * ( logLik( model ) - logLik( model.0 ) )
 
-        rsq <- resPa2df[i-2, "Rsq"]
+        rsq <- prob.2df.PA[i-2, "Rsq"]
         if( rsq < rsq.thresh) {
             row <- c(rsq, NaN, NaN, NaN, NaN, NaN)
         } else {
@@ -116,7 +123,7 @@
 }
 colnames(prob.2df.R) <- cols2df
 rownames(prob.2df.R) <- NULL
-stopifnot( all.equal(resPa2df, prob.2df.R, tol=tol) )
+stopifnot( all.equal(prob.2df.PA, prob.2df.R, tol=tol) )
 cat("2df\n")
 
 cat("\t\t\t\t\t\tOK\n")

Modified: branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palogist.R
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palogist.R	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/R-tests/run_models_in_R_palogist.R	2014-01-11 14:09:17 UTC (rev 1541)
@@ -15,29 +15,27 @@
 ## Run ProbABEL to get the output data we want to compare/verify
 ####
 cat("Running ProbABEL...\t\t\t\t")
-tmp <- system(paste0("cd ", tests.path, "; bash test_bt.sh; cd -"),
+tmp <- system(paste0("bash ", tests.path, "test_bt.sh"),
               intern=TRUE)
 cat("OK\n")
 
-resPaAddDose <- read.table(
-    paste0(tests.path, "logist_add.out.txt"),
-    head=TRUE)[, colsAddDose]
-resPaAddProb <- read.table(
-    paste0(tests.path, "logist_prob_add.out.txt"),
-    head=TRUE)[, colsAddProb]
-resPaDom <- read.table(
-    paste0(tests.path, "logist_prob_domin.out.txt"),
-    head=TRUE)[, colsDom]
-resPaRec <- read.table(
-    paste0(tests.path, "logist_prob_recess.out.txt"),
-    head=TRUE)[, colsRec]
-resPaOdom <- read.table(
-    paste0(tests.path, "logist_prob_over_domin.out.txt"),
-    head=TRUE)[, colsOdom]
-resPa2df <- read.table(
-    paste0(tests.path, "logist_prob_2df.out.txt"),
-    head=TRUE)[, cols2df]
+dose.add.PA <- read.table("logist_add.out.txt",
+                          head=TRUE)[, colsAddDose]
+prob.add.PA <- read.table("logist_prob_add.out.txt",
+                          head=TRUE)[, colsAddProb]
+prob.dom.PA <- read.table("logist_prob_domin.out.txt",
+                          head=TRUE)[, colsDom]
+prob.rec.PA <- read.table("logist_prob_recess.out.txt",
+                          head=TRUE)[, colsRec]
+prob.odom.PA <- read.table("logist_prob_over_domin.out.txt",
+                           head=TRUE)[, colsOdom]
+prob.2df.PA <- read.table("logist_prob_2df.out.txt",
+                          head=TRUE)[, cols2df]
 
+## Fix chi^2 for the case that there is no variation (SNP 6 in the
+## info file). ProbABEL lists it as NaN, R lists it as:
+prob.dom.PA[6, 4] <- 0.0
+
 ####
 ## run analysis in R
 ####
@@ -45,7 +43,7 @@
 
 cat("Comparing R output with ProbABEL output\t\t")
 
-source("run_model_logist.R")
+source(paste0(srcdir, "run_model_logist.R"))
 
 model.fn.0 <-
     "glm( chd[noNA] ~ sex[noNA] + age[noNA] + othercov[noNA], family=binomial)"
@@ -56,7 +54,7 @@
 dose.add.R <- run.model(model.fn.0, model.fn, snpdose)
 colnames(dose.add.R) <- colsAddDose
 rownames(dose.add.R) <- NULL
-stopifnot( all.equal(resPaAddDose, dose.add.R, tol=tol) )
+stopifnot( all.equal(dose.add.PA, dose.add.R, tol=tol) )
 cat("additive ")
 
 ## Additive model, probabilities
@@ -64,7 +62,7 @@
 prob.add.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.add.R) <- colsAddProb
 rownames(prob.add.R) <- NULL
-stopifnot( all.equal(resPaAddProb, prob.add.R, tol=tol) )
+stopifnot( all.equal(prob.add.PA, prob.add.R, tol=tol) )
 cat("additive ")
 
 ## dominant model
@@ -72,7 +70,7 @@
 prob.dom.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.dom.R) <- colsDom
 rownames(prob.dom.R) <- NULL
-stopifnot( all.equal(resPaDom, prob.dom.R, tol=tol) )
+stopifnot( all.equal(prob.dom.PA, prob.dom.R, tol=tol) )
 cat("dominant ")
 
 ## recessive model
@@ -80,7 +78,7 @@
 prob.rec.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.rec.R) <- colsRec
 rownames(prob.rec.R) <- NULL
-stopifnot( all.equal(resPaRec, prob.rec.R, tol=tol) )
+stopifnot( all.equal(prob.rec.PA, prob.rec.R, tol=tol) )
 cat("recessive ")
 
 ## over-dominant model
@@ -88,7 +86,7 @@
 prob.odom.R <- run.model(model.fn.0, model.fn, snpprob)
 colnames(prob.odom.R) <- colsOdom
 rownames(prob.odom.R) <- NULL
-stopifnot( all.equal(resPaOdom, prob.odom.R, tol=tol) )
+stopifnot( all.equal(prob.odom.PA, prob.odom.R, tol=tol) )
 cat("overdominant ")
 
 
@@ -105,10 +103,16 @@
         model   <- glm( chd ~ sex + age + othercov + prob[, indexHet] +
                        prob[, indexHom], family=binomial )
         smA1A2  <- summary(model)$coef[5, 1:2]
-        smA1A1  <- summary(model)$coef[6, 1:2]
+
+        if ( nrow(summary(model)$coeff) > 5 ) {
+            smA1A1 <- summary(model)$coef[6, 1:2]
+        } else {
+            smA1A1 <- c(NaN, NaN)
+        }
+
         lrt     <- 2 * ( logLik( model ) - logLik( model.0 ) )
 
-        rsq <- resPa2df[i-2, "Rsq"]
+        rsq <- prob.2df.PA[i-2, "Rsq"]
         if( rsq < rsq.thresh) {
             row <- c(rsq, NaN, NaN, NaN, NaN, NaN)
         } else {
@@ -119,7 +123,7 @@
 }
 colnames(prob.2df.R) <- cols2df
 rownames(prob.2df.R) <- NULL
-stopifnot( all.equal(resPa2df, prob.2df.R, tol=tol) )
+stopifnot( all.equal(prob.2df.PA, prob.2df.R, tol=tol) )
 cat("2df\n")
 
 cat("\t\t\t\t\t\tOK\n")

Deleted: branches/ProbABEL-pvals/ProbABEL/checks/check_probabel.pl_chunk.sh
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/check_probabel.pl_chunk.sh	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/check_probabel.pl_chunk.sh	2014-01-11 14:09:17 UTC (rev 1541)
@@ -1,152 +0,0 @@
-#!/bin/bash
-# L.C. Karssen
-# This script is used to test whether probabel.pl works correctly when
-# input is cut up in chunks
-
-echo "Testing probabel.pl..."
-
-# Exit with error when one of the steps in the script fails
-set -e
-
-# -------- Set some default paths and file names -------
-if [ -z ${srcdir} ]; then
-    srcdir="."
-fi
-inputdir="${srcdir}/inputfiles/"
-padir="${srcdir}/../src/"
-results="${srcdir}/verified_results/"
-
-dosefile="$inputdir/test.mldose"
-probfile="$inputdir/test.mlprob"
-infofile="$inputdir/test.mlinfo"
-mapfile="$inputdir/test.map"
-phenofile="$inputdir/height.txt"
-
-probabel="${padir}/probabel.pl"
-probabelcfg="${padir}/probabel_config.cfg.example"
-chunksep="_._chunk_._"
-chrsep="_._chr_._"
-
-# ------ Prepare probabel.pl and the config file ------
-sed 's;"./";"../src/";g' $probabel > probabel.pl
-chmod a+x probabel.pl
-cp $probabelcfg probabel_config.cfg
-chmod +w probabel_config.cfg # Need this for make distcheck to work
-cp $phenofile height.PHE
-
-base="chr${chrsep}"
-echo "TestCohortNoChunk,$base.info,$base.dose,$base.prob,$base.map" \
-    >> probabel_config.cfg
-
-base="chr${chrsep}.chunk${chunksep}"
-echo "TestCohortChunk,$base.info,$base.dose,$base.prob,$base.map" \
-    >> probabel_config.cfg
-
-
-# ---------- function definitions ----------
-prepare_input ()
-{
-    if [ "$1" = "nochunk" ]; then
-        # ------------------ No chunks test -------------------
-        # Split the dose, prob and info files up into two chromosomes
-        # with some  chunks
-        awk '{print $1,$2,$3,$4}'    $dosefile > chr1.dose
-        awk '{print $1,$2,$5,$6,$7}' $dosefile > chr2.dose
-
-        awk '{print $1,$2,$3,$4,$5,$6}'          $probfile > chr1.prob
-        awk '{print $1,$2,$7,$8,$9,$10,$11,$12}' $probfile > chr2.prob
-
-        sed -n '1,3p' $infofile >  chr1.info
-        sed -n '1p'   $infofile >  chr2.info
-        sed -n '4,6p' $infofile >> chr2.info
-
-        sed -n '1,3p' $mapfile > chr1.map
-        sed -n '1p'   $mapfile >  chr2.map
-        sed -n '4,6p' $mapfile >> chr2.map
-
-        WithOrWithout="without"
-    elif [ "$1" = "chunk" ]; then
-        # ------------------ Chunks test ----------------------
-        # Split the dose and info files up into two chromosomes with
-        # some chunks
-        awk '{print $1,$2,$3}'    $dosefile > chr1.chunk1.dose
-        awk '{print $1,$2,$4}'    $dosefile > chr1.chunk2.dose
-        awk '{print $1,$2,$5,$6}' $dosefile > chr2.chunk1.dose
-        awk '{print $1,$2,$7}'    $dosefile > chr2.chunk2.dose
-
-        awk '{print $1,$2,$3,$4}'        $probfile > chr1.chunk1.prob
-        awk '{print $1,$2,$5,$6}'        $probfile > chr1.chunk2.prob
-        awk '{print $1,$2,$7,$8,$9,$10}' $probfile > chr2.chunk1.prob
-        awk '{print $1,$2,$11,$12}'      $probfile > chr2.chunk2.prob
-
-        sed -n '1,2p' $infofile >  chr1.chunk1.info
-        sed -n '1p'   $infofile >  chr1.chunk2.info
-        sed -n '3p'   $infofile >> chr1.chunk2.info
-        sed -n '1p'   $infofile >  chr2.chunk1.info
-        sed -n '4,5p' $infofile >> chr2.chunk1.info
-        sed -n '1p'   $infofile >  chr2.chunk2.info
-        sed -n '6p'   $infofile >> chr2.chunk2.info
-
-        sed -n '1,2p' $mapfile >  chr1.chunk1.map
-        sed -n '1p'   $mapfile >  chr1.chunk2.map
-        sed -n '3p'   $mapfile >> chr1.chunk2.map
-        sed -n '1p'   $mapfile >  chr2.chunk1.map
-        sed -n '4,5p' $mapfile >> chr2.chunk1.map
-        sed -n '1p'   $mapfile >  chr2.chunk2.map
-        sed -n '6p'   $mapfile >> chr2.chunk2.map
-
-        WithOrWithout="with"
-    else
-        echo "Run this function with one of these arguments: 'chunk'
-        or 'nochunk'."
-        exit 1
-    fi
-
-}
-
-
-run_test ()
-{
-    # Run an analysis on dosage data
-    outfile="height_add.out.txt"
-
-    echo "Checking output using dosages $WithOrWithout chunks..."
-    ./probabel.pl 1 2 linear $1 --additive height > /dev/null
-
-    blanks="                                                          "
-    echo -n "  Verifying "
-    if diff $outfile $results/$outfile; then
-        echo -e "${outfile}${blanks:${#outfile}} OK"
-    else
-        echo -e "${outfile}${blanks:${#outfile}} FAILED"
-        exit 1
-    fi
-
-    # Run an analysis on probabilities
-    outfilelist="height_ngp2_2df.out.txt height_ngp2_recess.out.txt
-    height_ngp2_over_domin.out.txt height_ngp2_domin.out.txt
-    height_ngp2_add.out.txt"
-
-    echo "Checking output using probabilities $WithOrWithout chunks..."
-    ./probabel.pl 1 2 linear $1 --allmodels height -o height_ngp2 > /dev/null
-    for file in $outfilelist; do
-        echo -n "  Verifying "
-        if diff $file $results/$file; then
-            echo -e "${file}${blanks:${#file}} OK"
-        else
-            echo -e "${file}${blanks:${#file}} FAILED"
-            exit 1
-        fi
-    done
-}
-
-# ---------- Continuation of the main function ----------
-prepare_input nochunk
-
-run_test TestCohortNoChunk
-echo "-------------------- Finished check without chunks --------------------"
-
-prepare_input chunk
-
-run_test TestCohortChunk
-echo "-------------------- Finished check with chunks --------------------"

Copied: branches/ProbABEL-pvals/ProbABEL/checks/check_probabel_chunk.sh (from rev 1540, pkg/ProbABEL/checks/check_probabel_chunk.sh)
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/check_probabel_chunk.sh	                        (rev 0)
+++ branches/ProbABEL-pvals/ProbABEL/checks/check_probabel_chunk.sh	2014-01-11 14:09:17 UTC (rev 1541)
@@ -0,0 +1,152 @@
+#!/bin/bash
+# L.C. Karssen
+# This script is used to test whether the probabel script works
+# correctly when input is cut up in chunks
+
+echo "Testing probabel..."
+
+# Exit with error when one of the steps in the script fails
+set -e
+
+# -------- Set some default paths and file names -------
+if [ -z ${srcdir} ]; then
+    srcdir="."
+fi
+inputdir="${srcdir}/inputfiles/"
+padir="${srcdir}/../src/"
+results="${srcdir}/verified_results/"
+
+dosefile="$inputdir/test.mldose"
+probfile="$inputdir/test.mlprob"
+infofile="$inputdir/test.mlinfo"
+mapfile="$inputdir/test.map"
+phenofile="$inputdir/height.txt"
+
+probabel="${padir}/probabel"
+probabelcfg="${padir}/probabel_config.cfg.example"
+chunksep="_._chunk_._"
+chrsep="_._chr_._"
+
+# ------ Prepare probabel and the config file ------
+sed 's;"./";"../src/";g' $probabel > probabel
+chmod a+x probabel
+cp $probabelcfg probabel_config.cfg
+chmod +w probabel_config.cfg # Need this for make distcheck to work
+cp $phenofile height.PHE
+
+base="chr${chrsep}"
+echo "TestCohortNoChunk,$base.info,$base.dose,$base.prob,$base.map" \
+    >> probabel_config.cfg
+
+base="chr${chrsep}.chunk${chunksep}"
+echo "TestCohortChunk,$base.info,$base.dose,$base.prob,$base.map" \
+    >> probabel_config.cfg
+
+
+# ---------- function definitions ----------
+prepare_input ()
+{
+    if [ "$1" = "nochunk" ]; then
+        # ------------------ No chunks test -------------------
+        # Split the dose, prob and info files up into two chromosomes
+        # with some  chunks
+        awk '{print $1,$2,$3,$4}'    $dosefile > chr1.dose
+        awk '{print $1,$2,$5,$6,$7}' $dosefile > chr2.dose
+
+        awk '{print $1,$2,$3,$4,$5,$6}'          $probfile > chr1.prob
+        awk '{print $1,$2,$7,$8,$9,$10,$11,$12}' $probfile > chr2.prob
+
+        sed -n '1,3p' $infofile >  chr1.info
+        sed -n '1p'   $infofile >  chr2.info
+        sed -n '4,6p' $infofile >> chr2.info
+
+        sed -n '1,3p' $mapfile > chr1.map
+        sed -n '1p'   $mapfile >  chr2.map
+        sed -n '4,6p' $mapfile >> chr2.map
+
+        WithOrWithout="without"
+    elif [ "$1" = "chunk" ]; then
+        # ------------------ Chunks test ----------------------
+        # Split the dose and info files up into two chromosomes with
+        # some chunks
+        awk '{print $1,$2,$3}'    $dosefile > chr1.chunk1.dose
+        awk '{print $1,$2,$4}'    $dosefile > chr1.chunk2.dose
+        awk '{print $1,$2,$5,$6}' $dosefile > chr2.chunk1.dose
+        awk '{print $1,$2,$7}'    $dosefile > chr2.chunk2.dose
+
+        awk '{print $1,$2,$3,$4}'        $probfile > chr1.chunk1.prob
+        awk '{print $1,$2,$5,$6}'        $probfile > chr1.chunk2.prob
+        awk '{print $1,$2,$7,$8,$9,$10}' $probfile > chr2.chunk1.prob
+        awk '{print $1,$2,$11,$12}'      $probfile > chr2.chunk2.prob
+
+        sed -n '1,2p' $infofile >  chr1.chunk1.info
+        sed -n '1p'   $infofile >  chr1.chunk2.info
+        sed -n '3p'   $infofile >> chr1.chunk2.info
+        sed -n '1p'   $infofile >  chr2.chunk1.info
+        sed -n '4,5p' $infofile >> chr2.chunk1.info
+        sed -n '1p'   $infofile >  chr2.chunk2.info
+        sed -n '6p'   $infofile >> chr2.chunk2.info
+
+        sed -n '1,2p' $mapfile >  chr1.chunk1.map
+        sed -n '1p'   $mapfile >  chr1.chunk2.map
+        sed -n '3p'   $mapfile >> chr1.chunk2.map
+        sed -n '1p'   $mapfile >  chr2.chunk1.map
+        sed -n '4,5p' $mapfile >> chr2.chunk1.map
+        sed -n '1p'   $mapfile >  chr2.chunk2.map
+        sed -n '6p'   $mapfile >> chr2.chunk2.map
+
+        WithOrWithout="with"
+    else
+        echo "Run this function with one of these arguments: 'chunk'
+        or 'nochunk'."
+        exit 1
+    fi
+
+}
+
+
+run_test ()
+{
+    # Run an analysis on dosage data
+    outfile="height_add.out.txt"
+
+    echo "Checking output using dosages $WithOrWithout chunks..."
+    ./probabel 1 2 linear $1 --additive height > /dev/null
+
+    blanks="                                                          "
+    echo -n "  Verifying "
+    if diff $outfile $results/$outfile; then
+        echo -e "${outfile}${blanks:${#outfile}} OK"
+    else
+        echo -e "${outfile}${blanks:${#outfile}} FAILED"
+        exit 1
+    fi
+
+    # Run an analysis on probabilities
+    outfilelist="height_ngp2_2df.out.txt height_ngp2_recess.out.txt
+    height_ngp2_over_domin.out.txt height_ngp2_domin.out.txt
+    height_ngp2_add.out.txt"
+
+    echo "Checking output using probabilities $WithOrWithout chunks..."
+    ./probabel 1 2 linear $1 --allmodels height -o height_ngp2 > /dev/null
+    for file in $outfilelist; do
+        echo -n "  Verifying "
+        if diff $file $results/$file; then
+            echo -e "${file}${blanks:${#file}} OK"
+        else
+            echo -e "${file}${blanks:${#file}} FAILED"
+            exit 1
+        fi
+    done
+}
+
+# ---------- Continuation of the main function ----------
+prepare_input nochunk
+
+run_test TestCohortNoChunk
+echo "-------------------- Finished check without chunks --------------------"
+
+prepare_input chunk
+
+run_test TestCohortChunk
+echo "-------------------- Finished check with chunks --------------------"

Modified: branches/ProbABEL-pvals/ProbABEL/checks/test_bt.sh
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/test_bt.sh	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/test_bt.sh	2014-01-11 14:09:17 UTC (rev 1541)
@@ -2,23 +2,32 @@
 # This script runs checks on ProbABEL's palogist module for
 # binary traits.
 
-echo "analysing BT"
+echo "Analysing BT..."
+
+scriptdir=$(dirname $0)
+
+if [ -z ${PA_BINDIR} ]; then
+    PA_BINDIR="${scriptdir}/../src/"
+fi
 if [ -z ${srcdir} ]; then
     srcdir="."
+    PA_BINDIR=${scriptdir}/../src/
 fi
 
-. ${srcdir}/run_diff.sh
+. ${scriptdir}/run_diff.sh
 
-inputdir=${srcdir}/inputfiles
+inputdir=${scriptdir}/inputfiles
+palogist=${PA_BINDIR}/palogist
 
 # 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
 
-../src/palogist \
+$palogist \
     -p ${inputdir}/logist_data.txt \
     -d ${inputdir}/test.mldose \
     -i ${inputdir}/test.mlinfo \
@@ -27,7 +36,7 @@
     -o logist \
     >& 3
 
-../src/palogist \
+$palogist \
     -p ${inputdir}/logist_data.txt \
     -d ${inputdir}/test.dose.fvi \
     -i ${inputdir}/test.mlinfo \
@@ -41,7 +50,7 @@
     logist_fv_add.out.txt \
     "BT check: dose vs. dose_fv"
 
-../src/palogist \
+$palogist \
     -p ${inputdir}/logist_data.txt \
     -d ${inputdir}/test.mlprob \
     -i ${inputdir}/test.mlinfo \
@@ -51,7 +60,7 @@
     -o logist_prob \
     >& 3
 
-../src/palogist \
+$palogist \
     -p ${inputdir}/logist_data.txt \
     -d ${inputdir}/test.prob.fvi \
     -i ${inputdir}/test.mlinfo \

Modified: branches/ProbABEL-pvals/ProbABEL/checks/test_cox.sh
===================================================================
--- branches/ProbABEL-pvals/ProbABEL/checks/test_cox.sh	2014-01-11 10:35:31 UTC (rev 1540)
+++ branches/ProbABEL-pvals/ProbABEL/checks/test_cox.sh	2014-01-11 14:09:17 UTC (rev 1541)
@@ -2,13 +2,21 @@
 # This script runs checks on ProbABEL's pacoxph module
 
 echo "Analysing Cox model..."
+
+scriptdir=$(dirname $0)
+
+if [ -z ${PA_BINDIR} ]; then
+    PA_BINDIR="${scriptdir}/../src/"
+fi
 if [ -z ${srcdir} ]; then
     srcdir="."
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/genabel -r 1541


More information about the Genabel-commits mailing list