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

Function main

Consensus/Consensus.cpp:461–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461int main(int argc, char** argv)
462{
463 bool die = false;
464 for (int c; (c = getopt_long(argc, argv,
465 shortopts, longopts, NULL)) != -1;) {
466 istringstream arg(optarg != NULL ? optarg : "");
467 switch (c) {
468 case '?': die = true; break;
469 case 'v': opt::verbose++; break;
470 case 'o': arg >> opt::outPath; break;
471 case 'p': arg >> opt::pileupPath; break;
472 case 'V': opt::onlyVariants = true; break;
473 case OPT_HELP:
474 cout << USAGE_MESSAGE;
475 exit(EXIT_SUCCESS);
476 case OPT_VERSION:
477 cout << VERSION_MESSAGE;
478 exit(EXIT_SUCCESS);
479 }
480 if (optarg != NULL && !arg.eof()) {
481 cerr << PROGRAM ": invalid option: `-"
482 << (char)c << optarg << "'\n";
483 exit(EXIT_FAILURE);
484 }
485 }
486
487 if (opt::outPath.empty() && opt::pileupPath.empty()) {
488 cerr << PROGRAM ": " << "missing -o,--out option\n";
489 die = true;
490 }
491
492 if (argc - optind < 1) {
493 cerr << PROGRAM ": missing arguments\n";
494 die = true;
495 } else if (argc - optind > 1) {
496 cerr << PROGRAM ": too many arguments\n";
497 die = true;
498 }
499 if (die) {
500 cerr << "Try `" << PROGRAM
501 << " --help' for more information.\n";
502 exit(EXIT_FAILURE);
503 }
504
505 readContigs(argv[optind++]);
506 buildBaseQuality();
507 consensus(opt::outPath, opt::pileupPath);
508}

Callers

nothing calls this directly

Calls 5

buildBaseQualityFunction · 0.85
consensusFunction · 0.85
readContigsFunction · 0.70
eofMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected