Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Commit

Permalink
LMM: skip beta (again) with LRT
Browse files Browse the repository at this point in the history
  • Loading branch information
pjotrp committed Oct 5, 2017
1 parent d672c81 commit 86323cc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions src/lmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ void LMM::WriteFiles() {
}

auto common_header = [&] () {
outfile << "beta" << "\t"
<< "se" << "\t";
if (a_mode != 2)
outfile << "beta" << "\t";

outfile << "se" << "\t";

outfile << "logl_H1" << "\t"; // we may make this an option

Expand All @@ -135,8 +137,12 @@ void LMM::WriteFiles() {
};

auto sumstats = [&] (SUMSTAT st) {
outfile << scientific << setprecision(6) << st.beta << "\t"
<< st.se << "\t";
outfile << scientific << setprecision(6);

if (a_mode != 2)
outfile << st.beta << "\t";

outfile << st.se << "\t";

outfile << st.logl_H1 << "\t";

Expand Down
2 changes: 1 addition & 1 deletion test/dev_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ testBXDLMMLikelihoodRatio() {
assertEquals 0 $?

outfn=output/$outn.assoc.txt
assertEquals "87816" `wc -w < $outfn`
assertEquals "80498" `wc -w < $outfn`
assertEquals "3088458212.93" `perl -nle 'foreach $x (split(/\s+/,$_)) { $sum += sprintf("%.2f",(substr($x,,0,6))) } END { printf "%.2f",$sum }' $outfn`
}

Expand Down
1 change: 1 addition & 0 deletions test/lengthy_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ testPlinkStandardRelatednessMatrixK() {
}

testPlinkMultivariateLinearMixedModelMultiplePhenotypes_Issue58() {
echo "Long running test!"
# This test passes, but takes over 30 minutes to run!
# n=2 is original pheno in fam file
# n=1 is causal1
Expand Down

0 comments on commit 86323cc

Please sign in to comment.