aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gemma.cpp37
-rw-r--r--src/lmm.cpp2
-rw-r--r--src/param.cpp13
3 files changed, 24 insertions, 28 deletions
diff --git a/src/gemma.cpp b/src/gemma.cpp
index f9a2fc9..2c54672 100644
--- a/src/gemma.cpp
+++ b/src/gemma.cpp
@@ -57,10 +57,11 @@ extern "C" {
#include "varcov.h"
#include "vc.h"
#include "debug.h"
+#include "version.h"
using namespace std;
-GEMMA::GEMMA(void) : version("0.97.3"), date("10/10/2017"), year("2017") {}
+GEMMA::GEMMA(void) : version(GEMMA_VERSION), date(GEMMA_DATE), year(GEMMA_YEAR) {}
void gemma_gsl_error_handler (const char * reason,
const char * file,
@@ -1989,8 +1990,8 @@ void GEMMA::BatchRun(PARAM &cPar) {
vec_weight, vec_z2, cPar.ni_total, cPar.ns_total,
cPar.ns_test);
cout << "## number of total individuals = " << cPar.ni_total << endl;
- cout << "## number of total SNPs = " << cPar.ns_total << endl;
- cout << "## number of analyzed SNPs = " << cPar.ns_test << endl;
+ cout << "## number of total SNPs/var = " << cPar.ns_total << endl;
+ cout << "## number of analyzed SNPs/var = " << cPar.ns_test << endl;
cout << "## number of variance components = " << cPar.n_vc << endl;
cout << "Calculating the q vector ... " << endl;
Calcq(cPar.n_block, vec_cat, vec_ni, vec_weight, vec_z2, Vq, q,
@@ -2119,8 +2120,8 @@ void GEMMA::BatchRun(PARAM &cPar) {
cout << "Study Panel: " << endl;
cout << "## number of total individuals = " << cPar.ni_study << endl;
- cout << "## number of total SNPs = " << cPar.ns_study << endl;
- cout << "## number of analyzed SNPs = " << cPar.ns_test << endl;
+ cout << "## number of total SNPs/var = " << cPar.ns_study << endl;
+ cout << "## number of analyzed SNPs/var = " << cPar.ns_test << endl;
cout << "## number of variance components = " << cPar.n_vc << endl;
// compute q
@@ -3053,7 +3054,7 @@ void GEMMA::BatchRun(PARAM &cPar) {
}
cout << "## number of blocks = " << BF.size() << endl;
- cout << "## number of analyzed SNPs = " << vec_rs.size() << endl;
+ cout << "## number of analyzed SNPs/var = " << vec_rs.size() << endl;
cout << "## grid size for hyperparameters = " << wab.size() << endl;
cout << "## number of continuous annotations = " << kc << endl;
cout << "## number of discrete annotations = " << kd << endl;
@@ -3103,7 +3104,7 @@ void GEMMA::WriteLog(int argc, char **argv, PARAM &cPar) {
}
outfile << "##" << endl;
- outfile << "## GEMMA Version = " << version << endl;
+ outfile << "## GEMMA Version = " << version << " (" << date << ")" << endl;
outfile << "## GSL Version = " << GSL_VERSION << endl;
outfile << "## Eigen Version = " << EIGEN_WORLD_VERSION << "." << EIGEN_MAJOR_VERSION << "." << EIGEN_MINOR_VERSION << endl;
#ifdef OPENBLAS
@@ -3132,7 +3133,6 @@ void GEMMA::WriteLog(int argc, char **argv, PARAM &cPar) {
tm *ptm = localtime(&rawtime);
outfile << "## Date = " << asctime(ptm);
- // ptm->tm_year<<":"<<ptm->tm_month<<":"<<ptm->tm_day":"<<ptm->tm_hour<<":"<<ptm->tm_min<<endl;
outfile << "##" << endl;
outfile << "## Summary Statistics:" << endl;
@@ -3142,11 +3142,6 @@ void GEMMA::WriteLog(int argc, char **argv, PARAM &cPar) {
<< cPar.ni_study << endl;
outfile << "## number of total individuals in the reference = "
<< cPar.ni_ref << endl;
- // outfile<<"## number of total SNPs in the sample = "<<cPar.ns_study<<endl;
- // outfile<<"## number of total SNPs in the reference panel =
- // "<<cPar.ns_ref<<endl;
- // outfile<<"## number of analyzed SNPs = "<<cPar.ns_test<<endl;
- // outfile<<"## number of analyzed SNP pairs = "<<cPar.ns_pair<<endl;
outfile << "## number of variance components = " << cPar.n_vc << endl;
outfile << "## pve estimates = ";
@@ -3196,11 +3191,11 @@ void GEMMA::WriteLog(int argc, char **argv, PARAM &cPar) {
<< cPar.ni_study << endl;
outfile << "## number of total individuals in the reference = "
<< cPar.ni_total << endl;
- outfile << "## number of total SNPs in the sample = " << cPar.ns_study
+ outfile << "## number of total SNPs/var in the sample = " << cPar.ns_study
<< endl;
- outfile << "## number of total SNPs in the reference panel = "
+ outfile << "## number of total SNPs/var in the reference panel = "
<< cPar.ns_total << endl;
- outfile << "## number of analyzed SNPs = " << cPar.ns_test << endl;
+ outfile << "## number of analyzed SNPs/var = " << cPar.ns_test << endl;
outfile << "## number of variance components = " << cPar.n_vc << endl;
} else if (!cPar.file_beta.empty() &&
(cPar.a_mode == 66 || cPar.a_mode == 67)) {
@@ -3208,9 +3203,9 @@ void GEMMA::WriteLog(int argc, char **argv, PARAM &cPar) {
<< cPar.ni_total << endl;
outfile << "## number of total individuals in the reference = "
<< cPar.ni_ref << endl;
- outfile << "## number of total SNPs in the sample = " << cPar.ns_total
+ outfile << "## number of total SNPs/var in the sample = " << cPar.ns_total
<< endl;
- outfile << "## number of analyzed SNPs = " << cPar.ns_test << endl;
+ outfile << "## number of analyzed SNPs/var = " << cPar.ns_test << endl;
outfile << "## number of variance components = " << cPar.n_vc << endl;
outfile << "## pve estimates = ";
@@ -3280,10 +3275,10 @@ void GEMMA::WriteLog(int argc, char **argv, PARAM &cPar) {
outfile << "## number of total genes = " << cPar.ng_total << endl;
outfile << "## number of analyzed genes = " << cPar.ng_test << endl;
} else if (cPar.file_epm.empty()) {
- outfile << "## number of total SNPs = " << cPar.ns_total << endl;
- outfile << "## number of analyzed SNPs = " << cPar.ns_test << endl;
+ outfile << "## number of total SNPs/var = " << cPar.ns_total << endl;
+ outfile << "## number of analyzed SNPs/var = " << cPar.ns_test << endl;
} else {
- outfile << "## number of analyzed SNPs = " << cPar.ns_test << endl;
+ outfile << "## number of analyzed SNPs/var = " << cPar.ns_test << endl;
}
if (cPar.a_mode == 13) {
diff --git a/src/lmm.cpp b/src/lmm.cpp
index ae8b747..6b07b6c 100644
--- a/src/lmm.cpp
+++ b/src/lmm.cpp
@@ -1525,7 +1525,7 @@ void LMM::AnalyzePlink(const gsl_matrix *U, const gsl_vector *eval,
auto ci_total = 0;
auto ci_test = 0;
// ---- for all genotypes
- for (int i = 0; i < n_bit; ++i) {
+ for (uint i = 0; i < n_bit; ++i) {
infile.read(ch, 1);
bset8 = ch[0];
diff --git a/src/param.cpp b/src/param.cpp
index 1a27a53..1f583e2 100644
--- a/src/param.cpp
+++ b/src/param.cpp
@@ -17,6 +17,7 @@
*/
#include <iostream>
+#include <iomanip>
#include <string>
#include <algorithm>
#include <cmath>
@@ -1136,15 +1137,15 @@ void PARAM::CheckData(void) {
cout << "## number of total genes = " << ng_total << endl;
} else if (file_epm.empty() && a_mode != 43 && a_mode != 5) {
if (!loco.empty())
- cout << "## leave one chromosome out (LOCO) = " << loco << endl;
- cout << "## number of total SNPs = " << ns_total << endl;
+ cout << "## leave one chromosome out (LOCO) = " << setw(8) << loco << endl;
+ cout << "## number of total SNPs/var = " << setw(8) << ns_total << endl;
if (setSnps.size())
- cout << "## number of considered SNPS = " << setSnps.size() << endl;
+ cout << "## number of considered SNPS = " << setw(8) << setSnps.size() << endl;
if (setKSnps.size())
- cout << "## number of SNPS for K = " << setKSnps.size() << endl;
+ cout << "## number of SNPS for K = " << setw(8) << setKSnps.size() << endl;
if (setGWASnps.size())
- cout << "## number of SNPS for GWAS = " << setGWASnps.size() << endl;
- cout << "## number of analyzed SNPs = " << ns_test << endl;
+ cout << "## number of SNPS for GWAS = " << setw(8) << setGWASnps.size() << endl;
+ cout << "## number of analyzed SNPs = " << setw(8) << ns_test << endl;
} else {
}
}