int main( int argc, char const *argv[] ) { sf::Time sf_time; std::cout << "Kick Ass!\n"; Greeter greeter = Greeter( 3 ); FoldedGreeter fd_greeter = FoldedGreeter( 3 ); greeter.PrintSingleGreetings(); std::cout << "\n"; greeter.PrintMultipleGreetings(); std::cout << "\n"; fd_greeter.PrintSingleGreetings(); std::cout << "\n"; fd_greeter.PrintMultipleGreetings(); return 0; }
/* parse the command line arguments */ bool EludeCaller::ParseOptions(int argc, char** argv) { ostringstream intro; intro << Greeter() << endl << "Usage:" << endl; intro << " elude [-t \"train data file\" ] [-l \"retention model\"] " << endl; intro << "Where input file is the file including the test data; output file" << endl; intro << "the output will be written (ensure to have read and write access on the file)." << endl; CommandLineParser cmd(intro.str()); // define available options cmd.defineOption("v", "verbose", "Set verbosity of output: 0 = no processing info, 5 = all, default is 2.", "level"); cmd.defineOption("t", "train", "Specifies the file including the training data.", "filename"); cmd.defineOption("e", "evaluate", "Specifies the file including the test data.", "filename"); cmd.defineOption("s", "save-model", "Specifies the file in which the model will be saved.", "filename"); cmd.defineOption("l", "load-model", "Specifies a file including a SVR model to be loaded.", "filename"); cmd.defineOption("o", "out", "File to save the ions.", "filename"); cmd.defineOption("a", "auto", "The SVR model is selected automatically from the library.", "", TRUE_IF_SET); cmd.defineOption("b", "lib-path", "Specifies the path to the library.", "filename"); cmd.defineOption("d", "append", "Append current model to library.", "", TRUE_IF_SET); cmd.defineOption("j", "no_linear_adjust", "The model will NOT be linearly adjusted.", "", TRUE_IF_SET); cmd.defineOption("c", "lts-coverage", "Specifies the fraction of data used in calibrating a model via LTS. " "This option is not valid when the -j option is used.", "value"); cmd.defineOption("u", "unique", "Remove all redundant peptides from the test set", "", TRUE_IF_SET); cmd.defineOption("k", "common", "Remove the peptides from the train that are also in the test set", "", TRUE_IF_SET); cmd.defineOption("y", "no-in-source", "Specifies that in source fragments should be removed from the test set." "This option can be used only when the test set includes retention time.", "", TRUE_IF_SET); cmd.defineOption("i", "save-in-source", "The file where the detected in source fragments are stored", "filename"); cmd.defineOption("z", "enzyme", "The enzyme used for digestion. Possible values {NO_ENZYME,TRYPSIN,CHYMOTRYPSIN,ELASTASE}." "By default: TRYPSIN", "value"); cmd.defineOption("x", "remove-non-enzymatic", "All non enzymatic peptides will be removed from both train and test." "The option is available only when the sequence is given as A.XXX.B", "", TRUE_IF_SET); cmd.defineOption("r", "retention-index", "File to save the trained retention index.", "filename"); cmd.defineOption("f", "context-format", "The peptides are given in the format A.XXX.B, where XXX is the" "peptide sequence and A and B are the previous and next amino acid" "in the protein sequence. If the peptide is at the beginning (end)" "of the protein, then A(B) will be -.", "", TRUE_IF_SET); cmd.defineOption("g", "test-rt", "The test file includes rt. In this case the in source-fragments in" "the test data can be detected and various performance measures for" "the test data will be displayed.", "", TRUE_IF_SET); cmd.defineOption("p", "ignore-ptms", "If there are ptms in the test set that were not present when " "training the model, they will be ignored and the index value of " "the unmodified amino acid is used ", "", TRUE_IF_SET); cmd.defineOption("n", "index-only", "Calculate only the hydrophobicity index", "", TRUE_IF_SET); cmd.defineOption("w", "supress-print", "Supress the final printing of the predictions ", "", TRUE_IF_SET); cmd.parseArgs(argc, argv); // process options if (cmd.optionSet("v")) { Globals::getInstance()->setVerbose(cmd.getInt("v", 0, 10)); } if (cmd.optionSet("t")) { train_file_ = cmd.options["t"]; } if (cmd.optionSet("e")) { test_file_ = cmd.options["e"]; } if (cmd.optionSet("s")) { save_model_file_ = cmd.options["s"]; } if (cmd.optionSet("l")) { load_model_file_ = cmd.options["l"]; } if (cmd.optionSet("o")) { output_file_ = cmd.options["o"]; } if (cmd.optionSet("a")) { automatic_model_sel_ = true; } if (cmd.optionSet("b")) { library_path_ = cmd.options["b"]; int n = library_path_.length(); if (library_path_[n - 1] != '\\' && library_path_[n - 1] != '/') { library_path_ += "/"; } } if (cmd.optionSet("d")) { append_model_ = true; } if (cmd.optionSet("j")) { linear_calibration_ = false; } if (cmd.optionSet("c")) { double coverage = cmd.getDouble("c", 0.0, 1.0); LTSRegression::setCoverage(coverage); } if (cmd.optionSet("u")) { remove_duplicates_ = true; } if (cmd.optionSet("k")) { remove_common_peptides_ = true; } if (cmd.optionSet("y")) { remove_in_source_ = true; } if (cmd.optionSet("i")) { in_source_file_ = cmd.options["i"]; } if (cmd.optionSet("z")) { SetEnzyme(cmd.options["z"]); } if (cmd.optionSet("x")) { remove_non_enzymatic_ = true; } if (cmd.optionSet("r")) { index_file_ = cmd.options["r"]; } if (cmd.optionSet("f")) { context_format_ = true; } if (cmd.optionSet("g")) { test_includes_rt_ = true; } if (cmd.optionSet("p")) { RetentionFeatures::set_ignore_ptms(true); ignore_ptms_ = true; } if (cmd.optionSet("n")) { only_hydrophobicity_index_ = true; } if (cmd.optionSet("w")) { supress_print_ = true; } return true; }