]> git.donarmstrong.com Git - mothur.git/blobdiff - coverage.cpp
added modify names parameter to set.dir
[mothur.git] / coverage.cpp
index e7baf001fefe4d5de552c1cd6362eaa2b1333d2c..aebe66f1e0814f7a41fb9694403f87919fbcc660 100644 (file)
@@ -2,39 +2,28 @@
  *  coverage.cpp
  *  Mothur
  *
- *  Created by Sarah Westcott on 3/9/09.
- *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
+ *  Created by Pat Schloss on 4/22/09.
+ *  Copyright 2009 Patrick D. Schloss. All rights reserved.
  *
  */
 
 #include "coverage.h"
 
-//**********************************************************************************************************************
-vector< vector<float> > Coverage::getValues(FullMatrix*, float) {
+/***********************************************************************/
+EstOutput Coverage::getValues(SAbundVector* rank){
+
        try {
-               globaldata = GlobalData::getInstance();
-               numGroups = globaldata->Groups.size();
-               
-               //initialize data
-               data.resize(numGroups);
-               for (int l = 0; l < data.size(); l++) {
-                       data[l].push_back(0.0);
-               }
+               data.resize(1,0);
 
-               /**************************************/
-               //get the minumums for each comparision
-               /**************************************/
+               data[0] = 1. - rank->get(1) / (double)rank->getNumSeqs();
+               
                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, "Coverage", "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);
-       }       
 }
-//**********************************************************************************************************************
 
-       
\ No newline at end of file
+
+/***********************************************************************/