X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=coverage.cpp;h=aebe66f1e0814f7a41fb9694403f87919fbcc660;hp=e7baf001fefe4d5de552c1cd6362eaa2b1333d2c;hb=1a20e24ee786195ab0e1cccd4f5aede7a88f3f4e;hpb=42b802c0006d8b13bd5b27ea48d032a85d3f2102 diff --git a/coverage.cpp b/coverage.cpp index e7baf00..aebe66f 100644 --- a/coverage.cpp +++ b/coverage.cpp @@ -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 > 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 + +/***********************************************************************/