X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=indicatorcommand.cpp;h=966810b1438bd7e9b4072f6a8cccd6cb2d105cee;hb=b72799e7908e2a3a0cf4f03e796b077a97ace6ac;hp=ab9e275279e0399182d458b7a6a64b81ba56c205;hpb=a44542a3c740cf957cff72ac71742f2fe48b0eaf;p=mothur.git diff --git a/indicatorcommand.cpp b/indicatorcommand.cpp index ab9e275..966810b 100644 --- a/indicatorcommand.cpp +++ b/indicatorcommand.cpp @@ -544,6 +544,7 @@ vector IndicatorCommand::getValues(vector< vector terms; float AijDenominator = 0.0; vector Bij; + //get overall abundance of each grouping for (int j = 0; j < groupings.size(); j++) { @@ -554,6 +555,7 @@ vector IndicatorCommand::getValues(vector< vectorgetAbundance(i) != 0) { numNotZero++; } } + //mean abundance float Aij = (totalAbund / (float) groupings[j].size()); terms.push_back(Aij); @@ -565,7 +567,7 @@ vector IndicatorCommand::getValues(vector< vector IndicatorCommand::getValues(vector< vector >& if (groupings[j][k]->getAbundance(i) != 0.0) { numNotZero++; } } - + + //mean abundance float Aij = (totalAbund / (float) groupings[j].size()); terms.push_back(Aij); @@ -621,7 +624,7 @@ vector IndicatorCommand::getValues(vector< vector >& float maxIndVal = 0.0; for (int j = 0; j < terms.size(); j++) { - float thisAij = (terms[j] / AijDenominator); + float thisAij = (terms[j] / AijDenominator); //relative abundance float thisValue = thisAij * Bij[j] * 100.0; //save largest