diff options
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | src/gemma.cpp | 28 | ||||
-rw-r--r-- | src/main.cpp | 7 |
3 files changed, 17 insertions, 20 deletions
@@ -1 +1 @@ -0.97-pre5 +0.97-pre6 diff --git a/src/gemma.cpp b/src/gemma.cpp index 50b13b1..39402b5 100644 --- a/src/gemma.cpp +++ b/src/gemma.cpp @@ -71,20 +71,16 @@ void gemma_gsl_error_handler (const char * reason, exit(22); } +#if defined(OPENBLAS) && !defined(OPENBLAS_LEGACY) +#include <openblas_config.h> +#endif + void GEMMA::PrintHeader(void) { - cout << endl; - cout << "*********************************************************" << endl; - cout << " Genome-wide Efficient Mixed Model Association (GEMMA) " << endl; - cout << " Version " << version << ", " << date - << " " << endl; - cout << " Visit http://www.xzlab.org/software.html For Updates " << endl; - cout << " (C) " << year << " Xiang Zhou " - << endl; - cout << " GNU General Public License " << endl; - cout << " For Help, Type ./gemma -h " << endl; - cout << "*********************************************************" << endl; - cout << endl; + cout << + "GEMMA " << version << " (" << date << ") by Xiang Zhou et al. (C) 2012-" << year << endl; + cout << + " http://www.xzlab.org/software.html, https://github.com/genetics-statistics" << endl; return; } @@ -155,9 +151,6 @@ void GEMMA::PrintLicense(void) { void GEMMA::PrintHelp(size_t option) { if (option == 0) { cout << endl; - cout << " GEMMA version " << version << ", released on " << date << endl; - cout << " implemented by Xiang Zhou" << endl; - cout << endl; cout << " type ./gemma -h [num] for detailed helps" << endl; cout << " options: " << endl; cout << " 1: quick guide" << endl; @@ -767,7 +760,7 @@ void GEMMA::Assign(int argc, char **argv, PARAM &cPar) { str.clear(); str.assign(argv[i]); cPar.file_mbfile = str; - } else if (strcmp(argv[i], "-silence") == 0) { + } else if (strcmp(argv[i], "-silence") == 0 || strcmp(argv[i], "--quiet") == 0) { debug_set_quiet_mode(true); } else if (strcmp(argv[i], "-g") == 0) { if (argv[i + 1] == NULL || argv[i + 1][0] == '-') { @@ -3089,9 +3082,6 @@ void GEMMA::BatchRun(PARAM &cPar) { } #include "Eigen/Dense" -#if defined(OPENBLAS) && !defined(OPENBLAS_LEGACY) -#include <openblas_config.h> -#endif void GEMMA::WriteLog(int argc, char **argv, PARAM &cPar) { string file_str; diff --git a/src/main.cpp b/src/main.cpp index d752a72..706ac35 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,19 +33,23 @@ int main(int argc, char *argv[]) { if (argc <= 1) { cGemma.PrintHeader(); + cGemma.PrintHelp(0); return EXIT_SUCCESS; } if (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'h') { + cGemma.PrintHeader(); cGemma.PrintHelp(0); return EXIT_SUCCESS; } if (argc == 3 && argv[1][0] == '-' && argv[1][1] == 'h') { string str; str.assign(argv[2]); + cGemma.PrintHeader(); cGemma.PrintHelp(atoi(str.c_str())); return EXIT_SUCCESS; } if (argc == 2 && argv[1][0] == '-' && argv[1][1] == 'l') { + cGemma.PrintHeader(); cGemma.PrintLicense(); return EXIT_SUCCESS; } @@ -57,6 +61,9 @@ int main(int argc, char *argv[]) { mkdir((cPar.path_out).c_str(), S_IRWXU | S_IRGRP | S_IROTH); } + if (!is_quiet_mode()) + cGemma.PrintHeader(); + if (cPar.error == true) { return EXIT_FAILURE; } |