[Genabel-commits] r1301 - in pkg/ProbABEL: . checks checks/R-tests checks/inputfiles examples
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 23 18:40:22 CEST 2013
Author: lckarssen
Date: 2013-08-23 18:40:22 +0200 (Fri, 23 Aug 2013)
New Revision: 1301
Added:
pkg/ProbABEL/checks/
pkg/ProbABEL/checks/Makefile.am
pkg/ProbABEL/checks/R-tests/
pkg/ProbABEL/checks/check_dose_input.sh
pkg/ProbABEL/checks/check_probabel.pl_chunk.sh
pkg/ProbABEL/checks/inputfiles/
pkg/ProbABEL/checks/inputfiles/coxph_data.txt
pkg/ProbABEL/checks/inputfiles/height.txt
pkg/ProbABEL/checks/inputfiles/logist_data.txt
pkg/ProbABEL/checks/inputfiles/mmscore_InvSigma_aj.sex.age.dat
pkg/ProbABEL/checks/inputfiles/mmscore_gen.dose.fvd
pkg/ProbABEL/checks/inputfiles/mmscore_gen.dose.fvi
pkg/ProbABEL/checks/inputfiles/mmscore_gen.mldose
pkg/ProbABEL/checks/inputfiles/mmscore_gen.mlinfo
pkg/ProbABEL/checks/inputfiles/mmscore_gen.mlprob
pkg/ProbABEL/checks/inputfiles/mmscore_gen.prob.fvd
pkg/ProbABEL/checks/inputfiles/mmscore_gen.prob.fvi
pkg/ProbABEL/checks/inputfiles/mmscore_pheno.PHE
pkg/ProbABEL/checks/inputfiles/test.dose.fvd
pkg/ProbABEL/checks/inputfiles/test.dose.fvi
pkg/ProbABEL/checks/inputfiles/test.map
pkg/ProbABEL/checks/inputfiles/test.mldose
pkg/ProbABEL/checks/inputfiles/test.mlinfo
pkg/ProbABEL/checks/inputfiles/test.mlprob
pkg/ProbABEL/checks/inputfiles/test.prob.fvd
pkg/ProbABEL/checks/inputfiles/test.prob.fvi
pkg/ProbABEL/checks/run_diff.sh
pkg/ProbABEL/checks/test_all.sh
pkg/ProbABEL/checks/test_bt.sh
pkg/ProbABEL/checks/test_cox.sh
pkg/ProbABEL/checks/test_mms.sh
pkg/ProbABEL/checks/test_qt.sh
pkg/ProbABEL/checks/verified_results/
Removed:
pkg/ProbABEL/examples/example_all.sh
pkg/ProbABEL/examples/example_bt.sh
pkg/ProbABEL/examples/example_cox.sh
pkg/ProbABEL/examples/example_mms.sh
pkg/ProbABEL/examples/example_qt.sh
pkg/ProbABEL/examples/height.txt
pkg/ProbABEL/examples/mmscore_InvSigma_aj.sex.age.dat
pkg/ProbABEL/examples/mmscore_gen.dose.fvd
pkg/ProbABEL/examples/mmscore_gen.dose.fvi
pkg/ProbABEL/examples/mmscore_gen.mldose
pkg/ProbABEL/examples/mmscore_gen.mlinfo
pkg/ProbABEL/examples/mmscore_gen.mlprob
pkg/ProbABEL/examples/mmscore_gen.prob.fvd
pkg/ProbABEL/examples/mmscore_gen.prob.fvi
pkg/ProbABEL/examples/run_diff.sh
pkg/ProbABEL/examples/test.dose.fvd
pkg/ProbABEL/examples/test.dose.fvi
pkg/ProbABEL/examples/test.map
pkg/ProbABEL/examples/test.mldose
pkg/ProbABEL/examples/test.mlinfo
pkg/ProbABEL/examples/test.mlprob
pkg/ProbABEL/examples/test.prob.fvd
pkg/ProbABEL/examples/test.prob.fvi
pkg/ProbABEL/tests/
Modified:
pkg/ProbABEL/Makefile.am
pkg/ProbABEL/checks/R-tests/Makefile.am
pkg/ProbABEL/checks/R-tests/initial_checks.R
pkg/ProbABEL/checks/R-tests/run_models_in_R_pacox.R
pkg/ProbABEL/checks/R-tests/run_models_in_R_palinear.R
pkg/ProbABEL/checks/R-tests/run_models_in_R_palogist.R
pkg/ProbABEL/configure.ac
pkg/ProbABEL/examples/Makefile.am
Log:
Since the ProbABEL examples have morphed to be tests instead of examples, this moves them to a checks directory. There are still a few leftovers in the examples directory. Once these have been cleaned up we can put some real examples back in the examples directory.
Modified: pkg/ProbABEL/Makefile.am
===================================================================
--- pkg/ProbABEL/Makefile.am 2013-08-22 17:20:26 UTC (rev 1300)
+++ pkg/ProbABEL/Makefile.am 2013-08-23 16:40:22 UTC (rev 1301)
@@ -1,4 +1,4 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src doc examples tests
+SUBDIRS = src doc checks examples
Property changes on: pkg/ProbABEL/checks
___________________________________________________________________
Added: svn:ignore
+ Makefile
Makefile.in
Copied: pkg/ProbABEL/checks/Makefile.am (from rev 1300, pkg/ProbABEL/tests/Makefile.am)
===================================================================
--- pkg/ProbABEL/checks/Makefile.am (rev 0)
+++ pkg/ProbABEL/checks/Makefile.am 2013-08-23 16:40:22 UTC (rev 1301)
@@ -0,0 +1,153 @@
+## Process this file with automake to produce Makefile.in
+
+AUTOMAKE_OPTIONS = foreign color-tests
+
+verified_results_dir = verified_results
+
+verified_results = $(verified_results_dir)/height_add.out.txt \
+ $(verified_results_dir)/height_ngp2_add.out.txt \
+ $(verified_results_dir)/height_ngp2_2df.out.txt \
+ $(verified_results_dir)/height_ngp2_domin.out.txt \
+ $(verified_results_dir)/height_ngp2_over_domin.out.txt \
+ $(verified_results_dir)/height_ngp2_recess.out.txt \
+ $(verified_results_dir)/height_base_add.out.txt
+
+input_files_dir = inputfiles
+
+phenofiles = $(input_files_dir)/height.txt \
+ $(input_files_dir)/logist_data.txt \
+ $(input_files_dir)/coxph_data.txt \
+ $(input_files_dir)/mmscore_pheno.PHE
+
+genofiles = $(input_files_dir)/test.mldose \
+ $(input_files_dir)/test.mlprob \
+ $(input_files_dir)/test.mlinfo \
+ $(input_files_dir)/test.map \
+ $(input_files_dir)/test.dose.fvi \
+ $(input_files_dir)/test.dose.fvd \
+ $(input_files_dir)/test.prob.fvi \
+ $(input_files_dir)/test.prob.fvd \
+ $(input_files_dir)/mmscore_gen.mlinfo \
+ $(input_files_dir)/mmscore_gen.mldose \
+ $(input_files_dir)/mmscore_gen.mlprob \
+ $(input_files_dir)/mmscore_gen.dose.fvi \
+ $(input_files_dir)/mmscore_gen.dose.fvd \
+ $(input_files_dir)/mmscore_gen.prob.fvi \
+ $(input_files_dir)/mmscore_gen.prob.fvd \
+ $(input_files_dir)/mmscore_InvSigma_aj.sex.age.dat
+
+input_files = $(phenofiles) $(genofiles) run_diff.sh test_all.sh
+
+check_SCRIPTS =
+
+
+TESTS_ENVIRONMENT = bash
+if BUILD_palinear
+check_SCRIPTS += check_probabel.pl_chunk.sh check_dose_input.sh
+check_SCRIPTS += test_qt.sh test_mms.sh
+endif
+if BUILD_palogist
+check_SCRIPTS += test_bt.sh
+endif
+if BUILD_pacoxph
+check_SCRIPTS += test_cox.sh
+endif
+
+
+
+TESTS = $(check_SCRIPTS)
+
+testsdir = $(pkgdatadir)/tests
+dist_tests_DATA = $(verified_results) $(input_files)
+dist_tests_SCRIPTS = $(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 = height_base_add.out.txt height_base_fv_add.out.txt \
+height_allcov_add.out.txt height_allcov_fv_add.out.txt \
+height_int1_add.out.txt height_int1_fv_add.out.txt \
+height_robust_add.out.txt height_robust_fv_add.out.txt \
+height_robust_int1_add.out.txt height_robust_int1_fv_add.out.txt \
+height_ngp2_add.out.txt height_ngp2_fv_add.out.txt \
+height_ngp2_domin.out.txt height_ngp2_fv_domin.out.txt \
+height_ngp2_over_domin.out.txt height_ngp2_fv_over_domin.out.txt \
+height_ngp2_recess.out.txt height_ngp2_fv_recess.out.txt \
+height_ngp2_2df.out.txt height_ngp2_fv_2df.out.txt \
+height_ngp2_allcov_add.out.txt height_ngp2_allcov_fv_add.out.txt \
+height_ngp2_allcov_domin.out.txt height_ngp2_allcov_fv_domin.out.txt \
+height_ngp2_allcov_over_domin.out.txt \
+height_ngp2_allcov_fv_over_domin.out.txt \
+height_ngp2_allcov_recess.out.txt height_ngp2_allcov_fv_recess.out.txt \
+height_ngp2_allcov_recess.out.txt height_ngp2_allcov_fv_recess.out.txt \
+height_ngp2_int1_add.out.txt height_ngp2_int1_fv_add.out.txt \
+height_ngp2_int1_domin.out.txt height_ngp2_int1_fv_domin.out.txt \
+height_ngp2_int1_over_domin.out.txt \
+height_ngp2_int1_fv_over_domin.out.txt height_ngp2_int1_recess.out.txt \
+height_ngp2_int1_fv_recess.out.txt height_ngp2_int1_2df.out.txt \
+height_ngp2_int1_fv_2df.out.txt height_ngp2_robust_add.out.txt \
+height_ngp2_robust_fv_add.out.txt height_ngp2_robust_domin.out.txt \
+height_ngp2_robust_fv_domin.out.txt \
+height_ngp2_robust_over_domin.out.txt \
+height_ngp2_robust_fv_over_domin.out.txt \
+height_ngp2_robust_recess.out.txt height_ngp2_robust_fv_recess.out.txt \
+height_ngp2_robust_2df.out.txt height_ngp2_robust_fv_2df.out.txt \
+height_ngp2_robust_int1_add.out.txt \
+height_ngp2_robust_int1_fv_add.out.txt \
+height_ngp2_robust_int1_domin.out.txt \
+height_ngp2_robust_int1_fv_domin.out.txt \
+height_ngp2_robust_int1_over_domin.out.txt \
+height_ngp2_robust_int1_fv_over_domin.out.txt \
+height_ngp2_robust_int1_recess.out.txt \
+height_ngp2_robust_int1_fv_recess.out.txt \
+height_ngp2_robust_int1_2df.out.txt \
+height_ngp2_robust_int1_fv_2df.out.txt \
+height_ngp2_allcov_fv_2df.out.txt height_ngp2_robust_fv_add.out.txt \
+height_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
+
+
+dose_files = chr1.chunk1.dose chr1.chunk2.dose chr2.chunk1.dose \
+ chr2.chunk2.dose chr1.dose chr2.dose
+
+prob_files = $(dose_files:.dose=.prob)
+map_files = $(dose_files:.dose=.map)
+info_files = $(dose_files:.dose=.info)
+
+output_files = height_add.out.txt height_2df.out.txt \
+ height_domin.out.txt height_over_domin.out.txt height_recess.out.txt \
+ height_ngp2_recess.out.txt height_ngp2_domin.out.txt \
+ 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
+
+cleanfiles_probabel_check = height.PHE $(dose_files) $(prob_files) \
+ $(map_files) $(info_files) $(output_files) $(other_files)
+
+cleanfiles_dose_check = test.mldose
+
+CLEANFILES = $(cleanfiles_probabel_check) $(cleanfiles_dose_check) \
+ $(cleanfiles_bt) $(cleanfiles_qt) $(cleanfiles_mms) $(cleanfiles_cox)
Modified: pkg/ProbABEL/checks/R-tests/Makefile.am
===================================================================
--- pkg/ProbABEL/tests/R-tests/Makefile.am 2013-08-22 17:20:26 UTC (rev 1300)
+++ pkg/ProbABEL/checks/R-tests/Makefile.am 2013-08-23 16:40:22 UTC (rev 1301)
@@ -2,10 +2,7 @@
AUTOMAKE_OPTIONS = foreign color-tests
-R_test_files = run_R_test_palinear.sh \
- run_R_test_palogist.sh \
- run_R_test_pacox.sh \
- run_models_in_R_palinear.R \
+R_test_files = run_models_in_R_palinear.R \
run_models_in_R_palogist.R \
run_models_in_R_pacox.R \
initial_checks.R
@@ -25,10 +22,10 @@
endif
-testsdir = $(pkgdatadir)/tests/R-tests
-dist_tests_DATA = $(R_test_files)
+testsdir = $(pkgdatadir)/checks/R-tests
+dist_tests_DATA = $(R_test_files) $(check_SCRIPTS)
+#dist_tests_SCRIPTS = $(check_SCRIPTS)
-
TESTS_ENVIRONMENT = bash
Modified: pkg/ProbABEL/checks/R-tests/initial_checks.R
===================================================================
--- pkg/ProbABEL/tests/R-tests/initial_checks.R 2013-08-22 17:20:26 UTC (rev 1300)
+++ pkg/ProbABEL/checks/R-tests/initial_checks.R 2013-08-23 16:40:22 UTC (rev 1301)
@@ -9,14 +9,15 @@
####
## load the data
####
-example.path <- paste0(srcdir, "../../examples/")
+inputfiles.path <- paste0(srcdir, "../inputfiles/")
+tests.path <- paste0(srcdir, "../")
## load phenotypic data
-pheno <- read.table(paste0(example.path, pheno.file),
+pheno <- read.table(paste0(inputfiles.path, pheno.file),
head=TRUE, string=FALSE)
## load genetic DOSE data
-dose <- read.table(paste0(example.path, "test.mldose"),
+dose <- read.table(paste0(inputfiles.path, "test.mldose"),
head=FALSE, string=FALSE)
## remove "1->" from the names of dose-IDs
idNames <- dose[, 1]
@@ -27,7 +28,7 @@
cat("OK\n")
## load genetic PROB data
-prob <- read.table(paste0(example.path, "test.mlprob"),
+prob <- read.table(paste0(inputfiles.path, "test.mlprob"),
head=FALSE, string=FALSE)
## remove "1->" from the names of prob-IDs
idNames <- prob[, 1]
Modified: pkg/ProbABEL/checks/R-tests/run_models_in_R_pacox.R
===================================================================
--- pkg/ProbABEL/tests/R-tests/run_models_in_R_pacox.R 2013-08-22 17:20:26 UTC (rev 1300)
+++ pkg/ProbABEL/checks/R-tests/run_models_in_R_pacox.R 2013-08-23 16:40:22 UTC (rev 1301)
@@ -16,41 +16,41 @@
## Run ProbABEL to get the output data we want to compare/verify
####
cat("Running ProbABEL...\t\t\t\t")
-tmp <- system(paste0("cd ", example.path, "; bash example_cox.sh; cd -"),
+tmp <- system(paste0("cd ", tests.path, "; bash test_cox.sh; cd -"),
intern=TRUE)
cat("OK\n")
resPaAddDose <- read.table(
- paste0(example.path, "coxph_dose_add.out.txt"),
+ paste0(tests.path, "coxph_dose_add.out.txt"),
head=TRUE)[,
c("beta_SNP_add",
"sebeta_SNP_add",
"chi2_SNP")]
resPaAddProb <- read.table(
- paste0(example.path, "coxph_prob_add.out.txt"),
+ paste0(tests.path, "coxph_prob_add.out.txt"),
head=TRUE)[, c("beta_SNP_addA1",
"sebeta_SNP_addA1",
"chi2_SNP_A1")]
resPaDom <- read.table(
- paste0(example.path, "coxph_prob_domin.out.txt"),
+ paste0(tests.path, "coxph_prob_domin.out.txt"),
head=TRUE)[,
c("beta_SNP_domA1",
"sebeta_SNP_domA1",
"chi2_SNP_domA1")]
resPaRec <- read.table(
- paste0(example.path, "coxph_prob_recess.out.txt"),
+ paste0(tests.path, "coxph_prob_recess.out.txt"),
head=TRUE)[,
c("beta_SNP_recA1",
"sebeta_SNP_recA1",
"chi2_SNP_recA1")]
resPaOdom <- read.table(
- paste0(example.path, "coxph_prob_over_domin.out.txt"),
+ paste0(tests.path, "coxph_prob_over_domin.out.txt"),
head=TRUE)[,
c("beta_SNP_odomA1",
"sebeta_SNP_odomA1",
"chi2_SNP_odomA1")]
resPa2df <- read.table(
- paste0(example.path, "coxph_prob_2df.out.txt"),
+ paste0(tests.path, "coxph_prob_2df.out.txt"),
head=TRUE)[,
c("beta_SNP_A1A2",
"sebeta_SNP_A1A2",
Modified: pkg/ProbABEL/checks/R-tests/run_models_in_R_palinear.R
===================================================================
--- pkg/ProbABEL/tests/R-tests/run_models_in_R_palinear.R 2013-08-22 17:20:26 UTC (rev 1300)
+++ pkg/ProbABEL/checks/R-tests/run_models_in_R_palinear.R 2013-08-23 16:40:22 UTC (rev 1301)
@@ -15,41 +15,41 @@
## Run ProbABEL to get the output data we want to compare/verify
####
cat("Running ProbABEL...\t\t\t\t")
-tmp <- system(paste0("cd ", example.path, "; bash example_qt.sh; cd -"),
+tmp <- system(paste0("cd ", tests.path, "; bash test_qt.sh; cd -"),
intern=TRUE)
cat("OK\n")
resPaAddDose <- read.table(
- paste0(example.path, "height_base_add.out.txt"),
+ paste0(tests.path, "height_base_add.out.txt"),
head=TRUE)[,
c("beta_SNP_add",
"sebeta_SNP_add",
"chi2_SNP")]
resPaAddProb <- read.table(
- paste0(example.path, "height_ngp2_add.out.txt"),
+ paste0(tests.path, "height_ngp2_add.out.txt"),
head=TRUE)[, c("beta_SNP_addA1",
"sebeta_SNP_addA1",
"chi2_SNP_A1")]
resPaDom <- read.table(
- paste0(example.path, "height_ngp2_domin.out.txt"),
+ paste0(tests.path, "height_ngp2_domin.out.txt"),
head=TRUE)[,
c("beta_SNP_domA1",
"sebeta_SNP_domA1",
"chi2_SNP_domA1")]
resPaRec <- read.table(
- paste0(example.path, "height_ngp2_recess.out.txt"),
+ paste0(tests.path, "height_ngp2_recess.out.txt"),
head=TRUE)[,
c("beta_SNP_recA1",
"sebeta_SNP_recA1",
"chi2_SNP_recA1")]
resPaOdom <- read.table(
- paste0(example.path, "height_ngp2_over_domin.out.txt"),
+ paste0(tests.path, "height_ngp2_over_domin.out.txt"),
head=TRUE)[,
c("beta_SNP_odomA1",
"sebeta_SNP_odomA1",
"chi2_SNP_odomA1")]
resPa2df <- read.table(
- paste0(example.path, "height_ngp2_2df.out.txt"),
+ paste0(tests.path, "height_ngp2_2df.out.txt"),
head=TRUE)[,
c("beta_SNP_A1A2",
"sebeta_SNP_A1A2",
Modified: pkg/ProbABEL/checks/R-tests/run_models_in_R_palogist.R
===================================================================
--- pkg/ProbABEL/tests/R-tests/run_models_in_R_palogist.R 2013-08-22 17:20:26 UTC (rev 1300)
+++ pkg/ProbABEL/checks/R-tests/run_models_in_R_palogist.R 2013-08-23 16:40:22 UTC (rev 1301)
@@ -16,41 +16,41 @@
## Run ProbABEL to get the output data we want to compare/verify
####
cat("Running ProbABEL...\t\t\t\t")
-tmp <- system(paste0("cd ", example.path, "; bash example_bt.sh; cd -"),
+tmp <- system(paste0("cd ", tests.path, "; bash test_bt.sh; cd -"),
intern=TRUE)
cat("OK\n")
resPaAddDose <- read.table(
- paste0(example.path, "logist_add.out.txt"),
+ paste0(tests.path, "logist_add.out.txt"),
head=TRUE)[,
c("beta_SNP_add",
"sebeta_SNP_add",
"chi2_SNP")]
resPaAddProb <- read.table(
- paste0(example.path, "logist_prob_add.out.txt"),
+ paste0(tests.path, "logist_prob_add.out.txt"),
head=TRUE)[, c("beta_SNP_addA1",
"sebeta_SNP_addA1",
"chi2_SNP_A1")]
resPaDom <- read.table(
- paste0(example.path, "logist_prob_domin.out.txt"),
+ paste0(tests.path, "logist_prob_domin.out.txt"),
head=TRUE)[,
c("beta_SNP_domA1",
"sebeta_SNP_domA1",
"chi2_SNP_domA1")]
resPaRec <- read.table(
- paste0(example.path, "logist_prob_recess.out.txt"),
+ paste0(tests.path, "logist_prob_recess.out.txt"),
head=TRUE)[,
c("beta_SNP_recA1",
"sebeta_SNP_recA1",
"chi2_SNP_recA1")]
resPaOdom <- read.table(
- paste0(example.path, "logist_prob_over_domin.out.txt"),
+ paste0(tests.path, "logist_prob_over_domin.out.txt"),
head=TRUE)[,
c("beta_SNP_odomA1",
"sebeta_SNP_odomA1",
"chi2_SNP_odomA1")]
resPa2df <- read.table(
- paste0(example.path, "logist_prob_2df.out.txt"),
+ paste0(tests.path, "logist_prob_2df.out.txt"),
head=TRUE)[,
c("beta_SNP_A1A2",
"sebeta_SNP_A1A2",
Copied: pkg/ProbABEL/checks/check_dose_input.sh (from rev 1300, pkg/ProbABEL/tests/check_dose_input.sh)
===================================================================
--- pkg/ProbABEL/checks/check_dose_input.sh (rev 0)
+++ pkg/ProbABEL/checks/check_dose_input.sh 2013-08-23 16:40:22 UTC (rev 1301)
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# This script tests whether dose data without a MaCH/minimac-style
+# arrow is read correctly by palinear (and by palogist, since reading
+# genetic data is done using the same code).
+
+echo "Checking palinear with dose data without '->'"
+# Exit with error when one of the steps in the script fails
+set -e
+
+if [ -z ${srcdir} ]; then
+ srcdir="."
+fi
+inputdir="${srcdir}/inputfiles/"
+results="${srcdir}/verified_results/"
+outfile="height_base_add.out.txt"
+
+sed 's/^[[:digit:]]*->//' $inputdir/test.mldose > test.mldose
+
+
+../src/palinear \
+ -p ${inputdir}/height.txt \
+ -d test.mldose \
+ -i ${inputdir}/test.mlinfo \
+ -m ${inputdir}/test.map \
+ -c 19 \
+ -o height_base > /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
Copied: pkg/ProbABEL/checks/check_probabel.pl_chunk.sh (from rev 1300, pkg/ProbABEL/tests/check_probabel.pl_chunk.sh)
===================================================================
--- pkg/ProbABEL/checks/check_probabel.pl_chunk.sh (rev 0)
+++ pkg/ProbABEL/checks/check_probabel.pl_chunk.sh 2013-08-23 16:40:22 UTC (rev 1301)
@@ -0,0 +1,152 @@
+#!/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: pkg/ProbABEL/checks/inputfiles/coxph_data.txt (from rev 1300, pkg/ProbABEL/examples/coxph_data.txt)
===================================================================
--- pkg/ProbABEL/checks/inputfiles/coxph_data.txt (rev 0)
+++ pkg/ProbABEL/checks/inputfiles/coxph_data.txt 2013-08-23 16:40:22 UTC (rev 1301)
@@ -0,0 +1,201 @@
+id fupt_chd chd sex age othercov
+id636728 3.187930645 0 0 56.56648772 -0.61664922
+id890314 2.099691952 0 0 74.83119715 0.695315865
+id102874 9.133488079 1 1 45.24780518 -0.919192365
+id200949 7.525406804 0 0 46.73626511 -0.623212537
+id336491 6.798229522 0 1 61.27433188 -0.083574435
+id988766 6.149545358 0 1 43.97949245 -0.360419163
+id21999 1.013546103 1 0 64.84209419 -0.180940347
+id433893 1.282853098 0 1 49.25264441 0.126374732
+id688932 8.340206657 0 0 50.39544176 1.06437576
+id394203 3.392345681 1 1 71.64985029 -1.182264985
+id995678 9.587748608 0 0 8.398698382 -0.440232098
+id694339 1.25827049 0 0 50.09983553 -0.913499416
+id256455 5.414840139 0 0 42.68207853 -0.162365026
+id14836 6.177914833 1 1 35.84982537 0.149157063
+id817128 2.940033056 1 1 75.1778848 0.675429226
+id803325 9.619267566 0 0 28.61686675 -1.315061617
+id521287 0.320487323 1 1 51.20354955 1.778334153
+id701472 7.101945547 0 1 71.31774815 -0.314768649
+id850010 6.780876558 1 1 54.17089131 0.975698727
+id268483 7.903947419 0 1 64.67225478 -0.064047105
+id738781 1.086018804 0 0 55.82666815 -1.098353458
+id28411 1.254350142 1 0 55.23446835 -0.984911296
+id541635 9.057035035 1 1 60.09431049 -0.749064941
+id751101 1.303018406 0 0 56.07175009 1.517225868
+id826300 6.735484141 1 1 63.66504025 0.050258809
+id884387 9.097303962 0 0 51.49224163 -0.337897966
+id492414 4.756845946 0 0 58.90861602 0.318430413
+id268871 4.018189958 0 0 47.04004888 1.456136311
+id627354 8.874035732 0 0 34.53902661 -1.704446804
+id503932 0.091310535 0 0 57.97305684 0.765871754
+id163442 3.240808272 0 0 36.95176985 0.583651461
+id317797 9.050109718 0 0 26.91605573 -0.738359283
+id687857 7.992764162 0 0 55.98526811 -0.92303971
+id871570 2.353719529 0 1 55.97214144 0.862168022
+id724067 1.617985994 1 1 56.16962211 -0.340689098
+id874076 3.099430273 0 1 59.6796615 -0.585406451
+id927863 3.64738684 0 0 66.58040185 -0.109081372
+id369805 0.973580503 0 0 40.90600185 -1.592199675
+id668376 0.567035975 0 1 70.0289032 -1.377198946
+id717362 6.77104712 1 1 43.29380008 -1.247049307
+id665504 8.956792361 0 1 48.18902184 -0.403151482
+id336637 7.196501733 0 0 46.38184549 0.748159201
+id60633 5.086557706 0 0 23.30351479 -1.053958731
+id848600 8.270336349 1 1 67.46842732 -0.787160472
+id169514 9.421256192 0 0 69.14850279 -0.067323962
+id690732 9.952887485 0 0 58.60119974 0.70281019
+id684760 3.361963101 0 0 35.01819588 0.480066432
+id553502 5.557606017 1 1 69.02154551 -0.048946478
+id214917 6.535326783 0 0 64.57921366 0.674035037
+id849169 7.903922417 1 1 85.13788975 -1.490951619
+id941921 2.305853849 0 0 53.93061678 -0.527425267
+id784646 3.120883065 1 1 61.07773845 0.753698501
+id520954 8.756848347 1 1 75.18776222 0.657838317
+id996355 7.326814334 0 1 68.46424937 0.01877424
+id96730 6.664821662 0 0 57.11963725 1.82995714
+id673442 3.081616083 0 1 65.36648075 0.388257821
+id68305 3.525197877 1 1 71.49266177 0.693170774
+id653025 7.231586593 0 0 70.38446147 -1.049563634
+id208543 4.622250109 0 0 42.72731305 1.944598197
+id335725 5.924295793 1 1 59.07501676 -0.704001509
+id980400 2.35961827 0 0 49.57427645 0.326888204
+id869939 0.736202662 0 0 51.23048818 -0.692132702
+id297563 6.641749611 0 0 58.77625334 -1.463874347
+id852663 5.124175591 0 1 73.64350795 0.264913757
+id162070 7.910906314 0 0 58.53952137 -0.407761026
+id272875 9.825455416 1 1 49.58760449 -0.021488334
+id163787 2.471002157 0 0 68.89089799 0.337573959
+id422204 2.915218179 0 0 58.28230991 0.154530631
+id120197 3.367355865 0 0 48.35873939 0.265014737
+id33660 4.407010904 1 1 34.56964559 -0.60471311
+id803855 8.755961077 0 0 48.4657306 -2.780806865
+id255048 7.749378138 0 0 35.65335784 -1.677944311
+id690936 7.543593942 0 0 65.16588832 0.156852373
+id126807 0.251036587 0 1 64.14491359 1.611910965
+id99016 6.491002725 0 0 83.12867651 -1.11934754
+id883847 1.088929613 0 0 32.87683139 1.34130244
+id354523 9.618060855 1 1 56.55761125 0.270839152
+id737255 4.133744506 1 1 63.15486373 0.196647531
+id990941 5.646270286 0 1 51.27571506 -1.026606104
+id25464 8.272429793 0 0 65.87092242 -0.01260022
+id918375 0.723567779 0 0 72.03830977 -0.957166164
+id537828 4.0147246 0 1 47.95536826 0.058331817
+id682778 9.130628394 0 1 30.7120816 -0.912082258
+id587547 7.44191196 0 0 21.78560627 -0.834787422
+id670874 4.512303089 0 0 79.512448 0.21142704
+id444459 8.723388559 0 0 24.92599405 0.076058464
+id777456 4.115325335 1 1 49.26588181 -1.346748454
+id452384 2.067203142 0 1 55.67012814 -1.425079358
+id826975 8.348432332 0 0 65.40756831 1.36872787
+id519567 6.785076383 0 0 43.0203775 -0.446585446
+id84292 7.634117891 0 0 53.82871397 -0.499295706
+id124432 5.099839207 1 1 56.29638 -0.107080192
+id800145 8.551368147 0 0 37.61331158 1.588466893
+id153857 3.556301609 0 0 22.40008844 1.034357361
+id587157 8.758929135 1 0 52.68038782 0.359925837
+id506262 6.238330685 1 1 64.6329004 1.533370783
+id634462 0.905623161 0 0 48.92290318 -0.350929199
+id687592 0.290071515 0 0 52.49986348 -0.076496734
+id955526 1.838730964 0 0 55.50289717 0.960896716
+id181850 0.144560173 1 1 36.985872 0.446563113
+id159506 6.045008786 1 1 74.44795352 0.189484766
+id609051 6.873427527 1 1 65.77800431 -0.970684546
+id963886 0.853758289 0 0 49.53098132 -0.142315317
+id405792 3.909860553 1 1 45.49262346 0.829045752
+id494172 7.480072965 0 1 76.85791854 0.316447087
+id964637 3.816858446 0 0 45.86472878 0.835064702
+id799355 1.226117869 1 1 44.80572519 0.621012074
+id157111 4.166491482 1 0 62.03415458 0.73942218
+id114524 8.645968152 0 0 58.04499469 -0.788319625
+id954931 0.158490245 0 0 68.17803378 0.24955587
+id827034 0.702377072 0 1 77.97595754 0.982511494
+id689645 2.0658374 0 0 65.08441243 0.631945706
+id281585 4.640052191 1 1 42.95649827 -1.914229131
+id885624 3.615978697 0 0 47.94643735 -1.040361995
+id577871 2.230068497 0 0 33.49614447 0.186792844
+id238796 5.161400753 0 1 65.11885588 -1.680225999
+id481035 7.693009686 0 0 54.90423144 0.456361082
+id972713 6.34411768 1 1 65.77146215 -1.56740652
+id905484 4.55801149 0 1 71.64264756 -0.119411982
+id713511 6.721560405 1 1 61.07996274 0.759855863
+id512328 4.431789868 0 0 73.71727581 -1.386889284
+id703534 8.974882244 1 1 72.23683472 -0.236310232
+id409904 4.845419164 0 0 73.99231758 -1.196145554
+id577169 1.384047668 0 0 60.88096407 1.173421654
+id813971 6.785385478 0 0 84.1336254 -0.537161205
+id558483 0.27946972 0 0 47.22470442 1.205383654
+id892784 1.505769901 0 0 67.17447402 1.16829745
+id611178 3.97305697 1 1 37.0445777 -1.133099386
+id192732 7.859877791 0 0 59.33695807 -2.140778416
+id917280 1.39759155 0 0 58.04360792 -0.534198958
+id435876 4.928142177 0 0 84.74305698 -0.689898601
+id980722 0.72730016 1 0 86.01933179 -1.182084131
+id308273 3.466919258 1 1 67.97071165 1.943821736
+id476685 8.925909139 0 0 54.70635894 -0.941828992
+id315883 7.79623385 0 0 73.32239976 0.338196923
+id935945 3.491058239 1 1 52.11810768 1.336771018
+id991781 6.268341084 0 0 54.65314357 0.534529904
+id65199 2.65595714 0 1 49.87811635 0.034379059
+id226233 6.409789501 0 0 42.43817668 -0.071010961
+id860183 7.567894972 0 0 68.84622681 -0.737998085
+id295209 0.983143735 1 1 78.65652745 -0.107026407
+id544964 1.927387219 0 0 60.76270896 1.709977405
+id648663 7.914653713 0 0 75.01901109 -0.496659516
+id710165 9.981244413 0 0 63.98553777 0.201892862
+id392593 7.418579368 0 1 68.29945776 -1.802781379
+id129945 9.344802496 0 0 65.4500187 1.659394491
+id382621 1.828452452 0 0 67.685774 -0.308226365
+id901440 9.496967232 0 0 42.90926699 1.406153843
+id39847 8.962161053 0 0 47.40927402 -1.457910128
+id526460 1.855905599 0 1 37.11596757 0.585429137
+id477473 1.89081994 1 1 49.97724655 0.859328937
+id448194 4.814151059 0 1 45.88643326 2.316588612
+id904184 8.028988991 1 0 72.72579194 -1.446103016
+id747852 3.836260637 1 1 55.07676604 -0.045937532
+id711012 0.341281233 0 1 52.74453257 0.460500113
+id683879 9.297243459 0 0 53.30884634 0.267430174
+id789575 5.098990324 0 0 91.4953003 0.594398849
+id650729 7.941450537 0 0 60.95976566 -0.466440434
+id934302 9.134082902 1 1 50.38866747 -0.273038964
+id555013 8.812444844 1 1 64.16747524 1.900709264
+id82779 7.657743527 0 0 44.69858439 0.389805705
+id771444 6.664855358 1 1 46.55641254 0.769566642
+id821562 5.19036265 0 0 48.10395008 -0.824659658
+id292809 9.909691181 1 1 37.56731882 -0.985460186
+id645690 6.515405399 0 0 53.468881 -0.627722469
+id223901 6.355198262 1 1 42.93323368 0.10243281
+id41320 0.397540162 1 1 42.44110357 -2.147092339
+id96181 3.155308448 1 1 68.94074654 0.608235371
+id147900 4.719584771 0 0 40.88539124 1.844140836
+id702917 7.72554794 0 1 47.49668711 -1.204688707
+id150640 6.511110099 1 1 38.62528192 1.050329822
+id518391 9.626758766 0 1 49.68351553 0.398484046
+id879076 7.61506094 0 0 67.01328156 0.229427772
+id952031 4.87888217 1 1 65.70367124 -1.089108069
+id10055 5.724749579 0 0 62.16837685 1.750147555
+id727213 5.731963291 1 1 71.45678853 -0.429042806
+id41961 6.818411434 0 0 20.08262865 0.470401854
+id257209 9.897638239 1 1 45.85619304 1.048942715
+id995361 3.151184642 0 0 63.05059972 -0.433651964
+id957918 5.30099154 0 0 99.08050609 -1.322437014
+id975370 9.047264812 0 0 57.53802446 0.00732409
+id889896 9.578142144 1 1 59.22640818 1.545908006
+id978164 4.726348119 0 0 77.64204249 0.091141017
+id90359 6.237920077 0 0 37.75315297 -1.284611338
+id307158 5.49680528 0 0 63.09805553 -2.165456982
+id755940 1.683472511 0 1 20.3119087 0.350642962
+id995582 1.486566562 0 0 51.82892731 -0.515896073
+id363965 7.723182293 1 0 71.77219463 0.763895485
+id729124 6.861379688 0 0 71.23766916 -0.736515537
+id871963 1.399526332 1 1 52.94172118 -0.309489611
+id475172 2.745065294 0 0 37.3297063 0.043872807
+id804699 8.378029915 1 1 54.20314757 -0.329259789
+id625843 4.925798265 1 1 42.87948106 -0.082585412
+id595713 3.273883772 0 0 46.40565632 -1.383808366
+id462604 5.541305429 0 1 38.20727564 0.687340331
+id106141 9.529928524 0 1 54.1103592 -1.145673714
+id689349 9.243194854 0 0 69.78707904 -0.490029778
+id639003 6.594759182 1 1 73.84356933 -0.863976195
+id393896 8.69916317 1 1 59.45681813 0.260745271
+id450307 7.291170542 1 1 47.03196269 -0.241913128
Copied: pkg/ProbABEL/checks/inputfiles/height.txt (from rev 1300, pkg/ProbABEL/examples/height.txt)
===================================================================
--- pkg/ProbABEL/checks/inputfiles/height.txt (rev 0)
+++ pkg/ProbABEL/checks/inputfiles/height.txt 2013-08-23 16:40:22 UTC (rev 1301)
@@ -0,0 +1,201 @@
+id height sex age
+id636728 174.429795159687 0 56.5664877162697
+id890314 168.176943059097 0 74.8311971509938
+id102874 178.612190619767 1 45.2478051768211
+id200949 171.770230117638 0 46.7362651142108
+id336491 185.941629656499 1 61.2743318817997
+id988766 173.159286450017 1 43.9794924518567
+id21999 167.478282481124 0 64.842094190157
+id433893 168.33178468379 1 49.2526444099125
+id688932 171.691587811178 0 50.3954417563357
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/genabel -r 1301
More information about the Genabel-commits
mailing list