aboutsummaryrefslogtreecommitdiff
path: root/src/lm.cpp
diff options
context:
space:
mode:
authorPeter Carbonetto2017-10-09 16:23:05 -0500
committerGitHub2017-10-09 16:23:05 -0500
commitab2a1830659ac970d97c107f145105fb410eb219 (patch)
tree14d3cab14fca4b68eb0916992344b8248a380a61 /src/lm.cpp
parent1e99b37e42edb7981b44f1409cc3e55a47057878 (diff)
parent86323ccaf26ad0a3b706a67a0014dd04b9965823 (diff)
downloadpangemma-ab2a1830659ac970d97c107f145105fb410eb219.tar.gz
Merge pull request #92 from genenetwork/gemma-master
Fixed for a number of outstanding issues.
Diffstat (limited to 'src/lm.cpp')
-rw-r--r--src/lm.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lm.cpp b/src/lm.cpp
index f8fc43d..0c2a2bb 100644
--- a/src/lm.cpp
+++ b/src/lm.cpp
@@ -290,6 +290,7 @@ void LmCalcP(const size_t test_mode, const double yPwy, const double xPwy,
}
void LM::AnalyzeGene(const gsl_matrix *W, const gsl_vector *x) {
+ debug_msg("entering");
ifstream infile(file_gene.c_str(), ifstream::in);
if (!infile) {
cout << "error reading gene expression file:" << file_gene << endl;
@@ -361,7 +362,7 @@ void LM::AnalyzeGene(const gsl_matrix *W, const gsl_vector *x) {
time_opt += (clock() - time_start) / (double(CLOCKS_PER_SEC) * 60.0);
// Store summary data.
- SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score};
+ SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score, -0.0 };
sumStat.push_back(SNPs);
}
cout << endl;
@@ -382,6 +383,7 @@ void LM::AnalyzeGene(const gsl_matrix *W, const gsl_vector *x) {
// WJA added
void LM::Analyzebgen(const gsl_matrix *W, const gsl_vector *y) {
+ debug_msg("entering");
string file_bgen = file_oxford + ".bgen";
ifstream infile(file_bgen.c_str(), ios::binary);
if (!infile) {
@@ -585,7 +587,7 @@ void LM::Analyzebgen(const gsl_matrix *W, const gsl_vector *y) {
time_opt += (clock() - time_start) / (double(CLOCKS_PER_SEC) * 60.0);
// Store summary data.
- SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score};
+ SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score, -0.0};
sumStat.push_back(SNPs);
}
cout << endl;
@@ -606,6 +608,7 @@ void LM::Analyzebgen(const gsl_matrix *W, const gsl_vector *y) {
}
void LM::AnalyzeBimbam(const gsl_matrix *W, const gsl_vector *y) {
+ debug_msg("entering");
igzstream infile(file_geno.c_str(), igzstream::in);
if (!infile) {
cout << "error reading genotype file:" << file_geno << endl;
@@ -699,7 +702,7 @@ void LM::AnalyzeBimbam(const gsl_matrix *W, const gsl_vector *y) {
time_opt += (clock() - time_start) / (double(CLOCKS_PER_SEC) * 60.0);
// Store summary data.
- SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score};
+ SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score, -0.0};
sumStat.push_back(SNPs);
}
cout << endl;
@@ -720,6 +723,7 @@ void LM::AnalyzeBimbam(const gsl_matrix *W, const gsl_vector *y) {
}
void LM::AnalyzePlink(const gsl_matrix *W, const gsl_vector *y) {
+ debug_msg("entering");
string file_bed = file_bfile + ".bed";
ifstream infile(file_bed.c_str(), ios::binary);
if (!infile) {
@@ -840,7 +844,7 @@ void LM::AnalyzePlink(const gsl_matrix *W, const gsl_vector *y) {
p_lrt, p_score);
// store summary data
- SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score};
+ SUMSTAT SNPs = {beta, se, 0.0, 0.0, p_wald, p_lrt, p_score, -0.0};
sumStat.push_back(SNPs);
time_opt += (clock() - time_start) / (double(CLOCKS_PER_SEC) * 60.0);