]> git.donarmstrong.com Git - mothur.git/blobdiff - collect.cpp
fixed bug with displaying info for collect.shared() and summary.shared().
[mothur.git] / collect.cpp
index 7f589ce692eab1297cbc059563a5aa5a6a17e9e7..2ed5ca7f10eeefdb860ae9fc7b5859b5eb239c0e 100644 (file)
@@ -3,7 +3,7 @@
  *  Dotur
  *
  *  Created by Sarah Westcott on 11/18/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
+ *  Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
  *
  */
 
@@ -70,6 +70,7 @@ try {
                        SharedRAbundVector* temp = new SharedRAbundVector(sharedorder->getNumBins());
                        temp->setLabel(sharedorder->getLabel());
                        temp->setGroup(globaldata->gGroupmap->namesOfGroups[i]);
+                       temp->setGroupIndex(globaldata->gGroupmap->groupIndex[globaldata->gGroupmap->namesOfGroups[i]]);
                        lookup.push_back(temp);
                }
 
@@ -111,7 +112,7 @@ try {
                                int n = 1;
                                for (int k = 0; k < (lookup.size() - 1); k++) { // pass cdd each set of groups to commpare
                                        for (int l = n; l < lookup.size(); l++) {
-                                               ccd->updateSharedData(lookup[k], lookup[l], i+1, numGroupComb);
+                                               ccd->updateSharedData(lookup[k], lookup[l], i+1, globaldata->gGroupmap->namesOfGroups.size());
                                        }
                                        n++;
                                }
@@ -125,7 +126,7 @@ try {
                        int n = 1;
                        for (int k = 0; k < (lookup.size() - 1); k++) { // pass cdd each set of groups to commpare
                                for (int l = n; l < lookup.size(); l++) {
-                                       ccd->updateSharedData(lookup[k], lookup[l], totalNumSeq, numGroupComb);
+                                       ccd->updateSharedData(lookup[k], lookup[l], totalNumSeq, globaldata->gGroupmap->namesOfGroups.size());
                                }
                                n++;
                        }
@@ -148,6 +149,7 @@ try {
 }
 
 /**************************************************************************************/
+
 void Collect::getGroupComb() {
                string group;
                
@@ -163,4 +165,6 @@ void Collect::getGroupComb() {
                        n++;
                }
 
-}
\ No newline at end of file
+}
+
+/**************************************************************************************/