]> git.donarmstrong.com Git - mothur.git/blobdiff - preclustercommand.cpp
added keep dots to pcr.seqs. fixed pre.cluster name file name when group option is...
[mothur.git] / preclustercommand.cpp
index 8e4f3274a490679c85f992f8584605c877c84850..f2fbc80088b1adf2927ee78d5b1e02fbf9691cb1 100644 (file)
@@ -217,17 +217,19 @@ int PreClusterCommand::execute(){
                        m->mothurOutEndLine(); 
                        m->mothurOut("/******************************************/"); m->mothurOutEndLine(); 
                        m->mothurOut("Running command: unique.seqs(" + inputString + ")"); m->mothurOutEndLine(); 
-                       
+                       m->mothurCalling = true;
+            
                        Command* uniqueCommand = new DeconvoluteCommand(inputString);
                        uniqueCommand->execute();
                        
                        map<string, vector<string> > filenames = uniqueCommand->getOutputFiles();
                        
                        delete uniqueCommand;
-                       
+                       m->mothurCalling = false;
                        m->mothurOut("/******************************************/"); m->mothurOutEndLine(); 
                        
                        m->renameFile(filenames["fasta"][0], newFastaFile);
+            m->renameFile(filenames["name"][0], newNamesFile);
                        
                        m->mothurOut("It took " + toString(time(NULL) - start) + " secs to run pre.cluster."); m->mothurOutEndLine(); 
                                
@@ -302,7 +304,7 @@ int PreClusterCommand::createProcessesGroups(SequenceParser* parser, string newF
                        lines.push_back(linePair(startIndex, endIndex));
                }
                
-#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)          
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)         
                
                //loop through and create all the processes you want
                while (process != processors) {
@@ -553,6 +555,7 @@ int PreClusterCommand::readFASTA(){
                //inNames.close();
         
         if (lengths.size() > 1) { m->control_pressed = true; m->mothurOut("[ERROR]: your sequences are not all the same length. pre.cluster requires sequences to be aligned."); m->mothurOutEndLine(); }
+        else if (lengths.size() == 1) { length = *(lengths.begin()); }
         
                return alignSeqs.size();
        }
@@ -598,6 +601,7 @@ int PreClusterCommand::loadSeqs(map<string, string>& thisName, vector<Sequence>&
                }
                
         if (lengths.size() > 1) { error = true; m->mothurOut("[ERROR]: your sequences are not all the same length. pre.cluster requires sequences to be aligned."); m->mothurOutEndLine(); }
+        else if (lengths.size() == 1) { length = *(lengths.begin()); }
         
                //sanity check
                if (error) { m->control_pressed = true; }