From ec453945974b5c72af0bea042e3517312566d592 Mon Sep 17 00:00:00 2001 From: westcott Date: Wed, 13 May 2009 19:24:31 +0000 Subject: [PATCH] changed name of distance command to dist.seqs --- commandfactory.cpp | 2 +- errorchecking.cpp | 2 +- globaldata.cpp | 4 ++-- helpcommand.cpp | 12 ++++++------ validcommands.cpp | 2 +- validparameter.cpp | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/commandfactory.cpp b/commandfactory.cpp index ea43c48..c037515 100644 --- a/commandfactory.cpp +++ b/commandfactory.cpp @@ -92,7 +92,7 @@ Command* CommandFactory::getCommand(string commandName){ else if(commandName == "tree.shared") { command = new TreeGroupCommand(); } else if(commandName == "bootstrap.shared") { command = new BootSharedCommand(); } else if(commandName == "concensus") { command = new ConcensusCommand(); } - else if(commandName == "distance") { command = new DistanceCommand(); } + else if(commandName == "dist.seq") { command = new DistanceCommand(); } else { command = new NoCommand(); } return command; diff --git a/errorchecking.cpp b/errorchecking.cpp index f1279a4..c866ca0 100644 --- a/errorchecking.cpp +++ b/errorchecking.cpp @@ -246,7 +246,7 @@ bool ErrorCheck::checkInput(string input) { } } - if ((commandName == "filter.seqs") || (commandName == "distance")) { + if ((commandName == "filter.seqs") || (commandName == "dist.seq")) { if ((fastafile == "") && (nexusfile == "") && (clustalfile == "") && (phylipfile == "")) { cout << "You must read either a fasta, nexus, clustal, or phylip file before you can use the filter.seqs command." << endl; return false; } diff --git a/globaldata.cpp b/globaldata.cpp index 494b664..fddb5c9 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -43,7 +43,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ } //set default value for cutoff - if (commandName == "distance") { cutoff = "1.0"; } + if (commandName == "dist.seq") { cutoff = "1.0"; } string key, value; //reads in parameters and values @@ -215,7 +215,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){ Estimators.clear(); splitAtDash(calc, Estimators); } - if (commandName == "distance") { + if (commandName == "dist.seq") { if ((calc == "default") || (calc == "")) { calc = "onegap"; } Estimators.clear(); splitAtDash(calc, Estimators); diff --git a/helpcommand.cpp b/helpcommand.cpp index 5ea5158..9d7f5c8 100644 --- a/helpcommand.cpp +++ b/helpcommand.cpp @@ -70,17 +70,17 @@ int HelpCommand::execute(){ cout << "The deconvolute command parameter is fasta and it is required." << "\n"; cout << "The deconvolute command should be in the following format: " << "\n"; cout << "deconvolute(fasta=yourFastaFile) " << "\n"; - }else if (globaldata->helpRequest == "distance") { - cout << "The distance command reads a file containing sequences and creates a distance file." << "\n"; - cout << "The distance command parameters are fasta, phylip, clustal, nexus, calc, ends, cutoff and processors. " << "\n"; + }else if (globaldata->helpRequest == "dist.seq") { + cout << "The dist.seq command reads a file containing sequences and creates a distance file." << "\n"; + cout << "The dist.seq command parameters are fasta, phylip, clustal, nexus, calc, ends, cutoff and processors. " << "\n"; cout << "You must use one of the following parameters for your filename: fasta, phylip, clustal or nexus. " << "\n"; cout << "The calc parameter allows you to specify the method of calculating the distances. Your options are: nogaps, onegap or eachgap. The default is onegap." << "\n"; cout << "The ends parameter allows you to specify whether to include terminal gaps in distance. Your options are: T or F. The default is T." << "\n"; cout << "The cutoff parameter allows you to specify maximum distance to keep. The default is 1.0." << "\n"; cout << "The processors parameter allows you to specify number of processors to use. The default is 1, but you can use up to 4 processors." << "\n"; - cout << "The distance command should be in the following format: " << "\n"; - cout << "distance(fasta=yourFastaFile, calc=yourCalc, ends=yourEnds, cutoff= yourCutOff, processors=yourProcessors) " << "\n"; - cout << "Example distance(fasta=amazon.fasta, calc=eachgap, ends=F, cutoff= 2.0, processors=3)." << "\n"; + cout << "The dist.seq command should be in the following format: " << "\n"; + cout << "dist.seq(fasta=yourFastaFile, calc=yourCalc, ends=yourEnds, cutoff= yourCutOff, processors=yourProcessors) " << "\n"; + cout << "Example dist.seq(fasta=amazon.fasta, calc=eachgap, ends=F, cutoff= 2.0, processors=3)." << "\n"; cout << "Note: No spaces between parameter labels (i.e. calc), '=' and parameters (i.e.yourCalc)." << "\n" << "\n"; }else if (globaldata->helpRequest == "collect.single") { cout << "The collect.single command can only be executed after a successful read.otu command. WITH ONE EXECEPTION. " << "\n"; diff --git a/validcommands.cpp b/validcommands.cpp index ad55d0d..5549e63 100644 --- a/validcommands.cpp +++ b/validcommands.cpp @@ -22,7 +22,7 @@ ValidCommands::ValidCommands() { commands["get.oturep"] = "get.oturep"; commands["cluster"] = "cluster"; commands["deconvolute"] = "deconvolute"; - commands["distance"] = "distance"; + commands["dist.seqs"] = "dist.seqs"; commands["collect.single"] = "collect.single"; commands["collect.shared"] = "collect.shared"; commands["rarefaction.single"] = "rarefaction.single"; diff --git a/validparameter.cpp b/validparameter.cpp index e97df8b..8af4a81 100644 --- a/validparameter.cpp +++ b/validparameter.cpp @@ -290,7 +290,7 @@ void ValidParameters::initCommandParameters() { commandParameters["concensus"] = addParameters(concensusArray, sizeof(concensusArray)/sizeof(string)); string distanceArray[] = {"fasta","phylip","clustal","nexus", "calc", "ends", "cutoff", "processors"}; - commandParameters["distance"] = addParameters(distanceArray, sizeof(distanceArray)/sizeof(string)); + commandParameters["dist.seqs"] = addParameters(distanceArray, sizeof(distanceArray)/sizeof(string)); string quitArray[] = {}; commandParameters["quit"] = addParameters(quitArray, sizeof(quitArray)/sizeof(string)); -- 2.39.2