]> git.donarmstrong.com Git - mothur.git/blobdiff - globaldata.cpp
dist.seqs can now use n processors, and only outputs the phylip formatted distance...
[mothur.git] / globaldata.cpp
index bf28cc62ac9e7c232a03670f2a17654776459140..a3dc757cba2e9adf6aecc051f3a03d9875b92026 100644 (file)
@@ -44,8 +44,8 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                        cutoff = "1.0";
                }
                
-               //set default value for cutoff
-               if(commandName == "dist.seqs") {        cutoff = "1.0";         }
+               //set default value for cutoff and phylip
+               if (commandName == "dist.seqs") {       cutoff = "1.0";   phylipfile = "F";     }
 
                string key, value;              
                //reads in parameters and values
@@ -102,9 +102,6 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                                if(key == "maxlength")          {       maxLength = value;              }
                                if(key == "flip"        )               {       flip = value;                   }
                                if(key == "oligos"      )               {       oligoFile = value;              }
-                               if(key == "forward"     )               {       forMismatch = value;    }
-                               if(key == "reverse"     )               {       revMismatch = value;    }
-                               if(key == "barcode"     )               {       barMismatch = value;    }
                                        
                                if(key == "line") {//stores lines to be used in a vector
                                        lines.clear();
@@ -183,9 +180,6 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                        if(key == "maxlength")  {       maxLength = value;              }
                        if(key == "flip"        )       {       flip = value;                   }
                        if(key == "oligos"      )       {       oligoFile = value;              }
-                       if(key == "forward"     )       {       forMismatch = value;    }
-                       if(key == "reverse"     )       {       revMismatch = value;    }
-                       if(key == "barcode"     )       {       barMismatch = value;    }
                        
 
                        if(key == "line") {//stores lines to be used in a vector
@@ -214,9 +208,12 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                }
                
                //set format for shared
-               if((listfile != "") && (groupfile != "")) { format = "shared"; }
-               if((phylipfile != "") && (groupfile != "")) { format = "matrix"; }
-                               
+               if ((listfile != "") && (groupfile != "")) { format = "shared"; }
+               if ((phylipfile != "") && (groupfile != "")) { format = "matrix"; }
+               
+               //set default value for cutoff
+               if (commandName == "dist.seqs") {       format = "fasta";  inputFileName = fastafile;  fileroot = fastafile;    }
+                                               
                //input defaults for calculators
                if(commandName == "collect.single") {
 
@@ -347,9 +344,6 @@ string GlobalData::getMinLength()           {       return minLength;               }
 string GlobalData::getMaxLength()              {       return maxLength;               }
 string GlobalData::getFlip()                   {       return flip;                    }
 string GlobalData::getOligosFile()             {       return oligoFile;               }
-string GlobalData::getForwardMismatch()        {       return forMismatch;             }
-string GlobalData::getReverseMismatch()        {       return revMismatch;             }
-string GlobalData::getBarcodeMismatch()        {       return barMismatch;             }
 
 
 void GlobalData::setListFile(string file)              {       listfile = file;        inputFileName = file;                                   }
@@ -433,9 +427,6 @@ void GlobalData::clear() {
        minLength               =       "-1";
        maxLength               =       "-1";
        flip                    =       "0";
-       forMismatch             =       "0";
-       revMismatch             =       "0";
-       barMismatch             =       "0";
        oligoFile               =       "";
 }
 
@@ -479,9 +470,6 @@ void GlobalData::reset() {
        minLength               =       "-1";
        maxLength               =       "-1";
        flip                    =       "0";
-       forMismatch             =       "0";
-       revMismatch             =       "0";
-       barMismatch             =       "0";
        oligoFile               =       "";
        
 }