[Genabel-commits] r1740 - pkg/ProbABEL/checks
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon May 26 16:55:52 CEST 2014
Author: lckarssen
Date: 2014-05-26 16:55:52 +0200 (Mon, 26 May 2014)
New Revision: 1740
Added:
pkg/ProbABEL/checks/check_pacoxph_nocovar.sh
Modified:
pkg/ProbABEL/checks/Makefile.am
Log:
Added a check for pacoxph without covariates in the input phenotype file. Currently this check is expected to fail (XFAIL) because of bug #1266.
This check should be extended and Makefile.am changed accordingly when the bug is fixed.
Modified: pkg/ProbABEL/checks/Makefile.am
===================================================================
--- pkg/ProbABEL/checks/Makefile.am 2014-05-26 14:13:03 UTC (rev 1739)
+++ pkg/ProbABEL/checks/Makefile.am 2014-05-26 14:55:52 UTC (rev 1740)
@@ -49,13 +49,17 @@
check_SCRIPTS += test_bt.sh
endif
if BUILD_pacoxph
-check_SCRIPTS += test_cox.sh
+check_SCRIPTS += test_cox.sh check_pacoxph_nocovar.sh
endif
AM_TESTS_ENVIRONMENT= \
PA_BINDIR=$(top_builddir)/src
TESTS = $(check_SCRIPTS)
+## The pacoxph nocovar test doesn't run correctly until bug #1266 is
+## fixed.
+XFAIL_TESTS = check_pacoxph_nocovar.sh
+
EXTRA_DIST = $(verified_results) $(input_files) $(check_SCRIPTS)
@@ -118,11 +122,13 @@
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 \
+cleanfiles_cox = pacoxph_nocovar_add.out.txt \
+coxph_data.txt \
+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
Added: pkg/ProbABEL/checks/check_pacoxph_nocovar.sh
===================================================================
--- pkg/ProbABEL/checks/check_pacoxph_nocovar.sh (rev 0)
+++ pkg/ProbABEL/checks/check_pacoxph_nocovar.sh 2014-05-26 14:55:52 UTC (rev 1740)
@@ -0,0 +1,46 @@
+#!/bin/bash
+# L.C. Karssen
+# This script is used to test whether the Cox PH regression works
+# correctly when no covariate is present in the phenotype input file.
+# Currently this test fails, see bug #1266.
+
+echo "Testing pacoxph without covariates..."
+
+# 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/"
+
+dosefile="$inputdir/test.mldose"
+infofile="$inputdir/test.mlinfo"
+mapfile="$inputdir/test.map"
+orig_phenofile="$inputdir/coxph_data.txt"
+phenofile="coxph_data.txt"
+outfile="pacoxph_nocovar"
+pacoxph="${padir}/pacoxph"
+
+# ------ Prepare the phenotype file be removing the covariate column
+# from the existing phenotype file ------
+awk '{print $1, $2, $3}' $orig_phenofile > $phenofile
+
+
+# ---------- function definitions ----------
+run_test ()
+{
+ ## When bug #1266 is fixed, this function should be expanded to
+ ## include a verification against known-good results.
+ echo "Checking whether Cox PH regression works without covariates..."
+ $pacoxph -p $phenofile -d $dosefile -i $infofile -m $mapfile \
+ -o $outfile
+
+}
+
+
+# ---------- Continuation of the main function ----------
+run_test
+echo "---- Finished check for Cox regression without covariates ----"
Property changes on: pkg/ProbABEL/checks/check_pacoxph_nocovar.sh
___________________________________________________________________
Added: svn:executable
+ *
More information about the Genabel-commits
mailing list