]> git.donarmstrong.com Git - mothur.git/blobdiff - globaldata.cpp
rarefaction.shared() fixed bug
[mothur.git] / globaldata.cpp
index 87f1ccae776b9e435c00189ed63317e1595cc374..f706b5308765cc01db2196c92192f22fb1f86302 100644 (file)
@@ -97,16 +97,16 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                                splitAtComma(value, optionText);
                                splitAtEquals(key, value);
                                
-                               if (key == "phylipfile" )       { phylipfile = value; inputFileName = value; fileroot = value; format = "phylip";       }
-                               if (key == "columnfile" )       { columnfile = value; inputFileName = value; fileroot = value; format = "column";       }
-                               if (key == "listfile" )         { listfile = value; inputFileName = value; fileroot = value; format = "list";           }
-                               if (key == "rabundfile" )       { rabundfile = value; inputFileName = value; fileroot = value; format = "rabund";       }
-                               if (key == "sabundfile" )       { sabundfile = value; inputFileName = value; fileroot = value; format = "sabund";       } 
-                               if (key == "fastafile" )        { fastafile = value; inputFileName = value; fileroot = value; format = "fasta";         } 
+                               if (key == "phylip" )   { phylipfile = value; inputFileName = value; fileroot = value; format = "phylip";       }
+                               if (key == "column" )   { columnfile = value; inputFileName = value; fileroot = value; format = "column";       }
+                               if (key == "list" )             { listfile = value; inputFileName = value; fileroot = value; format = "list";           }
+                               if (key == "rabund" )   { rabundfile = value; inputFileName = value; fileroot = value; format = "rabund";       }
+                               if (key == "sabund" )   { sabundfile = value; inputFileName = value; fileroot = value; format = "sabund";       } 
+                               if (key == "fasta" )    { fastafile = value; inputFileName = value; fileroot = value; format = "fasta";         } 
                                if (key == "treefile" )         { treefile = value; inputFileName = value; fileroot = value; format = "tree";           }
-                               if (key == "namefile" )         { namefile = value;             }
-                               if (key == "orderfile" )        { orderfile = value;    }
-                               if (key == "groupfile" )        { groupfile = value;    }
+                               if (key == "name" )             { namefile = value;             }
+                               if (key == "order" )    { orderfile = value;    }
+                               if (key == "group" )    { groupfile = value;    }
                                if (key == "cutoff" )           { cutoff = value;               }
                                if (key == "precision" )        { precision = value;    }
                                if (key == "iters" )            { iters = value;                }
@@ -148,12 +148,14 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                                if (key == "line") {//stores lines to be used in a vector
                                        lines.clear();
                                        line = value;
+                                       label = "";
                                        splitAtDash(value, lines);
                                        allLines = 0;
                                }
                                if (key == "label") {//stores lines to be used in a vector
                                        labels.clear();
                                        label = value;
+                                       line = "";
                                        splitAtDash(value, labels);
                                        allLines = 0;
                                }
@@ -162,16 +164,16 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                        //saves the last parameter
                        value = optionText;
                        splitAtEquals(key, value);
-                       if (key == "phylipfile" )       { phylipfile = value; inputFileName = value; fileroot = value; format = "phylip";       }
-                       if (key == "columnfile" )       { columnfile = value; inputFileName = value; fileroot = value; format = "column";       }
-                       if (key == "listfile" )         { listfile = value; inputFileName = value; fileroot = value; format = "list";           }
-                       if (key == "rabundfile" )       { rabundfile = value; inputFileName = value; fileroot = value; format = "rabund";       }
-                       if (key == "sabundfile" )       { sabundfile = value; inputFileName = value; fileroot = value; format = "sabund";       }
-                       if (key == "fastafile" )        { fastafile = value; inputFileName = value; fileroot = value; format = "fasta";         }
+                       if (key == "phylip" )   { phylipfile = value; inputFileName = value; fileroot = value; format = "phylip";       }
+                       if (key == "column" )   { columnfile = value; inputFileName = value; fileroot = value; format = "column";       }
+                       if (key == "list" )             { listfile = value; inputFileName = value; fileroot = value; format = "list";           }
+                       if (key == "rabund" )   { rabundfile = value; inputFileName = value; fileroot = value; format = "rabund";       }
+                       if (key == "sabund" )   { sabundfile = value; inputFileName = value; fileroot = value; format = "sabund";       }
+                       if (key == "fasta" )    { fastafile = value; inputFileName = value; fileroot = value; format = "fasta";         }
                        if (key == "treefile" )         { treefile = value; inputFileName = value; fileroot = value; format = "tree";           }  
-                       if (key == "namefile" )         { namefile = value;             }
-                       if (key == "orderfile" )        { orderfile = value;    }
-                       if (key == "groupfile" )        { groupfile = value;    }
+                       if (key == "name" )             { namefile = value;             }
+                       if (key == "order" )    { orderfile = value;    }
+                       if (key == "group" )    { groupfile = value;    }
                        if (key == "cutoff" )           { cutoff = value;               }
                        if (key == "precision" )        { precision = value;    }
                        if (key == "iters" )            { iters = value;                }
@@ -214,12 +216,14 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                        if (key == "line") {//stores lines to be used in a vector
                                lines.clear();
                                line = value;
+                               label = "";
                                splitAtDash(value, lines);
                                allLines = 0;
                        }
                        if (key == "label") {//stores lines to be used in a vector
                                labels.clear();
                                label = value;
+                               line = "";
                                splitAtDash(value, labels);
                                allLines = 0;
                        }
@@ -335,7 +339,7 @@ void GlobalData::clear() {
        method                  =       "furthest";
        fileroot                =       "";
        single                  =       "sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson-rarefraction";
-       rarefaction             =       "rarefaction";
+       rarefaction             =       "sobs";
        shared                  =       "sharedSobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN";
        sharedsummary   =   "sharedSobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN";
        summary                 =       "summary-chao-ace-jack-bootstrap-shannon-npshannon-simpson";