X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=commandfactory.cpp;h=c787d07e066ae08db298efb849966dcf0782113d;hb=df92022fc75c08b91cefa2c6ca4fd7b23eb480b0;hp=ddb70290936458fdbc5ca85d550fff1bc1d6ea96;hpb=315e38cf393c82be238da5b32574f225a020d25c;p=mothur.git diff --git a/commandfactory.cpp b/commandfactory.cpp index ddb7029..c787d07 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -134,7 +134,7 @@ CommandFactory::CommandFactory(){ commands["phylotype"] = "phylotype"; commands["mgcluster"] = "mgcluster"; commands["pre.cluster"] = "pre.cluster"; - commands["pca"] = "pca"; + commands["pcoa"] = "pcoa"; commands["otu.hierarchy"] = "otu.hierarchy"; commands["set.dir"] = "set.dir"; } @@ -155,11 +155,16 @@ Command* CommandFactory::getCommand(string commandName, string optionString){ delete command; //delete the old command //user has opted to redirect output from dir where input files are located to some other place - if (outputDir != "") { optionString += ", outputdir=" + outputDir; } + if (outputDir != "") { + if (optionString != "") { optionString += ", outputdir=" + outputDir; } + else { optionString += "outputdir=" + outputDir; } + } //user has opted to redirect input from dir where mothur.exe is located to some other place - if (inputDir != "") { optionString += ", inputdir=" + inputDir; } - + if (inputDir != "") { + if (optionString != "") { optionString += ", inputdir=" + inputDir; } + else { optionString += "inputdir=" + inputDir; } + } if(commandName == "read.dist") { command = new ReadDistCommand(optionString); } else if(commandName == "read.otu") { command = new ReadOtuCommand(optionString); } @@ -212,7 +217,7 @@ Command* CommandFactory::getCommand(string commandName, string optionString){ else if(commandName == "phylotype") { command = new PhylotypeCommand(optionString); } else if(commandName == "mgcluster") { command = new MGClusterCommand(optionString); } else if(commandName == "pre.cluster") { command = new PreClusterCommand(optionString); } - else if(commandName == "pca") { command = new PCACommand(optionString); } + else if(commandName == "pcoa") { command = new PCACommand(optionString); } else if(commandName == "otu.hierarchy") { command = new OtuHierarchyCommand(optionString); } else if(commandName == "set.dir") { command = new SetDirectoryCommand(optionString); } else { command = new NoCommand(optionString); }