From: Sarah Westcott Date: Wed, 9 May 2012 13:02:37 +0000 (-0400) Subject: cluster.split split method defaults to classify if taxonomy file is given with no... X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=5cbb9328400eabc6689da26738aceee394666dfa cluster.split split method defaults to classify if taxonomy file is given with no fast file. --- diff --git a/clustersplitcommand.cpp b/clustersplitcommand.cpp index 8a19f1d..9cdd7b0 100644 --- a/clustersplitcommand.cpp +++ b/clustersplitcommand.cpp @@ -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")) { }