]> git.donarmstrong.com Git - mothur.git/commitdiff
fixed xp user bug with rarefact commands and cluster error checking
authorwestcott <westcott>
Mon, 4 May 2009 20:19:18 +0000 (20:19 +0000)
committerwestcott <westcott>
Mon, 4 May 2009 20:19:18 +0000 (20:19 +0000)
Mothur.xcodeproj/project.pbxproj
errorchecking.cpp
globaldata.cpp
mothur.h
npshannon.cpp
raredisplay.cpp

index 2de1905315b6c426acf009ed0772fd7708f0cc59..bfed0cb5a71a55ce2a2ea9d9726fbac4d95a4b28 100644 (file)
                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 */,
                                37D927D20F21331F001D4494 /* completelinkage.cpp */,
                                37D927D40F21331F001D4494 /* database.hpp */,
                                37D927D30F21331F001D4494 /* database.cpp */,
+                               7E4130F70F8E58FA00381DD0 /* dlibshuff.h */,
+                               7E4130F60F8E58FA00381DD0 /* dlibshuff.cpp */,
                                37D927D60F21331F001D4494 /* display.h */,
                                37D927D80F21331F001D4494 /* engine.hpp */,
                                37D927D70F21331F001D4494 /* engine.cpp */,
                                37D927E90F21331F001D4494 /* kmer.cpp */,
                                37D927EC0F21331F001D4494 /* kmerdb.hpp */,
                                37D927EB0F21331F001D4494 /* kmerdb.cpp */,
+                               7E412F420F8D213C00381DD0 /* libshuff.h */,
+                               7E412FE90F8D3E2C00381DD0 /* libshuff.cpp */,
                                37E3ED800F4D9D0D00B5DF02 /* mothur.h */,
                                37D927EF0F21331F001D4494 /* mothur.cpp */,
                                37D927F10F21331F001D4494 /* nameassignment.hpp */,
                                211C38310F961DD400FEE541 /* sharedutilities.h */,
                                211C38300F961DD400FEE541 /* sharedutilities.cpp */,
                                37D928420F21331F001D4494 /* singlelinkage.cpp */,
+                               7E412F470F8D21B600381DD0 /* slibshuff.h */,
+                               7E412F480F8D21B600381DD0 /* slibshuff.cpp */,
                                37D928480F21331F001D4494 /* summarydata.h */,
                                37D928490F21331F001D4494 /* summarydisplay.h */,
                                37519AB30F810FAE00FED5E8 /* venn.h */,
index 16933549c7539e73460ef7f8a84dd068f60d98be..728d4d27303a3c3b9d9ad602693ba4b309a36202 100644 (file)
@@ -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; 
index 312b314120adf6eef3beb5d09bf21517e103c5cc..ce10ee1bca9ea35dca648c97a49e1657a11509ee 100644 (file)
@@ -272,6 +272,8 @@ GlobalData::GlobalData() {
        //option definitions should go here...
        helpRequest = "";
        clear();
+       gListVector == NULL;            
+       gSparseMatrix == NULL;  
 }
 /*******************************************************/
 
index 8ad1645a57a5345a7f48ca8236d83963d8700afc..c1d93ed197fe2990c24ca2ba0d89f52f8fe8320e 100644 (file)
--- 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 <cstddef>
 
 //io libraries
 #include <iostream>
index faabc9874dbcd4b08739dc66cf2e8728c710fa48..73dd834748cedde6b6c12333f02f682b487bc7e5 100644 (file)
@@ -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;
index 6843ebe61b1d6c2bd650a296d286c9a3ec92b0af..3d50b2612f9c9cc8df9de5b48e5e55e260806fc6 100644 (file)
@@ -15,6 +15,7 @@ void RareDisplay::init(string label){
        try {
                this->label = label;
                if(nIters != 1){
+                       tempInFile.clear();
                        openOutputFile(tempOutName, tempOutFile);
                        openInputFile(tempInName, tempInFile);
                }