]> git.donarmstrong.com Git - mothur.git/blobdiff - clustersplitcommand.cpp
paralellized parsimony, unifrac.unweighted, phylo.diversity, indicator commands for...
[mothur.git] / clustersplitcommand.cpp
index 6d3c86ff1fa2efb62d46618f372706fd117c002a..74867ebdeb0ec271d07d727b7cf9c8d19aa13284 100644 (file)
@@ -439,19 +439,18 @@ int ClusterSplitCommand::execute(){
                vector< map<string, string> > distName = split->getDistanceFiles();  //returns map of distance files -> namefile sorted by distance file size
                delete split;
                
+        if (m->debug) { m->mothurOut("[DEBUG]: distName.size() = " + toString(distName.size()) + ".\n"); }
+                
                //output a merged distance file
-               if (splitmethod == "fasta")             { createMergedDistanceFile(distName); }
-                       
+               //if (splitmethod == "fasta")           { createMergedDistanceFile(distName); }
                                
                if (m->control_pressed) { return 0; }
                
                m->mothurOut("It took " + toString(time(NULL) - estart) + " seconds to split the distance file."); m->mothurOutEndLine();
                estart = time(NULL);
-                
+              
         if (!runCluster) { 
-#ifdef USE_MPI
-    }
-#endif 
+
                 m->mothurOutEndLine();
                 m->mothurOut("Output File Names: "); m->mothurOutEndLine();
                 for (int i = 0; i < distName.size(); i++) {    m->mothurOut(distName[i].begin()->first); m->mothurOutEndLine(); m->mothurOut(distName[i].begin()->second); m->mothurOutEndLine();      }
@@ -459,7 +458,7 @@ int ClusterSplitCommand::execute(){
                 return 0;
                 
         }
-                
+   
                //****************** break up files between processes and cluster each file set ******************************//
        #ifdef USE_MPI
                        ////you are process 0 from above////
@@ -947,7 +946,7 @@ vector<string>  ClusterSplitCommand::createProcesses(vector< map<string, string>
             if ((processToAssign-1) == 1) { m->mothurOut(distName[i].begin()->first + "\n"); }
         }
         
-        //not lets reverse the order of ever other process, so we balance big files running with little ones
+        //now lets reverse the order of ever other process, so we balance big files running with little ones
         for (int i = 0; i < processors; i++) {
             //cout << i << endl;
             int remainder = ((i+1) % processors);
@@ -1169,7 +1168,7 @@ string ClusterSplitCommand::clusterClassicFile(string thisDistFile, string thisN
             cluster->readPhylipFile(thisDistFile, nameMap);
                }else if (countfile != "") {
             ct = new CountTable();
-            ct->readTable(thisNamefile);
+            ct->readTable(thisNamefile, false);
             cluster->readPhylipFile(thisDistFile, ct);
         }
         tag = cluster->getTag();
@@ -1297,7 +1296,7 @@ string ClusterSplitCommand::clusterFile(string thisDistFile, string thisNamefile
             read->read(nameMap);
                }else if (countfile != "") {
             ct = new CountTable();
-            ct->readTable(thisNamefile);
+            ct->readTable(thisNamefile, false);
             read->read(ct);
         }else { read->read(nameMap); }