[Genabel-commits] r1655 - in branches/ProbABEL-0.50: checks checks/R-tests checks/verified_results doc src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Mar 21 14:42:18 CET 2014
Author: lckarssen
Date: 2014-03-21 14:42:17 +0100 (Fri, 21 Mar 2014)
New Revision: 1655
Modified:
branches/ProbABEL-0.50/checks/R-tests/initial_checks.R
branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_pacox.R
branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R
branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palogist.R
branches/ProbABEL-0.50/checks/run_diff.sh
branches/ProbABEL-0.50/checks/test_bt.sh
branches/ProbABEL-0.50/checks/test_cox.sh
branches/ProbABEL-0.50/checks/test_mms.sh
branches/ProbABEL-0.50/checks/verified_results/height_add.out.txt
branches/ProbABEL-0.50/checks/verified_results/height_base_add.out.txt
branches/ProbABEL-0.50/checks/verified_results/height_ngp2_add.out.txt
branches/ProbABEL-0.50/checks/verified_results/height_ngp2_domin.out.txt
branches/ProbABEL-0.50/checks/verified_results/height_ngp2_over_domin.out.txt
branches/ProbABEL-0.50/checks/verified_results/height_ngp2_recess.out.txt
branches/ProbABEL-0.50/doc/ChangeLog
branches/ProbABEL-0.50/src/main_functions_dump.cpp
Log:
Fix bug #5409 ("The header for dosage-based output is not equal to that of prob-based ProbABEL output").
Adjusted the checks accordingly.
- Currently the test_mms.sh is broken (probably because the mmscore function is under construction by Maarten K.), so that one is not tested (however, given that I made the same changes as in the other test*.sh files, I don't expect trouble).
- The run_diff.sh script is now simpler because we don't need to pass arguments to diff anymore.
- Note that previously, for the additive model the header of the chi^2 column was "chi2_SNP", whereas for the other models it was e.g. "chi2_SNP_dom". For consistency I've change the column name to "chi2_SNP_add"
Modified: branches/ProbABEL-0.50/checks/R-tests/initial_checks.R
===================================================================
--- branches/ProbABEL-0.50/checks/R-tests/initial_checks.R 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/R-tests/initial_checks.R 2014-03-21 13:42:17 UTC (rev 1655)
@@ -65,26 +65,22 @@
## Define column names of the various ProbABEL output file headers
-colsAddDose <- c("Rsq",
- "beta_SNP_add",
- "sebeta_SNP_add",
- "chi2_SNP")
-colsAddProb <- c("Rsq",
- "beta_SNP_addA1",
- "sebeta_SNP_addA1",
- "chi2_SNP_A1")
+colsAdd <- c("Rsq",
+ "beta_SNP_addA1",
+ "sebeta_SNP_addA1",
+ "chi2_SNP_add")
colsDom <- c("Rsq",
"beta_SNP_domA1",
"sebeta_SNP_domA1",
- "chi2_SNP_domA1")
+ "chi2_SNP_dom")
colsRec <- c("Rsq",
"beta_SNP_recA1",
"sebeta_SNP_recA1",
- "chi2_SNP_recA1")
+ "chi2_SNP_rec")
colsOdom <-c("Rsq",
"beta_SNP_odomA1",
"sebeta_SNP_odomA1",
- "chi2_SNP_odomA1")
+ "chi2_SNP_odom")
cols2df <- c("Rsq",
"beta_SNP_A1A2",
"sebeta_SNP_A1A2",
Modified: branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_pacox.R
===================================================================
--- branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_pacox.R 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_pacox.R 2014-03-21 13:42:17 UTC (rev 1655)
@@ -28,9 +28,9 @@
cat("OK\n")
dose.add.PA <- read.table("coxph_dose_add.out.txt",
- head=TRUE)[, colsAddDose]
+ head=TRUE)[, colsAdd]
prob.add.PA <- read.table("coxph_prob_add.out.txt",
- head=TRUE)[, colsAddProb]
+ head=TRUE)[, colsAdd]
prob.dom.PA <- read.table("coxph_prob_domin.out.txt",
head=TRUE)[, colsDom]
prob.rec.PA <- read.table("coxph_prob_recess.out.txt",
@@ -56,7 +56,7 @@
## Additive model, dosages
snpdose <- "dose[, i]"
dose.add.R <- run.model(model.fn.0, model.fn, snpdose)
-colnames(dose.add.R) <- colsAddDose
+colnames(dose.add.R) <- colsAdd
rownames(dose.add.R) <- NULL
stopifnot( all.equal(dose.add.PA, dose.add.R, tol=tol) )
cat("additive ")
@@ -65,7 +65,7 @@
## Additive model, probabilities
snpprob <- "doseFromProb[, i]"
prob.add.R <- run.model(model.fn.0, model.fn, snpprob)
-colnames(prob.add.R) <- colsAddProb
+colnames(prob.add.R) <- colsAdd
rownames(prob.add.R) <- NULL
stopifnot( all.equal(prob.add.PA, prob.add.R, tol=tol) )
cat("additive ")
Modified: branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R
===================================================================
--- branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palinear.R 2014-03-21 13:42:17 UTC (rev 1655)
@@ -20,9 +20,9 @@
cat("OK\n")
dose.add.PA <- read.table("linear_base_add.out.txt",
- head=TRUE)[, colsAddDose]
+ head=TRUE)[, colsAdd]
prob.add.PA <- read.table("linear_ngp2_add.out.txt",
- head=TRUE)[, colsAddProb]
+ head=TRUE)[, colsAdd]
prob.dom.PA <- read.table("linear_ngp2_domin.out.txt",
head=TRUE)[, colsDom]
prob.rec.PA <- read.table("linear_ngp2_recess.out.txt",
@@ -53,7 +53,7 @@
## Additive model, dosages
snpdose <- "dose[, i]"
dose.add.R <- run.model(model.fn.0, model.fn, snpdose)
-colnames(dose.add.R) <- colsAddDose
+colnames(dose.add.R) <- colsAdd
rownames(dose.add.R) <- NULL
stopifnot( all.equal(dose.add.PA, dose.add.R, tol=tol) )
cat("additive ")
@@ -62,7 +62,7 @@
## Additive model, probabilities
snpprob <- "doseFromProb[, i]"
prob.add.R <- run.model(model.fn.0, model.fn, snpprob)
-colnames(prob.add.R) <- colsAddProb
+colnames(prob.add.R) <- colsAdd
rownames(prob.add.R) <- NULL
stopifnot( all.equal(prob.add.PA, prob.add.R, tol=tol) )
cat("additive ")
Modified: branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palogist.R
===================================================================
--- branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palogist.R 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/R-tests/run_models_in_R_palogist.R 2014-03-21 13:42:17 UTC (rev 1655)
@@ -20,9 +20,9 @@
cat("OK\n")
dose.add.PA <- read.table("logist_add.out.txt",
- head=TRUE)[, colsAddDose]
+ head=TRUE)[, colsAdd]
prob.add.PA <- read.table("logist_prob_add.out.txt",
- head=TRUE)[, colsAddProb]
+ head=TRUE)[, colsAdd]
prob.dom.PA <- read.table("logist_prob_domin.out.txt",
head=TRUE)[, colsDom]
prob.rec.PA <- read.table("logist_prob_recess.out.txt",
@@ -52,7 +52,7 @@
## Additive model, dosages
snpdose <- "dose[, i]"
dose.add.R <- run.model(model.fn.0, model.fn, snpdose)
-colnames(dose.add.R) <- colsAddDose
+colnames(dose.add.R) <- colsAdd
rownames(dose.add.R) <- NULL
stopifnot( all.equal(dose.add.PA, dose.add.R, tol=tol) )
cat("additive ")
@@ -60,7 +60,7 @@
## Additive model, probabilities
snpprob <- "doseFromProb[, i]"
prob.add.R <- run.model(model.fn.0, model.fn, snpprob)
-colnames(prob.add.R) <- colsAddProb
+colnames(prob.add.R) <- colsAdd
rownames(prob.add.R) <- NULL
stopifnot( all.equal(prob.add.PA, prob.add.R, tol=tol) )
cat("additive ")
Modified: branches/ProbABEL-0.50/checks/run_diff.sh
===================================================================
--- branches/ProbABEL-0.50/checks/run_diff.sh 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/run_diff.sh 2014-03-21 13:42:17 UTC (rev 1655)
@@ -8,19 +8,18 @@
# $1: first file to compare
# $2: second file to compare
# $3: start message to print on the output line before OK or FAILED
- # $4-: any arguments to pass to the diff command
file1=$1
file2=$2
- name=""
- if [ ${#} -ge 3 ]; then
- name=$3
- shift 3
- args=$@
- fi
+ name=$3
+ # if [ ${#} -ge 3 ]; then
+ # name=$3
+ # shift 3
+ # args=$@
+ # fi
blanks=" "
- if diff "$file1" "$file2" $args; then
+ if diff "$file1" "$file2"; then
echo -e "${name}${blanks:${#name}} OK"
else
echo -e "${name}${blanks:${#name}} FAILED"
Modified: branches/ProbABEL-0.50/checks/test_bt.sh
===================================================================
--- branches/ProbABEL-0.50/checks/test_bt.sh 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/test_bt.sh 2014-03-21 13:42:17 UTC (rev 1655)
@@ -78,10 +78,8 @@
run_diff logist_prob_add.out.txt \
logist_add.out.txt \
- "BT check: prob vs. dose" \
- -I beta_SNP
+ "BT check: prob vs. dose"
run_diff logist_prob_fv_add.out.txt \
logist_fv_add.out.txt \
- "BT check: prob_fv vs. dose_fv" \
- -I beta_SNP
+ "BT check: prob_fv vs. dose_fv"
Modified: branches/ProbABEL-0.50/checks/test_cox.sh
===================================================================
--- branches/ProbABEL-0.50/checks/test_cox.sh 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/test_cox.sh 2014-03-21 13:42:17 UTC (rev 1655)
@@ -59,7 +59,7 @@
>& 3
run_diff coxph_dose_add.out.txt coxph_prob_add.out.txt \
- "pacoxph check: dose vs. prob" -I SNP
+ "pacoxph check: dose vs. prob"
$pacoxph \
Modified: branches/ProbABEL-0.50/checks/test_mms.sh
===================================================================
--- branches/ProbABEL-0.50/checks/test_mms.sh 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/test_mms.sh 2014-03-21 13:42:17 UTC (rev 1655)
@@ -77,10 +77,8 @@
run_diff mmscore_prob_add.out.txt \
mmscore_dose_add.out.txt \
- "mmscore check: prob vs. dose" \
- -I SNP
+ "mmscore check: prob vs. dose"
run_diff mmscore_prob_fv_add.out.txt \
mmscore_dose_fv_add.out.txt \
- "mmscore check: prob_fv vs. dose_fv" \
- -I SNP
+ "mmscore check: prob_fv vs. dose_fv"
Modified: branches/ProbABEL-0.50/checks/verified_results/height_add.out.txt
===================================================================
--- branches/ProbABEL-0.50/checks/verified_results/height_add.out.txt 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/verified_results/height_add.out.txt 2014-03-21 13:42:17 UTC (rev 1655)
@@ -1,4 +1,4 @@
-name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_add sebeta_SNP_add chi2_SNP
+name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_addA1 sebeta_SNP_addA1 chi2_SNP_add
rs7247199 GAC A 0.5847 0.415 0.9299 0.8666 182 0.333668 1 204938 20.3847 76.6302 0.0723394
rs8102643 C TGGT 0.5847 0.415 0.9308 0.8685 181 0.808177 1 207859 -25.7632 86.4877 0.0907169
rs8102615 T A 0.5006 0.4702 0.9375 0.8932 182 0.8665 2 211970 -40.7722 102.559 0.161525
Modified: branches/ProbABEL-0.50/checks/verified_results/height_base_add.out.txt
===================================================================
--- branches/ProbABEL-0.50/checks/verified_results/height_base_add.out.txt 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/verified_results/height_base_add.out.txt 2014-03-21 13:42:17 UTC (rev 1655)
@@ -1,4 +1,4 @@
-name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_add sebeta_SNP_add chi2_SNP
+name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_addA1 sebeta_SNP_addA1 chi2_SNP_add
rs7247199 GAC A 0.5847 0.415 0.9299 0.8666 182 0.333668 19 204938 20.3847 76.6302 0.0723394
rs8102643 C TGGT 0.5847 0.415 0.9308 0.8685 181 0.808177 19 207859 -25.7632 86.4877 0.0907169
rs8102615 T A 0.5006 0.4702 0.9375 0.8932 182 0.8665 19 211970 -40.7722 102.559 0.161525
Modified: branches/ProbABEL-0.50/checks/verified_results/height_ngp2_add.out.txt
===================================================================
--- branches/ProbABEL-0.50/checks/verified_results/height_ngp2_add.out.txt 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/verified_results/height_ngp2_add.out.txt 2014-03-21 13:42:17 UTC (rev 1655)
@@ -1,4 +1,4 @@
-name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_addA1 sebeta_SNP_addA1 chi2_SNP_A1
+name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_addA1 sebeta_SNP_addA1 chi2_SNP_add
rs7247199 GAC A 0.5847 0.415 0.9299 0.8666 182 0.333668 1 204938 20.3847 76.6302 0.0723394
rs8102643 C TGGT 0.5847 0.415 0.9308 0.8685 181 0.808177 1 207859 -25.7632 86.4877 0.0907169
rs8102615 T A 0.5006 0.4702 0.9375 0.8932 182 0.8665 2 211970 -40.7722 102.559 0.161525
Modified: branches/ProbABEL-0.50/checks/verified_results/height_ngp2_domin.out.txt
===================================================================
--- branches/ProbABEL-0.50/checks/verified_results/height_ngp2_domin.out.txt 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/verified_results/height_ngp2_domin.out.txt 2014-03-21 13:42:17 UTC (rev 1655)
@@ -1,4 +1,4 @@
-name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_domA1 sebeta_SNP_domA1 chi2_SNP_domA1
+name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_domA1 sebeta_SNP_domA1 chi2_SNP_dom
rs7247199 GAC A 0.5847 0.415 0.9299 0.8666 182 0.333668 1 204938 33.0592 115.333 0.0839902
rs8102643 C TGGT 0.5847 0.415 0.9308 0.8685 181 0.808177 1 207859 -178.139 417.232 0.186313
rs8102615 T A 0.5006 0.4702 0.9375 0.8932 182 0.8665 2 211970 -272.156 640.298 0.18463
Modified: branches/ProbABEL-0.50/checks/verified_results/height_ngp2_over_domin.out.txt
===================================================================
--- branches/ProbABEL-0.50/checks/verified_results/height_ngp2_over_domin.out.txt 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/verified_results/height_ngp2_over_domin.out.txt 2014-03-21 13:42:17 UTC (rev 1655)
@@ -1,4 +1,4 @@
-name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_odomA1 sebeta_SNP_odomA1 chi2_SNP_odomA1
+name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_odomA1 sebeta_SNP_odomA1 chi2_SNP_odom
rs7247199 GAC A 0.5847 0.415 0.9299 0.8666 182 0.333668 1 204938 80.0802 231.105 0.122726
rs8102643 C TGGT 0.5847 0.415 0.9308 0.8685 181 0.808177 1 207859 28.4969 142.757 0.0407436
rs8102615 T A 0.5006 0.4702 0.9375 0.8932 182 0.8665 2 211970 51.4168 142.042 0.133927
Modified: branches/ProbABEL-0.50/checks/verified_results/height_ngp2_recess.out.txt
===================================================================
--- branches/ProbABEL-0.50/checks/verified_results/height_ngp2_recess.out.txt 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/checks/verified_results/height_ngp2_recess.out.txt 2014-03-21 13:42:17 UTC (rev 1655)
@@ -1,4 +1,4 @@
-name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_recA1 sebeta_SNP_recA1 chi2_SNP_recA1
+name A1 A2 Freq1 MAF Quality Rsq n Mean_predictor_allele chrom position beta_SNP_recA1 sebeta_SNP_recA1 chi2_SNP_rec
rs7247199 GAC A 0.5847 0.415 0.9299 0.8666 182 0.333668 1 204938 51.0131 227.445 0.051428
rs8102643 C TGGT 0.5847 0.415 0.9308 0.8685 181 0.808177 1 207859 -28.2737 108.063 0.0699893
rs8102615 T A 0.5006 0.4702 0.9375 0.8932 182 0.8665 2 211970 -45.9705 119.627 0.15093
Modified: branches/ProbABEL-0.50/doc/ChangeLog
===================================================================
--- branches/ProbABEL-0.50/doc/ChangeLog 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/doc/ChangeLog 2014-03-21 13:42:17 UTC (rev 1655)
@@ -1,7 +1,14 @@
-***** v.0.4.3
+***** v.0.5.0 ()
+* Fixed bug #5409: "The header for dosage-based output is not equal to
+ that of prob-based ProbABEL output.". As a result the headers of the
+ output files are now slightly different. This may break user pipelines!
+
+
+***** v.0.4.3 ()
* Speed up of a factor of X after simplifying the way filevector data is
read in.
+
***** v.0.4.2
* The 'probabel.pl' script is now simply renamed to 'probabel' (a user
shouldn't care what scripting language we use). For at least several
Modified: branches/ProbABEL-0.50/src/main_functions_dump.cpp
===================================================================
--- branches/ProbABEL-0.50/src/main_functions_dump.cpp 2014-03-19 23:12:02 UTC (rev 1654)
+++ branches/ProbABEL-0.50/src/main_functions_dump.cpp 2014-03-21 13:42:17 UTC (rev 1655)
@@ -231,9 +231,9 @@
if (input_var.getNgpreds() == 1) // dose data: only additive model
{
*outfile[0] << input_var.getSep()
- << "beta_SNP_add"
+ << "beta_SNP_addA1"
<< input_var.getSep()
- << "sebeta_SNP_add";
+ << "sebeta_SNP_addA1";
if (input_var.getInteraction() != 0)
{
@@ -257,7 +257,7 @@
}
#endif
}
- *outfile[0] << input_var.getSep() << "chi2_SNP";
+ *outfile[0] << input_var.getSep() << "chi2_SNP_add";
*outfile[0] << "\n";
} // ngpreds == 1
else if (input_var.getNgpreds() == 2) // prob data: all models
@@ -336,10 +336,10 @@
}
}
*outfile[0] << input_var.getSep() << "chi2_SNP_2df\n";
- *outfile[1] << input_var.getSep() << "chi2_SNP_A1\n";
- *outfile[2] << input_var.getSep() << "chi2_SNP_domA1\n";
- *outfile[3] << input_var.getSep() << "chi2_SNP_recA1\n";
- *outfile[4] << input_var.getSep() << "chi2_SNP_odomA1\n";
+ *outfile[1] << input_var.getSep() << "chi2_SNP_add\n";
+ *outfile[2] << input_var.getSep() << "chi2_SNP_dom\n";
+ *outfile[3] << input_var.getSep() << "chi2_SNP_rec\n";
+ *outfile[4] << input_var.getSep() << "chi2_SNP_odom\n";
} // End: ngpreds == 2
else
{
More information about the Genabel-commits
mailing list