From 0e051b4cfda410b0d441da6ff2f96d4bbe1d9e5a Mon Sep 17 00:00:00 2001 From: westcott Date: Thu, 7 Apr 2011 15:12:08 +0000 Subject: [PATCH] fixed bug with tree reading --- Mothur.xcodeproj/project.pbxproj | 9 ++++----- clustercommand.h | 4 ++-- clusterdoturcommand.h | 4 ++-- clustersplitcommand.h | 4 ++-- getcurrentcommand.cpp | 2 +- hclustercommand.h | 4 ++-- indicatorcommand.cpp | 5 +++++ mgclustercommand.h | 4 ++-- parsimonycommand.cpp | 7 +++++++ phylodiversitycommand.cpp | 6 ++++++ phylotypecommand.h | 4 ++-- sensspeccommand.cpp | 5 +++++ unifracunweightedcommand.cpp | 6 ++++++ unifracweightedcommand.cpp | 6 ++++++ 14 files changed, 52 insertions(+), 18 deletions(-) diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 00f51b2..9d88f25 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -1992,8 +1992,8 @@ GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = ( "MOTHUR_FILES=\"\\\"../release\\\"\"", - "VERSION=\"\\\"1.17.3\\\"\"", - "RELEASE_DATE=\"\\\"3/07/2011\\\"\"", + "VERSION=\"\\\"1.18.0\\\"\"", + "RELEASE_DATE=\"\\\"4/11/2011\\\"\"", ); GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; @@ -2025,9 +2025,8 @@ GCC_MODEL_TUNING = ""; GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = ( - "MOTHUR_FILES=\"\\\"../release\\\"\"", - "VERSION=\"\\\"1.15.0\\\"\"", - "RELEASE_DATE=\"\\\"12/10/2010\\\"\"", + "VERSION=\"\\\"1.18.0\\\"\"", + "RELEASE_DATE=\"\\\"4/11/2011\\\"\"", ); GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; diff --git a/clustercommand.h b/clustercommand.h index 368760a..bda6140 100644 --- a/clustercommand.h +++ b/clustercommand.h @@ -32,8 +32,8 @@ public: ~ClusterCommand(); vector setParameters(); - string getCommandName() { return "cluster"; } - string getCommandCategory() { return "OTU-Based Approaches"; } + string getCommandName() { return "cluster"; } + string getCommandCategory() { return "Clustering"; } string getHelpString(); int execute(); diff --git a/clusterdoturcommand.h b/clusterdoturcommand.h index 5358488..f435a98 100644 --- a/clusterdoturcommand.h +++ b/clusterdoturcommand.h @@ -25,8 +25,8 @@ public: ~ClusterDoturCommand(){} vector setParameters(); - string getCommandName() { return "cluster.classic"; } - string getCommandCategory() { return "OTU-Based Approaches"; } + string getCommandName() { return "cluster.classic"; } + string getCommandCategory() { return "Clustering"; } string getHelpString(); int execute(); diff --git a/clustersplitcommand.h b/clustersplitcommand.h index 28c7d23..bdefb42 100644 --- a/clustersplitcommand.h +++ b/clustersplitcommand.h @@ -26,8 +26,8 @@ public: ~ClusterSplitCommand() {} vector setParameters(); - string getCommandName() { return "cluster.split"; } - string getCommandCategory() { return "OTU-Based Approaches"; } + string getCommandName() { return "cluster.split"; } + string getCommandCategory() { return "Clustering"; } string getHelpString(); int execute(); diff --git a/getcurrentcommand.cpp b/getcurrentcommand.cpp index 7bfae20..2f67123 100644 --- a/getcurrentcommand.cpp +++ b/getcurrentcommand.cpp @@ -134,7 +134,7 @@ int GetCurrentCommand::execute(){ }else if (types[i] == "accnos") { m->setAccnosFile(""); }else if (types[i] == "taxonomy") { - m->setTaxonomyFile(""); + m->setTaxonomyFile(""); }else if (types[i] == "all") { m->clearCurrentFiles(); }else { diff --git a/hclustercommand.h b/hclustercommand.h index 5fbdb3d..9241e94 100644 --- a/hclustercommand.h +++ b/hclustercommand.h @@ -36,8 +36,8 @@ public: ~HClusterCommand(){} vector setParameters(); - string getCommandName() { return "hcluster"; } - string getCommandCategory() { return "OTU-Based Approaches"; } + string getCommandName() { return "hcluster"; } + string getCommandCategory() { return "Clustering"; } string getHelpString(); int execute(); diff --git a/indicatorcommand.cpp b/indicatorcommand.cpp index 01bc2f1..c25e4fa 100644 --- a/indicatorcommand.cpp +++ b/indicatorcommand.cpp @@ -90,6 +90,10 @@ IndicatorCommand::IndicatorCommand(string option) { } m->runParse = true; + m->Groups.clear(); + m->namesOfGroups.clear(); + m->Treenames.clear(); + m->names.clear(); vector tempOutNames; outputTypes["tree"] = tempOutNames; @@ -231,6 +235,7 @@ int IndicatorCommand::execute(){ // reading tree info // /***************************************************/ string groupfile = ""; + m->setTreeFile(treefile); Tree* tree = new Tree(treefile); delete tree; //extracts names from tree to make faked out groupmap treeMap = new TreeMap(); bool mismatch = false; diff --git a/mgclustercommand.h b/mgclustercommand.h index a51fec5..c23534f 100644 --- a/mgclustercommand.h +++ b/mgclustercommand.h @@ -29,8 +29,8 @@ public: ~MGClusterCommand(){} vector setParameters(); - string getCommandName() { return "mgcluster"; } - string getCommandCategory() { return "OTU-Based Approaches"; } + string getCommandName() { return "mgcluster"; } + string getCommandCategory() { return "Clustering"; } string getHelpString(); int execute(); diff --git a/parsimonycommand.cpp b/parsimonycommand.cpp index be64ec2..1be4697 100644 --- a/parsimonycommand.cpp +++ b/parsimonycommand.cpp @@ -125,6 +125,10 @@ ParsimonyCommand::ParsimonyCommand(string option) { } m->runParse = true; + m->Groups.clear(); + m->namesOfGroups.clear(); + m->Treenames.clear(); + m->names.clear(); outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){ outputDir = ""; } @@ -188,6 +192,9 @@ int ParsimonyCommand::execute() { //randomtree will tell us if user had their own treefile or if they just want the random distribution //user has entered their own tree if (randomtree == "") { + + m->setTreeFile(treefile); + if (groupfile != "") { //read in group map info. tmap = new TreeMap(groupfile); diff --git a/phylodiversitycommand.cpp b/phylodiversitycommand.cpp index 48d8555..d15899c 100644 --- a/phylodiversitycommand.cpp +++ b/phylodiversitycommand.cpp @@ -136,6 +136,10 @@ PhyloDiversityCommand::PhyloDiversityCommand(string option) { } m->runParse = true; + m->Groups.clear(); + m->namesOfGroups.clear(); + m->Treenames.clear(); + m->names.clear(); //check for required parameters treefile = validParameter.validFile(parameters, "tree", true); @@ -210,6 +214,8 @@ int PhyloDiversityCommand::execute(){ if (abort == true) { if (calledHelp) { return 0; } return 2; } + m->setTreeFile(treefile); + //read in group map info. tmap = new TreeMap(groupfile); tmap->readMap(); diff --git a/phylotypecommand.h b/phylotypecommand.h index 36e679f..30a5782 100644 --- a/phylotypecommand.h +++ b/phylotypecommand.h @@ -24,8 +24,8 @@ public: ~PhylotypeCommand(){} vector setParameters(); - string getCommandName() { return "phylotype"; } - string getCommandCategory() { return "OTU-Based Approaches"; } + string getCommandName() { return "phylotype"; } + string getCommandCategory() { return "Clustering"; } string getHelpString(); int execute(); diff --git a/sensspeccommand.cpp b/sensspeccommand.cpp index 7c4dc13..c7f67b4 100644 --- a/sensspeccommand.cpp +++ b/sensspeccommand.cpp @@ -208,6 +208,11 @@ int SensSpecCommand::execute(){ if(format == "phylip") { processPhylip(); } else if(format == "column") { processColumn(); } + m->mothurOutEndLine(); + m->mothurOut("Output File Name: "); m->mothurOutEndLine(); + m->mothurOut(sensSpecFileName); m->mothurOutEndLine(); + m->mothurOutEndLine(); + return 0; } diff --git a/unifracunweightedcommand.cpp b/unifracunweightedcommand.cpp index eef37bd..a9ca4d0 100644 --- a/unifracunweightedcommand.cpp +++ b/unifracunweightedcommand.cpp @@ -133,6 +133,10 @@ UnifracUnweightedCommand::UnifracUnweightedCommand(string option) { } m->runParse = true; + m->Groups.clear(); + m->namesOfGroups.clear(); + m->Treenames.clear(); + m->names.clear(); //check for required parameters treefile = validParameter.validFile(parameters, "tree", true); @@ -206,6 +210,8 @@ int UnifracUnweightedCommand::execute() { if (abort == true) { if (calledHelp) { return 0; } return 2; } + m->setTreeFile(treefile); + if (groupfile != "") { //read in group map info. tmap = new TreeMap(groupfile); diff --git a/unifracweightedcommand.cpp b/unifracweightedcommand.cpp index 7915cac..f868129 100644 --- a/unifracweightedcommand.cpp +++ b/unifracweightedcommand.cpp @@ -133,6 +133,10 @@ UnifracWeightedCommand::UnifracWeightedCommand(string option) { } m->runParse = true; + m->Groups.clear(); + m->namesOfGroups.clear(); + m->Treenames.clear(); + m->names.clear(); //check for required parameters treefile = validParameter.validFile(parameters, "tree", true); @@ -200,6 +204,8 @@ int UnifracWeightedCommand::execute() { if (abort == true) { if (calledHelp) { return 0; } return 2; } + m->setTreeFile(treefile); + if (groupfile != "") { //read in group map info. tmap = new TreeMap(groupfile); -- 2.39.2