]> git.donarmstrong.com Git - mothur.git/commitdiff
cluster.split split method defaults to classify if taxonomy file is given with no...
authorSarah Westcott <mothur.westcott@gmail.com>
Wed, 9 May 2012 13:02:37 +0000 (09:02 -0400)
committerSarah Westcott <mothur.westcott@gmail.com>
Wed, 9 May 2012 13:02:37 +0000 (09:02 -0400)
clustersplitcommand.cpp

index 8a19f1d4f1b7991e8a5155ed5156e638276d860e..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")) { }