]> git.donarmstrong.com Git - mothur.git/blobdiff - matrixoutputcommand.h
working on pam
[mothur.git] / matrixoutputcommand.h
index 8a04c96a32ed6fa769a4e14474dfb624451751d1..5ddfb2c1c788e2d09f0f7ffcf4658a04f9e79c47 100644 (file)
@@ -54,6 +54,7 @@
 #include "memchord.h"
 #include "memeuclidean.h"
 #include "mempearson.h"
+#include "sharedjsd.h"
 
 
 // aka. dist.shared()
@@ -121,6 +122,7 @@ struct distSharedData {
        unsigned long long start;
        unsigned long long end;
        MothurOut* m;
+    int count;
        
        distSharedData(){}
        distSharedData(MothurOut* mout, unsigned long long st, unsigned long long en, vector<string> est, vector<SharedRAbundVector*> lu) {
@@ -129,6 +131,7 @@ struct distSharedData {
                end = en;
         Estimators = est;
         thisLookup = lu;
+        count = 0;
        }
 };
 /**************************************************************************************************/
@@ -222,7 +225,10 @@ static DWORD WINAPI MyDistSharedThreadFunction(LPVOID lpParam){
                     matrixCalculators.push_back(new MemEuclidean());
                 }else if (pDataArray->Estimators[i] == "mempearson") { 
                     matrixCalculators.push_back(new MemPearson());
+                }else if (pDataArray->Estimators[i] == "jsd") {
+                    matrixCalculators.push_back(new JSD());
                 }
+
             }
         }
         
@@ -230,7 +236,7 @@ static DWORD WINAPI MyDistSharedThreadFunction(LPVOID lpParam){
                        
                vector<SharedRAbundVector*> subset;
                for (int k = pDataArray->start; k < pDataArray->end; k++) { // pass cdd each set of groups to compare
-                       
+                       pDataArray->count++;
                        for (int l = 0; l < k; l++) {
                                
                                if (k != l) { //we dont need to similiarity of a groups to itself