]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeraccodecommand.cpp
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / chimeraccodecommand.cpp
index 321ae77cf743420284e4dfac274d9c88b9b4557f..af6e33a1254adc623948604100f8b9109e6c18e6 100644 (file)
@@ -223,13 +223,13 @@ ChimeraCcodeCommand::ChimeraCcodeCommand(string option)  {
                        
                        temp = validParameter.validFile(parameters, "processors", false);       if (temp == "not found"){       temp = m->getProcessors();      }
                        m->setProcessors(temp);
-                       convert(temp, processors);
+                       m->mothurConvert(temp, processors);
                        
                        temp = validParameter.validFile(parameters, "window", false);                   if (temp == "not found") { temp = "0"; }
-                       convert(temp, window);
+                       m->mothurConvert(temp, window);
                        
                        temp = validParameter.validFile(parameters, "numwanted", false);                if (temp == "not found") { temp = "20"; }
-                       convert(temp, numwanted);
+                       m->mothurConvert(temp, numwanted);
                        
                        temp = validParameter.validFile(parameters, "save", false);                     if (temp == "not found"){       temp = "f";                             }
                        save = m->isTrue(temp); 
@@ -390,14 +390,16 @@ int ChimeraCcodeCommand::execute(){
 
                        outHeader.close();
                        
-                       vector<unsigned long long> positions = m->divideFile(fastaFileNames[s], processors);
-                               
-                       for (int i = 0; i < (positions.size()-1); i++) {
-                               lines.push_back(new linePair(positions[i], positions[(i+1)]));
-                       }       
+                       
                        
                        //break up file
                        #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+                               vector<unsigned long long> positions = m->divideFile(fastaFileNames[s], processors);
+                       
+                               for (int i = 0; i < (positions.size()-1); i++) {
+                                       lines.push_back(new linePair(positions[i], positions[(i+1)]));
+                               }       
+                       
                                if(processors == 1){
                                                                                
                                        numSeqs = driver(lines[0], outputFileName, fastaFileNames[s], accnosFileName);
@@ -436,6 +438,7 @@ int ChimeraCcodeCommand::execute(){
                                }
 
                        #else
+                               lines.push_back(new linePair(0, 1000));
                                numSeqs = driver(lines[0], outputFileName, fastaFileNames[s], accnosFileName);
                                
                                if (m->control_pressed) { m->mothurRemove(outputFileName); m->mothurRemove(tempHeader); m->mothurRemove(accnosFileName); for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]);        } for (int i = 0; i < lines.size(); i++) {  delete lines[i];  } outputTypes.clear();  lines.clear(); delete chimera; return 0; }