From: westcott Date: Mon, 4 May 2009 20:19:18 +0000 (+0000) Subject: fixed xp user bug with rarefact commands and cluster error checking X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=dc08123b7f14e2305e5bb2b3a8fcef96fc829b07 fixed xp user bug with rarefact commands and cluster error checking --- diff --git a/Mothur.xcodeproj/project.pbxproj b/Mothur.xcodeproj/project.pbxproj index 2de1905..bfed0cb 100644 --- a/Mothur.xcodeproj/project.pbxproj +++ b/Mothur.xcodeproj/project.pbxproj @@ -424,16 +424,10 @@ 08FB7795FE84155DC02AAC07 /* Source */ = { isa = PBXGroup; children = ( - 7E4130F60F8E58FA00381DD0 /* dlibshuff.cpp */, - 7E4130F70F8E58FA00381DD0 /* dlibshuff.h */, 37D927BA0F21331F001D4494 /* averagelinkage.cpp */, 37D928A60F2133C0001D4494 /* calculators */, 37D927C20F21331F001D4494 /* cluster.hpp */, 37D927C10F21331F001D4494 /* cluster.cpp */, - 7E412F470F8D21B600381DD0 /* slibshuff.h */, - 7E412F480F8D21B600381DD0 /* slibshuff.cpp */, - 7E412F420F8D213C00381DD0 /* libshuff.h */, - 7E412FE90F8D3E2C00381DD0 /* libshuff.cpp */, 37D928A90F2133E5001D4494 /* commands */, 37D927C60F21331F001D4494 /* collect.h */, 37D927C50F21331F001D4494 /* collect.cpp */, @@ -447,6 +441,8 @@ 37D927D20F21331F001D4494 /* completelinkage.cpp */, 37D927D40F21331F001D4494 /* database.hpp */, 37D927D30F21331F001D4494 /* database.cpp */, + 7E4130F70F8E58FA00381DD0 /* dlibshuff.h */, + 7E4130F60F8E58FA00381DD0 /* dlibshuff.cpp */, 37D927D60F21331F001D4494 /* display.h */, 37D927D80F21331F001D4494 /* engine.hpp */, 37D927D70F21331F001D4494 /* engine.cpp */, @@ -463,6 +459,8 @@ 37D927E90F21331F001D4494 /* kmer.cpp */, 37D927EC0F21331F001D4494 /* kmerdb.hpp */, 37D927EB0F21331F001D4494 /* kmerdb.cpp */, + 7E412F420F8D213C00381DD0 /* libshuff.h */, + 7E412FE90F8D3E2C00381DD0 /* libshuff.cpp */, 37E3ED800F4D9D0D00B5DF02 /* mothur.h */, 37D927EF0F21331F001D4494 /* mothur.cpp */, 37D927F10F21331F001D4494 /* nameassignment.hpp */, @@ -491,6 +489,8 @@ 211C38310F961DD400FEE541 /* sharedutilities.h */, 211C38300F961DD400FEE541 /* sharedutilities.cpp */, 37D928420F21331F001D4494 /* singlelinkage.cpp */, + 7E412F470F8D21B600381DD0 /* slibshuff.h */, + 7E412F480F8D21B600381DD0 /* slibshuff.cpp */, 37D928480F21331F001D4494 /* summarydata.h */, 37D928490F21331F001D4494 /* summarydisplay.h */, 37519AB30F810FAE00FED5E8 /* venn.h */, diff --git a/errorchecking.cpp b/errorchecking.cpp index 1693354..728d4d2 100644 --- a/errorchecking.cpp +++ b/errorchecking.cpp @@ -177,7 +177,7 @@ bool ErrorCheck::checkInput(string input) { validateReadFiles(); } - //are you trying to cluster before you have read something + //are you trying to cluster before you have read something if (((commandName == "cluster") && (globaldata->gSparseMatrix == NULL)) || ((commandName == "cluster") && (globaldata->gListVector == NULL))) { cout << "Before you use the cluster command, you first need to read in a distance matrix." << endl; diff --git a/globaldata.cpp b/globaldata.cpp index 312b314..ce10ee1 100644 --- a/globaldata.cpp +++ b/globaldata.cpp @@ -272,6 +272,8 @@ GlobalData::GlobalData() { //option definitions should go here... helpRequest = ""; clear(); + gListVector == NULL; + gSparseMatrix == NULL; } /*******************************************************/ diff --git a/mothur.h b/mothur.h index 8ad1645..c1d93ed 100644 --- a/mothur.h +++ b/mothur.h @@ -15,6 +15,7 @@ using namespace std; /* This file contains all the standard incudes we use in the project as well as some common utilities. */ +//#include //io libraries #include diff --git a/npshannon.cpp b/npshannon.cpp index faabc98..73dd834 100644 --- a/npshannon.cpp +++ b/npshannon.cpp @@ -28,7 +28,7 @@ EstOutput NPShannon::getValues(SAbundVector* rank){ double ChatPi = Chat*pi; if(ChatPi>0){ npShannon += rank->get(i) * ChatPi*log(ChatPi)/(1-pow(1-ChatPi,(double)sampled)); - cout << ChatPi << '\t' << rank->get(i) * ChatPi*log(ChatPi)/(1-pow(1-ChatPi,(double)sampled)) << endl; + //cout << ChatPi << '\t' << rank->get(i) * ChatPi*log(ChatPi)/(1-pow(1-ChatPi,(double)sampled)) << endl; } } npShannon = -npShannon; diff --git a/raredisplay.cpp b/raredisplay.cpp index 6843ebe..3d50b26 100644 --- a/raredisplay.cpp +++ b/raredisplay.cpp @@ -15,6 +15,7 @@ void RareDisplay::init(string label){ try { this->label = label; if(nIters != 1){ + tempInFile.clear(); openOutputFile(tempOutName, tempOutFile); openInputFile(tempInName, tempInFile); }