]> git.donarmstrong.com Git - mothur.git/blobdiff - clustersplitcommand.cpp
Merge remote-tracking branch 'mothur/master'
[mothur.git] / clustersplitcommand.cpp
index bb9296fe93b25e663d8f0f226dfaf8b4fadc4b54..9cdd7b065b857e5ddb7eaacbc27e4c3af84a43cb 100644 (file)
@@ -198,7 +198,7 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        taxFile = validParameter.validFile(parameters, "taxonomy", true);
                        if (taxFile == "not open") { taxFile = ""; abort = true; }      
                        else if (taxFile == "not found") { taxFile = ""; }
-                       else {  m->setTaxonomyFile(taxFile); }
+                       else {  m->setTaxonomyFile(taxFile); if (splitmethod != "fasta") { splitmethod = "classify"; } }
                        
                        if ((phylipfile == "") && (columnfile == "") && (fastafile == "")) { 
                                //is there are current file available for either of these?
@@ -272,7 +272,7 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        m->mothurConvert(temp, processors);
                        
                        temp = validParameter.validFile(parameters, "splitmethod", false);      
-                       if (splitmethod != "fasta") {
+                       if ((splitmethod != "fasta") && (splitmethod != "classify")) {
                                if (temp == "not found")  { splitmethod = "distance"; }
                                else {  splitmethod = temp; }
                        }
@@ -286,7 +286,7 @@ ClusterSplitCommand::ClusterSplitCommand(string option)  {
                        
                        method = validParameter.validFile(parameters, "method", false);         if (method == "not found") { method = "average"; }
                        
-                       if ((method == "furthest") || (method == "nearest") || (method == "average")) { }
+                       if ((method == "furthest") || (method == "nearest") || (method == "average")) { m->mothurOut("Using splitmethod " + splitmethod + ".\n"); }
                        else { m->mothurOut("Not a valid clustering method.  Valid clustering algorithms are furthest, nearest or average."); m->mothurOutEndLine(); abort = true; }
                        
                        if ((splitmethod == "distance") || (splitmethod == "classify") || (splitmethod == "fasta")) { }
@@ -554,7 +554,7 @@ int ClusterSplitCommand::execute(){
                //sanity check
                if (processors > distName.size()) { processors = distName.size(); }
                
-               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                                if(processors == 1){
                                        listFileNames = cluster(distName, labels); //clusters individual files and returns names of list files
                                }else{
@@ -868,7 +868,7 @@ vector<string>  ClusterSplitCommand::createProcesses(vector< map<string, string>
         
         if (m->control_pressed) { return listFiles; }
        
-       #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+       #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                int process = 1;
                processIDS.clear();