X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=sharedthetayc.cpp;h=315a61f1310f8381e7fab74546f059d1823f11f7;hb=2bb9267aa4b4ecdf8488b06605cc9f3f36fa4332;hp=4d8a5d91b67f5854b6a87b6df01dcdf93589fdba;hpb=e4c80376cc4533f66c8dfc18f3e1a86a60ac17fe;p=mothur.git diff --git a/sharedthetayc.cpp b/sharedthetayc.cpp index 4d8a5d9..315a61f 100644 --- a/sharedthetayc.cpp +++ b/sharedthetayc.cpp @@ -31,8 +31,8 @@ EstOutput ThetaYC::getValues(vector shared) { //get the total values we need to calculate the theta denominator sums for (int i = 0; i < shared[0]->size(); i++) { //store in temps to avoid multiple repetitive function calls - Atotal += (float)shared[0]->getAbundance(i); - Btotal += (float)shared[1]->getAbundance(i); + Atotal += (double)shared[0]->getAbundance(i); + Btotal += (double)shared[1]->getAbundance(i); } //calculate the theta denominator sums @@ -74,6 +74,7 @@ EstOutput ThetaYC::getValues(vector shared) { if (isnan(data[1]) || isinf(data[1])) { data[1] = 0; } if (isnan(data[2]) || isinf(data[2])) { data[2] = 0; } + data[0] = 1.0 - data[0]; return data; } catch(exception& e) {