]> git.donarmstrong.com Git - mothur.git/commitdiff
heatmap
authorwestcott <westcott>
Thu, 26 Mar 2009 14:43:41 +0000 (14:43 +0000)
committerwestcott <westcott>
Thu, 26 Mar 2009 14:43:41 +0000 (14:43 +0000)
heatmap.cpp
sharedordervector.cpp

index 5a02b9a040d680b460be4966412490d5508af203..3da6dcc569b012352d4fd5852d4c5e50e7814f40 100644 (file)
@@ -31,7 +31,7 @@ HeatMap::HeatMap(){
 void HeatMap::getPic(OrderVector* order) {
        try {
                sabund = order->getSAbundVector();
-               string filename = getRootName(globaldata->inputFileName) + order->getLabel();
+               string filename = getRootName(globaldata->inputFileName) + "heatmap" + order->getLabel();
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the HeatMap class Function getPic. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -45,8 +45,11 @@ void HeatMap::getPic(OrderVector* order) {
 //**********************************************************************************************************************
 void HeatMap::getPic(SharedOrderVector* sharedorder) {
        try {
+               //fills vector of sharedsabunds - lookup
                getSharedVectors(sharedorder);
                
+               string filename = getRootName(globaldata->inputFileName) + "heatmap" + sharedorder->getLabel();
+               
                
        }
        catch(exception& e) {
@@ -67,7 +70,7 @@ void HeatMap::getSharedVectors(SharedOrderVector* order){
                
                //create and initialize vector of sharedvectors, one for each group
                for (int i = 0; i < globaldata->Groups.size(); i++) { 
-                       SharedRAbundVector* temp = new SharedRAbundVector(order->getNumBins());
+                       SharedRAbundVector* temp = new SharedRAbundVector(order->getMaxRank());
                        temp->setLabel(order->getLabel());
                        temp->setGroup(globaldata->Groups[i]);
                        templookup.push_back(temp);
index a1eff83424b987956f9b9637b19692e883f5dce2..2092706d8cf5a5c429fb937820663ff0a5738be1 100644 (file)
@@ -33,6 +33,7 @@ SharedOrderVector::SharedOrderVector(string id, vector<individual>  ov) :
 SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {
        try {
                globaldata = GlobalData::getInstance();
+               maxRank = 0; numBins = 0; numSeqs = 0;
                
                if (globaldata->gGroupmap == NULL) {  groupmap = new GroupMap(); }
                
@@ -53,6 +54,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {
                
                for(int i=0;i<num;i++){
                        f >> inputData;
+                       
                        for (int j = 0; j < inputData; j++) {
                                push_back(i+1, i+1, groupN);
                                numSeqs++;
@@ -77,6 +79,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {
                        
                        for(int i=0;i<num;i++){
                                f >> inputData;
+                               
                                for (int j = 0; j < inputData; j++) {
                                        push_back(i+1, i+1, groupN);
                                        numSeqs++;