[Genabel-commits] r994 - branches/ProbABEL-refactoring/ProbABEL/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 29 22:14:17 CET 2012
Author: lckarssen
Date: 2012-10-29 22:14:17 +0100 (Mon, 29 Oct 2012)
New Revision: 994
Added:
branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.cpp
branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.h
Removed:
branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.cpp
branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.h
Modified:
branches/ProbABEL-refactoring/ProbABEL/src/Makefile.am
branches/ProbABEL-refactoring/ProbABEL/src/main.cpp
Log:
ProbABEL-refactoring: Renamed comand_line_settings.* to command_line_settings.*.
Modified: branches/ProbABEL-refactoring/ProbABEL/src/Makefile.am
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/Makefile.am 2012-10-29 21:05:00 UTC (rev 993)
+++ branches/ProbABEL-refactoring/ProbABEL/src/Makefile.am 2012-10-29 21:14:17 UTC (rev 994)
@@ -4,7 +4,7 @@
## work. It gives warning message about portability, but in the end doesn't work,
## I tried :-).
REGFILES = data.h data.cpp gendata.h gendata.cpp mematrix.h mematri1.h \
- comand_line_settings.h comand_line_settings.cpp reg1.h usage.h \
+ command_line_settings.h command_line_settings.cpp reg1.h usage.h \
usage.cpp main.cpp utilities.h utilities.cpp phedata.h phedata.cpp \
cholesky.h cholesky.cpp regdata.h regdata.cpp coxph_data.h \
coxph_data.cpp maskedmatrix.cpp maskedmatrix.h eigen_mematrix.h \
Deleted: branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.cpp
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.cpp 2012-10-29 21:05:00 UTC (rev 993)
+++ branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.cpp 2012-10-29 21:14:17 UTC (rev 994)
@@ -1,355 +0,0 @@
-/*
- * comand_line_settings.cpp
- *
- * Created on: Apr 1, 2012
- * Author: mkooyman
- */
-
-#include <getopt.h>
-#include <string>
-#include <iostream>
-#include "usage.h"
-#include "comand_line_settings.h"
-
-// config.h and fvlib/FileVector.h are included for the upper case variables
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include "fvlib/FileVector.h"
-
-using namespace std;
-
-string cmdvars::getStrGenfilename() const
-{
- return str_genfilename;
-}
-
-int cmdvars::getAllcov() const
-{
- return allcov;
-}
-
-string cmdvars::getChrom() const
-{
- return chrom;
-}
-
-char* cmdvars::getGenfilename() const
-{
- return genfilename;
-}
-
-int cmdvars::getInteraction() const
-{
- return interaction;
-}
-
-char* cmdvars::getInverseFilename() const
-{
- return inverse_filename;
-}
-
-bool cmdvars::isIscox() const
-{
- return iscox;
-}
-
-int cmdvars::getIsFvf() const
-{
- return isFVF;
-}
-
-char* cmdvars::getMapfilename() const
-{
- return mapfilename;
-}
-
-char* cmdvars::getMlinfofilename() const
-{
- return mlinfofilename;
-}
-
-
-int cmdvars::getNgpreds() const
-{
- return ngpreds;
-}
-
-int cmdvars::getNohead() const
-{
- return nohead;
-}
-
-int cmdvars::getNoutcomes() const
-{
- return noutcomes;
-}
-
-int cmdvars::getNpeople() const
-{
- return npeople;
-}
-
-char* cmdvars::getOutfilename() const
-{
- return outfilename;
-}
-
-char* cmdvars::getProgramName() const
-{
- return program_name;
-}
-
-int cmdvars::getRobust() const
-{
- return robust;
-}
-
-int cmdvars::getScore() const
-{
- return score;
-}
-
-string cmdvars::getSep() const
-{
- return sep;
-}
-
-int cmdvars::getSkipd() const
-{
- return skipd;
-}
-
-char* cmdvars::getPhefilename() const
-{
- return phefilename;
-}
-
-void cmdvars::set_variables(int argc, char * argv[])
-{
- int next_option;
- const char * const short_options = "p:i:d:m:n:c:o:s:t:g:a:erlh:b:vu";
- //b - interaction parameter
- // ADD --fv FLAG (FILEVECTOR), IN WHICH CASE USE ALTERNATIVE
- // CONSTRUCTOR FOR GENDATA
- const struct option long_options[] =
- {
- { "pheno", 1, NULL, 'p' },
- { "info", 1, NULL, 'i' },
- { "dose", 1, NULL, 'd' },
- { "map", 1, NULL, 'm' },
- { "nids", 1, NULL, 'n' },
- { "chrom", 1, NULL, 'c' },
- { "out", 1, NULL, 'o' },
- { "skipd", 1, NULL, 's' },
- { "ntraits", 1, NULL, 't' },
- { "ngpreds", 1, NULL, 'g' },
- { "separat", 1, NULL, 'a' },
- { "score", 0, NULL, 'r' },
- { "no-head", 0, NULL, 'e' },
- { "allcov", 0, NULL, 'l' },
- { "help", 0, NULL, 'h' },
- { "interaction", 1, NULL, 'b' },
- { "interaction_only", 1, NULL, 'k' },
- { "mmscore", 1, NULL, 'v' },
- { "robust", 0, NULL, 'u' },
- { NULL, 0, NULL, 0 } };
- char * program_name = argv[0];
- fprintf(stdout, "Usage: %s options\n", PACKAGE_VERSION);
-
- do
- {
- next_option = getopt_long(argc, argv, short_options, long_options,
- NULL);
-
- switch (next_option)
- {
- case 'h':
- print_help(program_name, 0);
- case 'p':
- phefilename = optarg;
- neco[0] = 1;
- fprintf(stdout, "phenoint\n");
- break;
- case 'i':
- mlinfofilename = optarg;
- neco[1] = 1;
- break;
- case 'd':
- genfilename = optarg;
- neco[2] = 1;
- break;
- case 'm':
- mapfilename = optarg;
- break;
- case 'n':
- npeople = atoi(optarg);
- break;
- case 'c':
- chrom = optarg;
- break;
- case 'o':
- outfilename = optarg;
- break;
- case 's':
- skipd = atoi(optarg);
- break;
- case 't':
- noutcomes = atoi(optarg);
- break;
- case 'g':
- ngpreds = atoi(optarg);
- break;
- case 'a':
- sep = optarg;
- break;
- case 'e':
- nohead = 1;
- break;
- case 'r':
- score = 1;
- break;
- case 'l':
- allcov = 1;
- break;
- case 'b':
- interaction = atoi(optarg);
- break;
- case 'k':
- interaction_excluded = atoi(optarg);
- break;
- case 'v':
- inverse_filename = optarg;
- break;
- case 'u':
- robust = 1;
- break;
-
- case '?':
- print_usage(program_name, 1);
- case -1:
- break;
- default:
- abort();
- } // end of switch
- } while (next_option != -1);
-} // end of function
-
-bool cmdvars::isIsInteractionExcluded() const
-{
- return is_interaction_excluded;
-}
-
-void cmdvars::printinfo()
-{
- fprintf(stdout,
- "%s v. %s (C) Yurii Aulchenko, Lennart C. Karssen, Maksim Struchalin, EMCR\n\n",
- PACKAGE, PACKAGE_VERSION);
-#if EIGEN
- fprintf(stdout, "Using EIGEN for matrix operations\n");
-#endif
-
- if (neco[0] != 1 || neco[1] != 1 || neco[2] != 1)
- {
- print_usage(program_name, 1);
- }
-
- if (score)
- {
- cout << "option --score suppressed from v 0.1-6\n";
- exit(1);
- }
-
- str_genfilename = genfilename;
- if (str_genfilename.find(FILEVECTOR_INDEX_FILE_SUFFIX) != string::npos
- || str_genfilename.find(FILEVECTOR_DATA_FILE_SUFFIX)
- != string::npos)
- isFVF = 1;
-
- fprintf(stdout, "Options in effect:\n");
- fprintf(stdout, "\t --pheno = %s\n", phefilename);
- fprintf(stdout, "\t --info = %s\n", mlinfofilename);
- fprintf(stdout, "\t --dose = %s\n", genfilename);
- if (isFVF)
- fprintf(stdout, "\t (using FVF data)\n");
- fprintf(stdout, "\t --ntraits = %d\n", noutcomes);
- fprintf(stdout, "\t --ngpreds = %d\n", ngpreds);
- fprintf(stdout, "\t --interaction = %d\n", interaction);
- fprintf(stdout, "\t --interaction_only = %d\n", interaction_excluded);
-
- if (inverse_filename != NULL)
- fprintf(stdout, "\t --mmscore = %s\n", inverse_filename);
- else
- fprintf(stdout, "\t --mmscore = not in output\n");
-// fprintf(stdout,"\t --mmscore = %s\n",inverse_filename);
-
- if (mapfilename != NULL)
- fprintf(stdout, "\t --map = %s\n", mapfilename);
- else
- fprintf(stdout, "\t --map = not in output\n");
- if (npeople > 0)
- fprintf(stdout, "\t --nids = %d\n", npeople);
- else
- fprintf(stdout, "\t --nids = estimated from data\n");
- if (chrom != "-1")
- cout << "\t --chrom = " << chrom << "\n";
- else
- cout << "\t --chrom = not in output\n";
- if (outfilename != NULL)
- fprintf(stdout, "\t --out = %s\n", outfilename);
- else
- fprintf(stdout, "\t --out = regression.out.txt\n");
- fprintf(stdout, "\t --skipd = %d\n", skipd);
- cout << "\t --separat = \"" << sep << "\"\n";
- if (score)
- fprintf(stdout, "\t --score = ON\n");
- else
- fprintf(stdout, "\t --score = OFF\n");
- if (nohead)
- fprintf(stdout, "\t --nohead = ON\n");
- else
- fprintf(stdout, "\t --nohead = OFF\n");
- if (allcov)
- fprintf(stdout, "\t --allcov = ON\n");
- else
- fprintf(stdout, "\t --allcov = OFF\n");
- if (robust)
- fprintf(stdout, "\t --robust = ON\n");
- else
- fprintf(stdout, "\t --robust = OFF\n");
-
- if (ngpreds != 1 && ngpreds != 2)
- {
- fprintf(stderr,
- "\n\n--ngpreds should be 1 for MLDOSE or 2 for MLPROB\n");
- exit(1);
- }
-
- if (interaction_excluded != 0)
- {
- interaction = interaction_excluded; //ups
- is_interaction_excluded = true;
- }
- if (outfilename == NULL)
- {
- outfilename = (char *) string("regression").c_str();
- }
-#if COXPH
- if (score)
- {
- fprintf(stderr, "\n\nOption --score is implemented for linear and logistic models only\n");
- exit(1);
- }
-
- if (inverse_filename != NULL)
- {
- std::cerr << "ERROR: mmscore is forbidden for cox regression\n";
- exit(1);
- }
- if (robust)
- {
- std::cerr << "ERROR: robust standard errors not implemented for Cox regression\n";
- exit(1);
- }
-#endif
-}
Deleted: branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.h
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.h 2012-10-29 21:05:00 UTC (rev 993)
+++ branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.h 2012-10-29 21:14:17 UTC (rev 994)
@@ -1,111 +0,0 @@
-/*
- * comand_line_settings.h
- *
- * Created on: Apr 2; int 2012
- * Author: mkooyman
- */
-
-#ifndef COMAND_LINE_SETTINGS_H_
-#define COMAND_LINE_SETTINGS_H_
-
-using namespace std;
-
-class cmdvars
-{
-private:
-
- char * program_name;
-
- char *phefilename;
- char *mlinfofilename;
- char *genfilename;
- char *mapfilename;
- char *outfilename;
- char *inverse_filename;
-
- string str_genfilename;
-
- int nohead;
- int score;
- int npeople;
- int ngpreds;
- int interaction;
- int interaction_excluded;
- bool is_interaction_excluded;
- int robust;
- string chrom;
- string sep;
- int neco[3];
- bool iscox;
- int isFVF;
- int noutcomes;
- int skipd;
- int allcov;
-
-public:
- cmdvars()
- {
- program_name = NULL;
-
- std::fill_n(neco, 3, 0);
- phefilename = NULL;
- mlinfofilename = NULL;
- genfilename = NULL;
- mapfilename = NULL;
- outfilename = NULL;
- inverse_filename = NULL;
-
- sep = " ";
- nohead = 0;
- score = 0;
- npeople = -1;
- ngpreds = 1;
- interaction = 0;
- interaction_excluded = 0;
- is_interaction_excluded = false; //Oh Holy Matrix, forgive me for this!
- robust = 0;
- chrom = "-1";
- str_genfilename = "";
-
- iscox = false;
- isFVF = 0;
-
- skipd = 2;
- allcov = 0;
-#if COXPH
- noutcomes = 2;
- iscox=true;
-#else
- noutcomes = 1;
-#endif
-
- }
- void set_variables(int, char *[]);
- char* getPhefilename() const;
- int getAllcov() const;
- string getChrom() const;
- char* getGenfilename() const;
- int getInteraction() const;
- char* getInverseFilename() const;
- bool isIscox() const;
- int getIsFvf() const;
- char* getMapfilename() const;
- char* getMlinfofilename() const;
-
- int getNgpreds() const;
- int getNohead() const;
- int getNoutcomes() const;
- int getNpeople() const;
- char* getOutfilename() const;
- char* getProgramName() const;
- int getRobust() const;
- int getScore() const;
- string getSep() const;
- int getSkipd() const;
- string getStrGenfilename() const;
-
- void printinfo();
- bool isIsInteractionExcluded() const;
-};
-
-#endif /* COMAND_LINE_SETTINGS_H_ */
Copied: branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.cpp (from rev 993, branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.cpp)
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.cpp (rev 0)
+++ branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.cpp 2012-10-29 21:14:17 UTC (rev 994)
@@ -0,0 +1,355 @@
+/*
+ * command_line_settings.cpp
+ *
+ * Created on: Apr 1, 2012
+ * Author: mkooyman
+ */
+
+#include <getopt.h>
+#include <string>
+#include <iostream>
+#include "usage.h"
+#include "command_line_settings.h"
+
+// config.h and fvlib/FileVector.h are included for the upper case variables
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "fvlib/FileVector.h"
+
+using namespace std;
+
+string cmdvars::getStrGenfilename() const
+{
+ return str_genfilename;
+}
+
+int cmdvars::getAllcov() const
+{
+ return allcov;
+}
+
+string cmdvars::getChrom() const
+{
+ return chrom;
+}
+
+char* cmdvars::getGenfilename() const
+{
+ return genfilename;
+}
+
+int cmdvars::getInteraction() const
+{
+ return interaction;
+}
+
+char* cmdvars::getInverseFilename() const
+{
+ return inverse_filename;
+}
+
+bool cmdvars::isIscox() const
+{
+ return iscox;
+}
+
+int cmdvars::getIsFvf() const
+{
+ return isFVF;
+}
+
+char* cmdvars::getMapfilename() const
+{
+ return mapfilename;
+}
+
+char* cmdvars::getMlinfofilename() const
+{
+ return mlinfofilename;
+}
+
+
+int cmdvars::getNgpreds() const
+{
+ return ngpreds;
+}
+
+int cmdvars::getNohead() const
+{
+ return nohead;
+}
+
+int cmdvars::getNoutcomes() const
+{
+ return noutcomes;
+}
+
+int cmdvars::getNpeople() const
+{
+ return npeople;
+}
+
+char* cmdvars::getOutfilename() const
+{
+ return outfilename;
+}
+
+char* cmdvars::getProgramName() const
+{
+ return program_name;
+}
+
+int cmdvars::getRobust() const
+{
+ return robust;
+}
+
+int cmdvars::getScore() const
+{
+ return score;
+}
+
+string cmdvars::getSep() const
+{
+ return sep;
+}
+
+int cmdvars::getSkipd() const
+{
+ return skipd;
+}
+
+char* cmdvars::getPhefilename() const
+{
+ return phefilename;
+}
+
+void cmdvars::set_variables(int argc, char * argv[])
+{
+ int next_option;
+ const char * const short_options = "p:i:d:m:n:c:o:s:t:g:a:erlh:b:vu";
+ //b - interaction parameter
+ // ADD --fv FLAG (FILEVECTOR), IN WHICH CASE USE ALTERNATIVE
+ // CONSTRUCTOR FOR GENDATA
+ const struct option long_options[] =
+ {
+ { "pheno", 1, NULL, 'p' },
+ { "info", 1, NULL, 'i' },
+ { "dose", 1, NULL, 'd' },
+ { "map", 1, NULL, 'm' },
+ { "nids", 1, NULL, 'n' },
+ { "chrom", 1, NULL, 'c' },
+ { "out", 1, NULL, 'o' },
+ { "skipd", 1, NULL, 's' },
+ { "ntraits", 1, NULL, 't' },
+ { "ngpreds", 1, NULL, 'g' },
+ { "separat", 1, NULL, 'a' },
+ { "score", 0, NULL, 'r' },
+ { "no-head", 0, NULL, 'e' },
+ { "allcov", 0, NULL, 'l' },
+ { "help", 0, NULL, 'h' },
+ { "interaction", 1, NULL, 'b' },
+ { "interaction_only", 1, NULL, 'k' },
+ { "mmscore", 1, NULL, 'v' },
+ { "robust", 0, NULL, 'u' },
+ { NULL, 0, NULL, 0 } };
+ char * program_name = argv[0];
+ fprintf(stdout, "Usage: %s options\n", PACKAGE_VERSION);
+
+ do
+ {
+ next_option = getopt_long(argc, argv, short_options, long_options,
+ NULL);
+
+ switch (next_option)
+ {
+ case 'h':
+ print_help(program_name, 0);
+ case 'p':
+ phefilename = optarg;
+ neco[0] = 1;
+ fprintf(stdout, "phenoint\n");
+ break;
+ case 'i':
+ mlinfofilename = optarg;
+ neco[1] = 1;
+ break;
+ case 'd':
+ genfilename = optarg;
+ neco[2] = 1;
+ break;
+ case 'm':
+ mapfilename = optarg;
+ break;
+ case 'n':
+ npeople = atoi(optarg);
+ break;
+ case 'c':
+ chrom = optarg;
+ break;
+ case 'o':
+ outfilename = optarg;
+ break;
+ case 's':
+ skipd = atoi(optarg);
+ break;
+ case 't':
+ noutcomes = atoi(optarg);
+ break;
+ case 'g':
+ ngpreds = atoi(optarg);
+ break;
+ case 'a':
+ sep = optarg;
+ break;
+ case 'e':
+ nohead = 1;
+ break;
+ case 'r':
+ score = 1;
+ break;
+ case 'l':
+ allcov = 1;
+ break;
+ case 'b':
+ interaction = atoi(optarg);
+ break;
+ case 'k':
+ interaction_excluded = atoi(optarg);
+ break;
+ case 'v':
+ inverse_filename = optarg;
+ break;
+ case 'u':
+ robust = 1;
+ break;
+
+ case '?':
+ print_usage(program_name, 1);
+ case -1:
+ break;
+ default:
+ abort();
+ } // end of switch
+ } while (next_option != -1);
+} // end of function
+
+bool cmdvars::isIsInteractionExcluded() const
+{
+ return is_interaction_excluded;
+}
+
+void cmdvars::printinfo()
+{
+ fprintf(stdout,
+ "%s v. %s (C) Yurii Aulchenko, Lennart C. Karssen, Maksim Struchalin, EMCR\n\n",
+ PACKAGE, PACKAGE_VERSION);
+#if EIGEN
+ fprintf(stdout, "Using EIGEN for matrix operations\n");
+#endif
+
+ if (neco[0] != 1 || neco[1] != 1 || neco[2] != 1)
+ {
+ print_usage(program_name, 1);
+ }
+
+ if (score)
+ {
+ cout << "option --score suppressed from v 0.1-6\n";
+ exit(1);
+ }
+
+ str_genfilename = genfilename;
+ if (str_genfilename.find(FILEVECTOR_INDEX_FILE_SUFFIX) != string::npos
+ || str_genfilename.find(FILEVECTOR_DATA_FILE_SUFFIX)
+ != string::npos)
+ isFVF = 1;
+
+ fprintf(stdout, "Options in effect:\n");
+ fprintf(stdout, "\t --pheno = %s\n", phefilename);
+ fprintf(stdout, "\t --info = %s\n", mlinfofilename);
+ fprintf(stdout, "\t --dose = %s\n", genfilename);
+ if (isFVF)
+ fprintf(stdout, "\t (using FVF data)\n");
+ fprintf(stdout, "\t --ntraits = %d\n", noutcomes);
+ fprintf(stdout, "\t --ngpreds = %d\n", ngpreds);
+ fprintf(stdout, "\t --interaction = %d\n", interaction);
+ fprintf(stdout, "\t --interaction_only = %d\n", interaction_excluded);
+
+ if (inverse_filename != NULL)
+ fprintf(stdout, "\t --mmscore = %s\n", inverse_filename);
+ else
+ fprintf(stdout, "\t --mmscore = not in output\n");
+// fprintf(stdout,"\t --mmscore = %s\n",inverse_filename);
+
+ if (mapfilename != NULL)
+ fprintf(stdout, "\t --map = %s\n", mapfilename);
+ else
+ fprintf(stdout, "\t --map = not in output\n");
+ if (npeople > 0)
+ fprintf(stdout, "\t --nids = %d\n", npeople);
+ else
+ fprintf(stdout, "\t --nids = estimated from data\n");
+ if (chrom != "-1")
+ cout << "\t --chrom = " << chrom << "\n";
+ else
+ cout << "\t --chrom = not in output\n";
+ if (outfilename != NULL)
+ fprintf(stdout, "\t --out = %s\n", outfilename);
+ else
+ fprintf(stdout, "\t --out = regression.out.txt\n");
+ fprintf(stdout, "\t --skipd = %d\n", skipd);
+ cout << "\t --separat = \"" << sep << "\"\n";
+ if (score)
+ fprintf(stdout, "\t --score = ON\n");
+ else
+ fprintf(stdout, "\t --score = OFF\n");
+ if (nohead)
+ fprintf(stdout, "\t --nohead = ON\n");
+ else
+ fprintf(stdout, "\t --nohead = OFF\n");
+ if (allcov)
+ fprintf(stdout, "\t --allcov = ON\n");
+ else
+ fprintf(stdout, "\t --allcov = OFF\n");
+ if (robust)
+ fprintf(stdout, "\t --robust = ON\n");
+ else
+ fprintf(stdout, "\t --robust = OFF\n");
+
+ if (ngpreds != 1 && ngpreds != 2)
+ {
+ fprintf(stderr,
+ "\n\n--ngpreds should be 1 for MLDOSE or 2 for MLPROB\n");
+ exit(1);
+ }
+
+ if (interaction_excluded != 0)
+ {
+ interaction = interaction_excluded; //ups
+ is_interaction_excluded = true;
+ }
+ if (outfilename == NULL)
+ {
+ outfilename = (char *) string("regression").c_str();
+ }
+#if COXPH
+ if (score)
+ {
+ fprintf(stderr, "\n\nOption --score is implemented for linear and logistic models only\n");
+ exit(1);
+ }
+
+ if (inverse_filename != NULL)
+ {
+ std::cerr << "ERROR: mmscore is forbidden for cox regression\n";
+ exit(1);
+ }
+ if (robust)
+ {
+ std::cerr << "ERROR: robust standard errors not implemented for Cox regression\n";
+ exit(1);
+ }
+#endif
+}
Copied: branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.h (from rev 987, branches/ProbABEL-refactoring/ProbABEL/src/comand_line_settings.h)
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.h (rev 0)
+++ branches/ProbABEL-refactoring/ProbABEL/src/command_line_settings.h 2012-10-29 21:14:17 UTC (rev 994)
@@ -0,0 +1,111 @@
+/*
+ * command_line_settings.h
+ *
+ * Created on: Apr 2; int 2012
+ * Author: mkooyman
+ */
+
+#ifndef COMMAND_LINE_SETTINGS_H_
+#define COMMAND_LINE_SETTINGS_H_
+
+using namespace std;
+
+class cmdvars
+{
+private:
+
+ char * program_name;
+
+ char *phefilename;
+ char *mlinfofilename;
+ char *genfilename;
+ char *mapfilename;
+ char *outfilename;
+ char *inverse_filename;
+
+ string str_genfilename;
+
+ int nohead;
+ int score;
+ int npeople;
+ int ngpreds;
+ int interaction;
+ int interaction_excluded;
+ bool is_interaction_excluded;
+ int robust;
+ string chrom;
+ string sep;
+ int neco[3];
+ bool iscox;
+ int isFVF;
+ int noutcomes;
+ int skipd;
+ int allcov;
+
+public:
+ cmdvars()
+ {
+ program_name = NULL;
+
+ std::fill_n(neco, 3, 0);
+ phefilename = NULL;
+ mlinfofilename = NULL;
+ genfilename = NULL;
+ mapfilename = NULL;
+ outfilename = NULL;
+ inverse_filename = NULL;
+
+ sep = " ";
+ nohead = 0;
+ score = 0;
+ npeople = -1;
+ ngpreds = 1;
+ interaction = 0;
+ interaction_excluded = 0;
+ is_interaction_excluded = false; //Oh Holy Matrix, forgive me for this!
+ robust = 0;
+ chrom = "-1";
+ str_genfilename = "";
+
+ iscox = false;
+ isFVF = 0;
+
+ skipd = 2;
+ allcov = 0;
+#if COXPH
+ noutcomes = 2;
+ iscox=true;
+#else
+ noutcomes = 1;
+#endif
+
+ }
+ void set_variables(int, char *[]);
+ char* getPhefilename() const;
+ int getAllcov() const;
+ string getChrom() const;
+ char* getGenfilename() const;
+ int getInteraction() const;
+ char* getInverseFilename() const;
+ bool isIscox() const;
+ int getIsFvf() const;
+ char* getMapfilename() const;
+ char* getMlinfofilename() const;
+
+ int getNgpreds() const;
+ int getNohead() const;
+ int getNoutcomes() const;
+ int getNpeople() const;
+ char* getOutfilename() const;
+ char* getProgramName() const;
+ int getRobust() const;
+ int getScore() const;
+ string getSep() const;
+ int getSkipd() const;
+ string getStrGenfilename() const;
+
+ void printinfo();
+ bool isIsInteractionExcluded() const;
+};
+
+#endif /* COMMAND_LINE_SETTINGS_H_ */
Modified: branches/ProbABEL-refactoring/ProbABEL/src/main.cpp
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/main.cpp 2012-10-29 21:05:00 UTC (rev 993)
+++ branches/ProbABEL-refactoring/ProbABEL/src/main.cpp 2012-10-29 21:14:17 UTC (rev 994)
@@ -45,7 +45,7 @@
#include "maskedmatrix.h"
#include "data.h"
#include "reg1.h"
-#include "comand_line_settings.h"
+#include "command_line_settings.h"
#define MAXITER 10
#define EPS 1.e-8
More information about the Genabel-commits
mailing list