| 121 | const string& estPath); |
| 122 | |
| 123 | int main(int argc, char** argv) |
| 124 | { |
| 125 | if (!opt::db.empty()) |
| 126 | opt::metaVars.resize(3); |
| 127 | |
| 128 | bool die = false; |
| 129 | for (int c; (c = getopt_long(argc, argv, |
| 130 | shortopts, longopts, NULL)) != -1;) { |
| 131 | istringstream arg(optarg != NULL ? optarg : ""); |
| 132 | switch (c) { |
| 133 | case '?': die = true; break; |
| 134 | case 'd': arg >> opt::distanceError; break; |
| 135 | case 'j': arg >> opt::threads; break; |
| 136 | case 'k': arg >> opt::k; break; |
| 137 | case OPT_MAX_COST: arg >> opt::maxCost; break; |
| 138 | case 'n': arg >> opt::minEdgeWeight; break; |
| 139 | case 'o': arg >> opt::out; break; |
| 140 | case 's': arg >> opt::minSeedLength; break; |
| 141 | case 'v': opt::verbose++; break; |
| 142 | case OPT_HELP: |
| 143 | cout << USAGE_MESSAGE; |
| 144 | exit(EXIT_SUCCESS); |
| 145 | case OPT_VERSION: |
| 146 | cout << VERSION_MESSAGE; |
| 147 | exit(EXIT_SUCCESS); |
| 148 | case OPT_DB: |
| 149 | arg >> opt::db; |
| 150 | break; |
| 151 | case OPT_LIBRARY: |
| 152 | arg >> opt::metaVars[0]; |
| 153 | break; |
| 154 | case OPT_STRAIN: |
| 155 | arg >> opt::metaVars[1]; |
| 156 | break; |
| 157 | case OPT_SPECIES: |
| 158 | arg >> opt::metaVars[2]; break; |
| 159 | } |
| 160 | if (optarg != NULL && !arg.eof()) { |
| 161 | cerr << PROGRAM ": invalid option: `-" |
| 162 | << (char)c << optarg << "'\n"; |
| 163 | exit(EXIT_FAILURE); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | if (opt::k <= 0) { |
| 168 | cerr << PROGRAM ": missing -k,--kmer option\n"; |
| 169 | die = true; |
| 170 | } |
| 171 | |
| 172 | if (opt::out.empty()) { |
| 173 | cerr << PROGRAM ": " << "missing -o,--out option\n"; |
| 174 | die = true; |
| 175 | } |
| 176 | |
| 177 | if (argc - optind < 2) { |
| 178 | cerr << PROGRAM ": missing arguments\n"; |
| 179 | die = true; |
| 180 | } else if (argc - optind > 2) { |
nothing calls this directly
no test coverage detected