//**********************************************************************************************************************
AlignCommand::AlignCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
BinSeqCommand::BinSeqCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
BootSharedCommand::BootSharedCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["tree"] = tempOutNames;
//**********************************************************************************************************************
ChimeraBellerophonCommand::ChimeraBellerophonCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["chimera"] = tempOutNames;
//**********************************************************************************************************************
ChopSeqsCommand::ChopSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
ClassifyOtuCommand::ClassifyOtuCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["constaxonomy"] = tempOutNames;
//**********************************************************************************************************************
ClassifySeqsCommand::ClassifySeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["taxonomy"] = tempOutNames;
//**********************************************************************************************************************
ClearcutCommand::ClearcutCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["tree"] = tempOutNames;
//**********************************************************************************************************************
ClusterCommand::ClusterCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["list"] = tempOutNames;
//**********************************************************************************************************************
ClusterFragmentsCommand::ClusterFragmentsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
ClusterSplitCommand::ClusterSplitCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["list"] = tempOutNames;
//**********************************************************************************************************************
CollectCommand::CollectCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["sobs"] = tempOutNames;
//**********************************************************************************************************************
CollectSharedCommand::CollectSharedCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["sharedchao"] = tempOutNames;
//**********************************************************************************************************************
ConcensusCommand::ConcensusCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["tree"] = tempOutNames;
//**********************************************************************************************************************
DeconvoluteCommand::DeconvoluteCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
DegapSeqsCommand::DegapSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
DeUniqueSeqsCommand::DeUniqueSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
DistanceCommand::DistanceCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["phylip"] = tempOutNames;
//**********************************************************************************************************************
FilterSeqsCommand::FilterSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
GetgroupCommand::GetgroupCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["bootgroup"] = tempOutNames;
//**********************************************************************************************************************
GetLineageCommand::GetLineageCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
GetListCountCommand::GetListCountCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["otu"] = tempOutNames;
//**********************************************************************************************************************
GetOTURepCommand::GetOTURepCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
GetRAbundCommand::GetRAbundCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["rabund"] = tempOutNames;
//**********************************************************************************************************************
GetRelAbundCommand::GetRelAbundCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["relabund"] = tempOutNames;
//**********************************************************************************************************************
GetSAbundCommand::GetSAbundCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["sabund"] = tempOutNames;
//**********************************************************************************************************************
GetSeqsCommand::GetSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
GetSharedOTUCommand::GetSharedOTUCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
HClusterCommand::HClusterCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["list"] = tempOutNames;
//**********************************************************************************************************************
HeatMapCommand::HeatMapCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["svg"] = tempOutNames;
//**********************************************************************************************************************
HeatMapSimCommand::HeatMapSimCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["svg"] = tempOutNames;
//**********************************************************************************************************************
LibShuffCommand::LibShuffCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["coverage"] = tempOutNames;
//**********************************************************************************************************************
ListSeqsCommand::ListSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["accnos"] = tempOutNames;
//**********************************************************************************************************************
MakeGroupCommand::MakeGroupCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["group"] = tempOutNames;
//**********************************************************************************************************************
MatrixOutputCommand::MatrixOutputCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["phylip"] = tempOutNames;
//**********************************************************************************************************************
MergeFileCommand::MergeFileCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["merge"] = tempOutNames;
//**********************************************************************************************************************
MetaStatsCommand::MetaStatsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["metastats"] = tempOutNames;
//**********************************************************************************************************************
MGClusterCommand::MGClusterCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["list"] = tempOutNames;
//**********************************************************************************************************************
NormalizeSharedCommand::NormalizeSharedCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["shared"] = tempOutNames;
//**********************************************************************************************************************
OtuHierarchyCommand::OtuHierarchyCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["otuheirarchy"] = tempOutNames;
//**********************************************************************************************************************
PairwiseSeqsCommand::PairwiseSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["phylip"] = tempOutNames;
//**********************************************************************************************************************
ParseFastaQCommand::ParseFastaQCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
ParseListCommand::ParseListCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["list"] = tempOutNames;
//**********************************************************************************************************************
ParseSFFCommand::ParseSFFCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["flow"] = tempOutNames;
//**********************************************************************************************************************
ParsimonyCommand::ParsimonyCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["parsimony"] = tempOutNames;
//**********************************************************************************************************************
PCACommand::PCACommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["pcoa"] = tempOutNames;
//**********************************************************************************************************************
PhyloDiversityCommand::PhyloDiversityCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["phylodiv"] = tempOutNames;
//**********************************************************************************************************************
PhylotypeCommand::PhylotypeCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["list"] = tempOutNames;
bool PipelineCommand::checkForValidAndRequiredParameters(string name, string options, map<string, vector<string> >& mothurMadeFiles){
try {
-
+
if (name == "system") { return false; }
//get shell of the command so we can check to make sure its valid without running it
Command* command = cFactory->getCommand(name);
-
+
//check to make sure all parameters are valid for command
vector<string> validParameters = command->getValidParameters();
map<string, vector<string> >::iterator itMade;
for (it = parameters.begin(); it != parameters.end(); it++) {
+
if (validParameter.isValidParameter(it->first, validParameters, it->second) != true) { return true; } // not valid
if (it->second == "mothurmade") {
itMade = mothurMadeFiles.find(it->first);
}
}
}
-
+
//is the command missing any required
vector<string> requiredParameters = command->getRequiredParameters();
if (!hasOr) { m->mothurOut(name + " requires the " + requiredParameters[i] + " parameter, please correct."); m->mothurOutEndLine(); }
}
}
-
+
// if all are needed and not all are found
if ((!hasOr) && (numFound != requiredParameters.size())) { return true; }
//if one is needed and none are found
for (itMade = thisCommandsFile.begin(); itMade != thisCommandsFile.end(); itMade++) {
mothurMadeFiles[itMade->first] = itMade->second; //adds any new types
}
-
+
return false;
}
catch(exception& e) {
CommandOptionParser parser(nextCommand);
string commandName = parser.getCommandString();
string options = parser.getOptionString();
-
- if (options != "") {
+
+ if ((options != "") && (commandName != "system")) {
bool error = fillInMothurMade(options, mothurMadeFiles);
if (error) { in.close(); return 0; }
}
//**********************************************************************************************************************
bool PipelineCommand::fillInMothurMade(string& options, map<string, vector<string> >& mothurMadeFiles){
try {
+
OptionParser parser(options);
map<string, string> parameters = parser.getParameters();
map<string, string>::iterator it;
//**********************************************************************************************************************
PreClusterCommand::PreClusterCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
RareFactCommand::RareFactCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["rarefaction"] = tempOutNames;
//**********************************************************************************************************************
RareFactSharedCommand::RareFactSharedCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["sharedrarefaction"] = tempOutNames;
//**********************************************************************************************************************
ReadOtuCommand::ReadOtuCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["rabund"] = tempOutNames;
//**********************************************************************************************************************
RemoveLineageCommand::RemoveLineageCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
RemoveSeqsCommand::RemoveSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
ReverseSeqsCommand::ReverseSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
ScreenSeqsCommand::ScreenSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
AlignCheckCommand::AlignCheckCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["aligncheck"] = tempOutNames;
//**********************************************************************************************************************
SensSpecCommand::SensSpecCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["sensspec"] = tempOutNames;
//**********************************************************************************************************************
SeqErrorCommand::SeqErrorCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["error"] = tempOutNames;
//**********************************************************************************************************************
SeqSummaryCommand::SeqSummaryCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["summary"] = tempOutNames;
//**********************************************************************************************************************
SffInfoCommand::SffInfoCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
}
//**********************************************************************************************************************
SharedCommand::SharedCommand(){
- try {
+ try {
+
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["rabund"] = tempOutNames;
f >> label >> hold;
data.assign(hold, "");
-
+
for(int i=0;i<hold;i++){
f >> inputData;
set(i, inputData);
}
-
+
}
catch(exception& e) {
m->errorOut(e, "SharedListVector", "SharedListVector");
if(nNames_new > maxRank) { maxRank = nNames_new; }
numSeqs += (nNames_new - nNames_old);
+
+
}
catch(exception& e) {
m->errorOut(e, "SharedListVector", "set");
//**********************************************************************************************************************
SplitAbundCommand::SplitAbundCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["list"] = tempOutNames;
//**********************************************************************************************************************
SplitGroupCommand::SplitGroupCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
SummaryCommand::SummaryCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["summary"] = tempOutNames;
//**********************************************************************************************************************
SummarySharedCommand::SummarySharedCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["summary"] = tempOutNames;
//**********************************************************************************************************************
TreeGroupCommand::TreeGroupCommand(){
try {
+ abort = true;
+ globaldata = GlobalData::getInstance();
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["tree"] = tempOutNames;
//**********************************************************************************************************************
TrimSeqsCommand::TrimSeqsCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["fasta"] = tempOutNames;
//**********************************************************************************************************************
UnifracUnweightedCommand::UnifracUnweightedCommand(){
try {
+ globaldata = GlobalData::getInstance();
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["unweighted"] = tempOutNames;
//**********************************************************************************************************************
UnifracWeightedCommand::UnifracWeightedCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["weighted"] = tempOutNames;
//**********************************************************************************************************************
VennCommand::VennCommand(){
try {
+ abort = true;
//initialize outputTypes
vector<string> tempOutNames;
outputTypes["svg"] = tempOutNames;