]> git.donarmstrong.com Git - mothur.git/blobdiff - shen.cpp
worked on parselist and shared commands, removing memory leaks and allowing any numbe...
[mothur.git] / shen.cpp
index 61291a62554a3ccfb0a1b35bd761fb5bfcf1e881..3d1c2778387a0beec550a0c6086b9fb06281338d 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 = n - ace[0];
+               double f0 = ace[0]-rank->getNumBins();
                
                data[0] = f0 * (1 - pow(1 - f1/n/f0, m));
-
+               
+               delete calc;
+               
                return data;
        }
        catch(exception& e) {