X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=rarecalc.cpp;fp=rarecalc.cpp;h=0000000000000000000000000000000000000000;hb=4a877efa127e56e81a21f53cfdbbfd3bfbe8c4ff;hp=9145061255d415eb7a48749bdbaaa405b78425fd;hpb=a6cf29fa4dac0909c7582cb1094151d34093ee76;p=mothur.git diff --git a/rarecalc.cpp b/rarecalc.cpp deleted file mode 100644 index 9145061..0000000 --- a/rarecalc.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * rarecalc.cpp - * Dotur - * - * Created by Sarah Westcott on 1/7/09. - * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. - * - */ - -#include "rarecalc.h" - -/***********************************************************************/ - -EstOutput RareCalc::getValues(int n){ - try { - EstOutput output(3,0); - - double richness = (double)numBins; - double varS = 0.0000; - - double varTerm1 = 0.0000; - double varTerm2 = 0.0000; - - double rSummation = 0; - for(int i=0;iget(i); - rSummation += (bMatrix[N_ni][n]); - - varTerm1 += (bMatrix[N_ni][n] * (1.0 - bMatrix[N_ni][n] / bMatrix[numSeqs][n])); - - for(int j=i+1;jget(j)][n] - bMatrix[N_ni][n] * bMatrix[numSeqs-bins->get(j)][n] / bMatrix[numSeqs][n]); - } - - } - richness -= (rSummation / bMatrix[numSeqs][n]); - varS = (varTerm1 + 2 * varTerm2) / bMatrix[numSeqs][n]; - float sd = pow(varS, 0.5); - - - output[0] = richness; - output[1] = richness - 1.96 * sd; - output[2] = richness + 1.96 * sd; - - return output; - } - catch(exception& e) { - m->errorOut(e, "RareCalc", "getValues"); - exit(1); - } -} - -/***********************************************************************/