MCPcopy Create free account
hub / github.com/BirolLab/abyss / main

Function main

SimpleGraph/SimpleGraph.cpp:123–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 const string& estPath);
122
123int 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) {

Callers

nothing calls this directly

Calls 11

assert_goodFunction · 0.85
addToDbFunction · 0.85
num_vertices_removedFunction · 0.85
resizeMethod · 0.80
getCommandFunction · 0.50
num_verticesFunction · 0.50
num_edgesFunction · 0.50
emptyMethod · 0.45
eofMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected