From 5cbb9328400eabc6689da26738aceee394666dfa Mon Sep 17 00:00:00 2001 From: Sarah Westcott Date: Wed, 9 May 2012 09:02:37 -0400 Subject: [PATCH] cluster.split split method defaults to classify if taxonomy file is given with no fast file. --- clustersplitcommand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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")) { } -- 2.39.2