]> git.donarmstrong.com Git - mothur.git/blobdiff - shen.cpp
changes while testing
[mothur.git] / shen.cpp
index a2f61889c7a88e1b43c3646470dd96224a298519..dac12bd69e83fb635c5b1ab1433a776940332e8e 100644 (file)
--- a/shen.cpp
+++ b/shen.cpp
 EstOutput Shen::getValues(SAbundVector* rank){
 
        try {
-               globaldata = GlobalData::getInstance();
                
                data.resize(1,0);
                
                double n = (double)rank->getNumSeqs();
                double f1 = (double)rank->get(1);
                
-               int abund;
-               convert(globaldata->getAbund(), abund);
-               
                Ace* calc = new Ace(abund);
                EstOutput ace = calc->getValues(rank);
                
                double f0 = ace[0]-rank->getNumBins();
                
-               data[0] = f0 * (1 - pow(1 - f1/n/f0, m));
-
+               data[0] = f0 * (1 - pow(1 - f1/n/f0, f));
+               
+               delete calc;
+               
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Coverage class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "Shen", "getValues");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
-};
+}
 
 
 /***********************************************************************/