X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=classifyseqscommand.cpp;h=4e244905ff6b755fd064617368506b9160770048;hb=ffc44592ff7ae94f14f9e21f87198e33d323cd1d;hp=0504e6635802c3f6e3e186e4568675906774b3ff;hpb=57b3c96832667c1b70d4d526331f52e3d49e8237;p=mothur.git diff --git a/classifyseqscommand.cpp b/classifyseqscommand.cpp index 0504e66..4e24490 100644 --- a/classifyseqscommand.cpp +++ b/classifyseqscommand.cpp @@ -467,7 +467,6 @@ ClassifySeqsCommand::ClassifySeqsCommand(string option) { } } - } catch(exception& e) { m->errorOut(e, "ClassifySeqsCommand", "ClassifySeqsCommand"); @@ -486,7 +485,7 @@ ClassifySeqsCommand::~ClassifySeqsCommand(){ int ClassifySeqsCommand::execute(){ try { if (abort == true) { if (calledHelp) { return 0; } return 2; } - + if(method == "bayesian"){ classify = new Bayesian(taxonomyFileName, templateFileName, search, kmerSize, cutoff, iters, rand(), flip); } else if(method == "knn"){ classify = new Knn(taxonomyFileName, templateFileName, search, kmerSize, gapOpen, gapExtend, match, misMatch, numWanted, rand()); } else { @@ -507,8 +506,8 @@ int ClassifySeqsCommand::execute(){ string RippedTaxName = m->getRootName(m->getSimpleName(baseTName)); RippedTaxName = m->getExtension(RippedTaxName.substr(0, RippedTaxName.length()-1)); if (RippedTaxName[0] == '.') { RippedTaxName = RippedTaxName.substr(1, RippedTaxName.length()); } - RippedTaxName += "."; - + if (RippedTaxName != "") { RippedTaxName += "."; } + if (outputDir == "") { outputDir += m->hasPath(fastaFileNames[s]); } string newTaxonomyFile = outputDir + m->getRootName(m->getSimpleName(fastaFileNames[s])) + RippedTaxName + "taxonomy"; string newaccnosFile = outputDir + m->getRootName(m->getSimpleName(fastaFileNames[s])) + RippedTaxName + "flip.accnos";