]> git.donarmstrong.com Git - mothur.git/blob - coverage.cpp
441a029c264c913e420c4c81ac7d9d3191332709
[mothur.git] / coverage.cpp
1 /*
2  *  coverage.cpp
3  *  Mothur
4  *
5  *  Created by Pat Schloss on 4/22/09.
6  *  Copyright 2009 Patrick D. Schloss. All rights reserved.
7  *
8  */
9
10 #include "coverage.h"
11
12 /***********************************************************************/
13 EstOutput Coverage::getValues(SAbundVector* rank){
14
15         try {
16                 data.resize(1,0);
17
18                 data[0] = 1. - rank->get(1) / (double)rank->getNumSeqs();
19                 
20                 return data;
21         }
22         catch(exception& e) {
23                 cout << "Standard Error: " << e.what() << " has occurred in the Coverage class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
24                 exit(1);
25         }
26         catch(...) {
27                 cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
28                 exit(1);
29         }       
30 }
31
32
33 /***********************************************************************/