[Genabel-commits] r1091 - branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 8 00:42:49 CET 2013


Author: lckarssen
Date: 2013-02-08 00:42:49 +0100 (Fri, 08 Feb 2013)
New Revision: 1091

Modified:
   branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/Makefile.am
   branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/example_mms.sh
Log:
- example_mms.sh: 
   * Added diff function to example
   * also check the other models after running with probabilities
   * minor rename of the output files when using dosage as input
- Makefile.am: 
   * If --enable-pacoxph is set at ./configure time, also run the example (test) script
   * Adapted to the new output filenames when using dosage as input


Modified: branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/Makefile.am
===================================================================
--- branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/Makefile.am	2013-02-03 15:39:12 UTC (rev 1090)
+++ branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/Makefile.am	2013-02-07 23:42:49 UTC (rev 1091)
@@ -46,7 +46,9 @@
 
 TESTS_ENVIRONMENT = sh
 check_SCRIPTS = example_bt.sh example_qt.sh example_mms.sh
-# example_cox.sh: don't run this test. It takes several hours...
+if BUILD_pacoxph
+check_SCRIPTS +=  example_cox.sh
+endif
 
 TESTS = $(check_SCRIPTS)
 
@@ -98,7 +100,7 @@
 height_ngp2_allcov_fv_2df.out.txt height_ngp2_robust_fv_add.out.txt	\
 height_ngp2_allcov_2df.out.txt
 
-cleanfiles_mms = mmscore_add.out.txt mmscore_fv_add.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		\

Modified: branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/example_mms.sh
===================================================================
--- branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/example_mms.sh	2013-02-03 15:39:12 UTC (rev 1090)
+++ branches/ProbABEL-pacox/v.0.3.0/ProbABEL/examples/example_mms.sh	2013-02-07 23:42:49 UTC (rev 1091)
@@ -1,4 +1,22 @@
-echo "analysis using MMSCORE"
+#!/bin/sh
+# This script runs checks on ProbABEL's palinear module with MMScore
+
+run_diff()
+{
+    # This function is run after each check. It needs two arguments:
+    # $1: first file to compare
+    # $2: second file to compare
+    if diff "$1" "$2"; then
+        echo -e "\t\tOK"
+    else
+        echo -e "\t\tFAILED"
+        exit 1
+    fi
+}
+
+
+# ---- The checks start here ----
+echo "Analysis using MMSCORE"
 if [ -z ${srcdir} ]; then
     srcdir="."
 fi
@@ -8,7 +26,7 @@
     -i ${srcdir}/mmscore_gen.mlinfo \
     -d ${srcdir}/mmscore_gen.mldose \
     --sep="," \
-    -o mmscore \
+    -o mmscore_dose \
     --mmscore ${srcdir}/mmscore_InvSigma_aj.sex.age.dat
 
 ../src/palinear \
@@ -16,7 +34,7 @@
     -i ${srcdir}/mmscore_gen.mlinfo \
     -d ${srcdir}/mmscore_gen.dose.fvi \
     --sep="," \
-    -o mmscore_fv \
+    -o mmscore_dose_fv \
     --mmscore ${srcdir}/mmscore_InvSigma_aj.sex.age.dat
 
 echo "mmscore check: dose vs. dose_fv"
@@ -39,8 +57,16 @@
     -o mmscore_prob_fv \
     --mmscore ${srcdir}/mmscore_InvSigma_aj.sex.age.dat
 
-echo "mmscore check: prob vs. prob_fv"
-diff mmscore_prob_add.out.txt mmscore_prob_fv_add.out.txt
+echo -n "mmscore check (additive model): prob vs. prob_fv "
+run_diff mmscore_prob_add.out.txt mmscore_prob_fv_add.out.txt
+echo -n "mmscore check (dominant model): prob vs. prob_fv "
+run_diff mmscore_prob_domin.out.txt mmscore_prob_fv_domin.out.txt
+echo -n "mmscore check (recessive model): prob vs. prob_fv "
+run_diff mmscore_prob_recess.out.txt mmscore_prob_fv_recess.out.txt
+echo -n "mmscore check (over-dominant model): prob vs. prob_fv "
+run_diff mmscore_prob_over_domin.out.txt mmscore_prob_fv_over_domin.out.txt
+echo -n "mmscore check (2df model): prob vs. prob_fv "
+run_diff mmscore_prob_2df.out.txt mmscore_prob_fv_2df.out.txt
 
 # Commented out because of slightly different output formats. We need
 # something smart here.



More information about the Genabel-commits mailing list