| 124 | } |
| 125 | |
| 126 | static const char* getControlNameFromCommandLine(int argc, char *argv[]) |
| 127 | { |
| 128 | const char* sample_file; |
| 129 | bool sample_file_set=0; |
| 130 | |
| 131 | if (argc >= 3 && (strcmp(argv[1], "-c") == 0 || strcmp(argv[1], "-control") == 0 || strcmp(argv[1], "--c") == 0 || strcmp(argv[1], "--control") == 0)) { |
| 132 | sample_file = argv[2]; |
| 133 | sample_file_set=1; |
| 134 | } else { |
| 135 | if (argc >= 5 && (strcmp(argv[3], "-c") == 0 || strcmp(argv[3], "-control") == 0 || strcmp(argv[3], "--c") == 0 || strcmp(argv[3], "--control") == 0)) { |
| 136 | sample_file = argv[4]; |
| 137 | sample_file_set=1; |
| 138 | } else { |
| 139 | if (argc >= 7 && (strcmp(argv[5], "-c") == 0 || strcmp(argv[5], "-control") == 0 || strcmp(argv[5], "--c") == 0 || strcmp(argv[5], "--control") == 0)) { |
| 140 | sample_file = argv[6]; |
| 141 | sample_file_set=1; |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | if(!sample_file_set) { |
| 146 | return (""); |
| 147 | } |
| 148 | ifstream ifile(sample_file); |
| 149 | if (!ifile) { |
| 150 | std::cerr << "\n\tCould not find your control file.. Please, check the existance of "<< sample_file <<"\n\n"; |
| 151 | usage(); |
| 152 | exit(-1); |
| 153 | } |
| 154 | return sample_file; |
| 155 | } |
| 156 | |
| 157 | static void thread_init(unsigned int max_threads, unsigned int thread_verbose) |
| 158 | { |