]> ruin.nu Git - germs.git/commitdiff
Introduce -i for only identifying the model, excluding sorting.
authorMichael Andreen <harv@ruin.nu>
Tue, 30 Oct 2007 08:51:08 +0000 (09:51 +0100)
committerMichael Andreen <harv@ruin.nu>
Tue, 30 Oct 2007 08:51:08 +0000 (09:51 +0100)
src/main.cpp

index d9bce2f37ba2f901c38470a0d0b59ab1f2e323b3..fe581385516cc1133f80a49a9e338211a7a69279 100644 (file)
@@ -20,10 +20,11 @@ int main(int argc, char** argv){
        string ann = "default.ann";
        Model model(0);
        bool detectModel = true;
+       bool onlyIdentify = false;
 
        //Parse command line arguments
        int opt;
-       while ((opt = getopt(argc, argv, "m:n:h")) != -1) {
+       while ((opt = getopt(argc, argv, "im:n:h")) != -1) {
                switch (opt) {
                        case 'm':
                                model = Model::modelFactory(optarg);
@@ -32,6 +33,9 @@ int main(int argc, char** argv){
                        case 'n':
                                ann = optarg;
                                break;
+                       case 'i':
+                               onlyIdentify = true;
+                               break;
                        case 'h':
                                cout << "Usage: " << argv[0] << " [OPTION] [FILE]" << endl
                                        << endl << "  -m <model> Specifies which model to use for sorting: Whirl, X, Zipper, FatX or Cloud "
@@ -84,6 +88,9 @@ int main(int argc, char** argv){
        //copy(go.begin(), go.end(), ostream_iterator<int>(cout, " "));
        //cout << endl;
 
+       if (onlyIdentify){
+               return EXIT_SUCCESS;
+       }
        //Sort
        GeneSorter so;
        GeneSorter::ActionList al = so.sort(go,model);