]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedsorclass.cpp
started heatmap command
[mothur.git] / sharedsorclass.cpp
index c9debf7748662b8ebc2464f3d2e70fd7610a72ce..81d8d86b7d295502dc2d75b85cd5accdbc167cdc 100644 (file)
@@ -26,8 +26,9 @@ EstOutput SharedSorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVec
                        tempA = shared1->getAbundance(i);
                        tempB = shared2->getAbundance(i);
 
-                       S1 += tempA;
-                       S2 += tempB;
+                       //find number of bins in shared1 and shared2
+                       if (tempA != 0) { S1++; }
+                       if (tempB != 0) { S2++; } 
                        
                        //they are shared
                        if ((tempA != 0) && (tempB != 0)) {     S12++; }