]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedjclass.cpp
started heatmap command
[mothur.git] / sharedjclass.cpp
index 6557a0f16b8d4eab412d82616e8d74cb99374b86..2c7d8c9422d4c4c95b74374f05e5f7b0291aa2d9 100644 (file)
@@ -25,9 +25,10 @@ EstOutput SharedJclass::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                        //store in temps to avoid multiple repetitive function calls
                        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++; }