]> git.donarmstrong.com Git - mothur.git/commitdiff
removed "shared" from some of the calculator names and classes
authorwestcott <westcott>
Tue, 14 Apr 2009 17:16:14 +0000 (17:16 +0000)
committerwestcott <westcott>
Tue, 14 Apr 2009 17:16:14 +0000 (17:16 +0000)
43 files changed:
binsequencecommand.cpp
collectsharedcommand.cpp
getoturepcommand.cpp
globaldata.cpp
heatmap.cpp
helpcommand.cpp
sharedanderbergs.cpp
sharedanderbergs.h
sharedbdiversity.cpp
sharedbdiversity.h
sharedbraycurtis.cpp
sharedbraycurtis.h
sharedjabund.cpp
sharedjabund.h
sharedjclass.cpp
sharedjclass.h
sharedjest.cpp
sharedjest.h
sharedkstest.cpp
sharedkstest.h
sharedkulczynski.cpp
sharedkulczynski.h
sharedkulczynskicody.cpp
sharedkulczynskicody.h
sharedlennon.cpp
sharedlennon.h
sharedmorisitahorn.cpp
sharedmorisitahorn.h
sharedochiai.cpp
sharedochiai.h
sharedsorabund.cpp
sharedsorabund.h
sharedsorclass.cpp
sharedsorclass.h
sharedsorest.cpp
sharedsorest.h
sharedthetan.cpp
sharedthetan.h
sharedthetayc.cpp
sharedthetayc.h
summarysharedcommand.cpp
treegroupscommand.cpp
validcalculator.cpp

index 5db29329cb28a569542581bc4a47b1cb38b6a7bf..c3c68abacffd43efaf5768796655e8816da87bd6 100644 (file)
@@ -67,7 +67,10 @@ int BinSeqCommand::execute(){
                        
                        if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(list->getLabel()) == 1){
                                
-                               //create output file
+                               //make new folder for bin info
+                               //string foldername = "/" + getRootName(globaldata->getListFile()) + list->getLabel() + ".bins/";
+                       //      mkdir(foldername.c_str()); 
+                       
                                string outputFileName = getRootName(globaldata->getListFile()) + list->getLabel() + ".fasta";
                                openOutputFile(outputFileName, out);
 
@@ -75,6 +78,11 @@ int BinSeqCommand::execute(){
                                
                                //for each bin in the list vector
                                for (int i = 0; i < list->size(); i++) {
+                               
+                                       //create output file
+                                       //string outputFileName = foldername + getRootName(globaldata->getListFile()) + "bin" + toString(i+1) + ".fasta";
+                                       //openOutputFile(outputFileName, out);
+
                                        binnames = list->get(i);
                                        while (binnames.find_first_of(',') != -1) { 
                                                name = binnames.substr(0,binnames.find_first_of(','));
@@ -83,7 +91,7 @@ int BinSeqCommand::execute(){
                                                //do work for that name
                                                sequence = fasta->getSequence(name);
                                                if (sequence != "not found") {
-                                                       name = name + "bin" + toString(i+1);
+                                                       name = name + "|" + toString(i+1);
                                                        out << ">" << name << endl;
                                                        out << sequence << endl;
                                                }else { 
@@ -105,7 +113,9 @@ int BinSeqCommand::execute(){
                                                remove(outputFileName.c_str());
                                                return 0;
                                        }
+                                       //out.close();
                                }
+                               out.close();
                        }
                        
                        list = input->getListVector();
index 6c47f2d5a6b2e4ac178d61128e4e0739a7c41666..41dc573bee5d8ea1a1ff1a13d02e022b15176ddf 100644 (file)
@@ -52,42 +52,42 @@ CollectSharedCommand::CollectSharedCommand(){
                                        cDisplays.push_back(new CollectDisplay(new SharedSobsCS(), new SharedOneColumnFile(fileNameRoot+"shared.sobs")));
                                }else if (globaldata->Estimators[i] == "sharedace") { 
                                        cDisplays.push_back(new CollectDisplay(new SharedAce(), new SharedOneColumnFile(fileNameRoot+"shared.ace")));
-                               }else if (globaldata->Estimators[i] == "sharedjabund") {        
-                                       cDisplays.push_back(new CollectDisplay(new SharedJAbund(), new SharedOneColumnFile(fileNameRoot+"shared.jabund")));
-                               }else if (globaldata->Estimators[i] == "sharedsorensonabund") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedSorAbund(), new SharedOneColumnFile(fileNameRoot+"shared.sorabund")));
-                               }else if (globaldata->Estimators[i] == "sharedjclass") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedJclass(), new SharedOneColumnFile(fileNameRoot+"shared.jclass")));
-                               }else if (globaldata->Estimators[i] == "sharedsorclass") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedSorClass(), new SharedOneColumnFile(fileNameRoot+"shared.sorclass")));
-                               }else if (globaldata->Estimators[i] == "sharedjest") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedJest(), new SharedOneColumnFile(fileNameRoot+"shared.jest")));
-                               }else if (globaldata->Estimators[i] == "sharedsorest") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedSorEst(), new SharedOneColumnFile(fileNameRoot+"shared.sorest")));
-                               }else if (globaldata->Estimators[i] == "sharedthetayc") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedThetaYC(), new SharedOneColumnFile(fileNameRoot+"shared.thetayc")));
-                               }else if (globaldata->Estimators[i] == "sharedthetan") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedThetaN(), new SharedOneColumnFile(fileNameRoot+"shared.thetan")));
-                               }else if (globaldata->Estimators[i] == "sharedkstest") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedKSTest(), new SharedOneColumnFile(fileNameRoot+"shared.kstest")));
-                               }else if (globaldata->Estimators[i] == "sharedbdiversity") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedBDiversity(), new SharedOneColumnFile(fileNameRoot+"shared.bdiversity")));
+                               }else if (globaldata->Estimators[i] == "jabund") {      
+                                       cDisplays.push_back(new CollectDisplay(new JAbund(), new SharedOneColumnFile(fileNameRoot+"jabund")));
+                               }else if (globaldata->Estimators[i] == "sorensonabund") { 
+                                       cDisplays.push_back(new CollectDisplay(new SorAbund(), new SharedOneColumnFile(fileNameRoot+"sorabund")));
+                               }else if (globaldata->Estimators[i] == "jclass") { 
+                                       cDisplays.push_back(new CollectDisplay(new Jclass(), new SharedOneColumnFile(fileNameRoot+"jclass")));
+                               }else if (globaldata->Estimators[i] == "sorclass") { 
+                                       cDisplays.push_back(new CollectDisplay(new SorClass(), new SharedOneColumnFile(fileNameRoot+"sorclass")));
+                               }else if (globaldata->Estimators[i] == "jest") { 
+                                       cDisplays.push_back(new CollectDisplay(new Jest(), new SharedOneColumnFile(fileNameRoot+"jest")));
+                               }else if (globaldata->Estimators[i] == "sorest") { 
+                                       cDisplays.push_back(new CollectDisplay(new SorEst(), new SharedOneColumnFile(fileNameRoot+"sorest")));
+                               }else if (globaldata->Estimators[i] == "thetayc") { 
+                                       cDisplays.push_back(new CollectDisplay(new ThetaYC(), new SharedOneColumnFile(fileNameRoot+"thetayc")));
+                               }else if (globaldata->Estimators[i] == "thetan") { 
+                                       cDisplays.push_back(new CollectDisplay(new ThetaN(), new SharedOneColumnFile(fileNameRoot+"thetan")));
+                               }else if (globaldata->Estimators[i] == "kstest") { 
+                                       cDisplays.push_back(new CollectDisplay(new KSTest(), new SharedOneColumnFile(fileNameRoot+"kstest")));
+                               }else if (globaldata->Estimators[i] == "bdiversity") { 
+                                       cDisplays.push_back(new CollectDisplay(new BDiversity(), new SharedOneColumnFile(fileNameRoot+"bdiversity")));
                                }else if (globaldata->Estimators[i] == "sharednseqs") { 
                                        cDisplays.push_back(new CollectDisplay(new SharedNSeqs(), new SharedOneColumnFile(fileNameRoot+"shared.nseqs")));
-                               }else if (globaldata->Estimators[i] == "sharedochiai") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedOchiai(), new SharedOneColumnFile(fileNameRoot+"shared.ochiai")));
-                               }else if (globaldata->Estimators[i] == "sharedanderberg") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedAnderberg(), new SharedOneColumnFile(fileNameRoot+"shared.anderberg")));
-                               }else if (globaldata->Estimators[i] == "sharedkulczynski") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedKulczynski(), new SharedOneColumnFile(fileNameRoot+"shared.kulczynski")));
-                               }else if (globaldata->Estimators[i] == "sharedkulczynskicody") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedKulczynskiCody(), new SharedOneColumnFile(fileNameRoot+"shared.kulczynskicody")));
-                               }else if (globaldata->Estimators[i] == "sharedlennon") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedLennon(), new SharedOneColumnFile(fileNameRoot+"shared.lennon")));
-                               }else if (globaldata->Estimators[i] == "sharedmorisitahorn") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedMorHorn(), new SharedOneColumnFile(fileNameRoot+"shared.morisitahorn")));
-                               }else if (globaldata->Estimators[i] == "sharedbraycurtis") { 
-                                       cDisplays.push_back(new CollectDisplay(new SharedBrayCurtis(), new SharedOneColumnFile(fileNameRoot+"shared.braycurtis")));
+                               }else if (globaldata->Estimators[i] == "ochiai") { 
+                                       cDisplays.push_back(new CollectDisplay(new Ochiai(), new SharedOneColumnFile(fileNameRoot+"ochiai")));
+                               }else if (globaldata->Estimators[i] == "anderberg") { 
+                                       cDisplays.push_back(new CollectDisplay(new Anderberg(), new SharedOneColumnFile(fileNameRoot+"anderberg")));
+                               }else if (globaldata->Estimators[i] == "skulczynski") { 
+                                       cDisplays.push_back(new CollectDisplay(new Kulczynski(), new SharedOneColumnFile(fileNameRoot+"kulczynski")));
+                               }else if (globaldata->Estimators[i] == "kulczynskicody") { 
+                                       cDisplays.push_back(new CollectDisplay(new KulczynskiCody(), new SharedOneColumnFile(fileNameRoot+"kulczynskicody")));
+                               }else if (globaldata->Estimators[i] == "lennon") { 
+                                       cDisplays.push_back(new CollectDisplay(new Lennon(), new SharedOneColumnFile(fileNameRoot+"lennon")));
+                               }else if (globaldata->Estimators[i] == "morisitahorn") { 
+                                       cDisplays.push_back(new CollectDisplay(new MorHorn(), new SharedOneColumnFile(fileNameRoot+"morisitahorn")));
+                               }else if (globaldata->Estimators[i] == "braycurtis") { 
+                                       cDisplays.push_back(new CollectDisplay(new BrayCurtis(), new SharedOneColumnFile(fileNameRoot+"braycurtis")));
                                }
                        }
                }
index ea53f25ed4cd9d215869349fa9159f03deda6258..064455f49e28538c95858ba574dc9ef3b0cc9289 100644 (file)
@@ -83,7 +83,7 @@ int GetOTURepCommand::execute(){
                        if(globaldata->allLines == 1 || globaldata->lines.count(count) == 1 || globaldata->labels.count(list->getLabel()) == 1){
                                
                                //create output file
-                               string outputFileName = getRootName(globaldata->getListFile()) + list->getLabel() + ".fastarep";
+                               string outputFileName = getRootName(globaldata->getListFile()) + list->getLabel() + ".rep.fasta";
                                openOutputFile(outputFileName, out);
 
                                cout << list->getLabel() << '\t' << count << endl;
@@ -96,7 +96,7 @@ int GetOTURepCommand::execute(){
                                        sequence = fasta->getSequence(nameRep);
 
                                        if (sequence != "not found") {
-                                               nameRep = nameRep + "bin" + toString(i+1);
+                                               nameRep = nameRep + "|" + toString(i+1);
                                                out << ">" << nameRep << endl;
                                                out << sequence << endl;
                                        }else { 
@@ -105,6 +105,8 @@ int GetOTURepCommand::execute(){
                                                return 0;
                                        }
                                }
+                               
+                               out.close();
                        }
                        
                        list = input->getListVector();
index 6ab20f3ced51bc003f6beb0760753023e2cdc76f..5bc7f5857b686742d42afff89025f5f0096796df 100644 (file)
@@ -163,7 +163,7 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                                
                //input defaults for calculators
                if (commandName == "collect.single") {
-                       if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson-geom-qstat-logsd-bergerparker-bstick"; }
+                       if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-shannon-npshannon-simpson"; }
                        Estimators.clear();
                        splitAtDash(calc, Estimators); 
                }
@@ -173,17 +173,17 @@ void GlobalData::parseGlobalData(string commandString, string optionText){
                        splitAtDash(calc, Estimators); 
                }
                if (commandName == "collect.shared") {
-                       if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-sharedjabund-sharedsorensonabund-sharedjclass-sharedsorclass-sharedjest-sharedsorest-sharedthetayc-sharedthetan-sharedkstest-sharedbdiversity"; }
+                       if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan"; }
                        Estimators.clear();
                        splitAtDash(calc, Estimators); 
                }
                if (commandName == "summary.single") {
-                       if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson-geom-logsd-qstat-bergerparker-bstick"; }
+                       if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-shannon-npshannon-simpson"; }
                        Estimators.clear();
                        splitAtDash(calc, Estimators); 
                }
                if (commandName == "summary.shared") {
-                       if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-sharedjabund-sharedsorensonabund-sharedjclass-sharedsorclass-sharedjest-sharedsorest-sharedthetayc-sharedthetan-sharedkstest-sharedbdiversity"; }
+                       if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-jabund-sorensonabund-jclass-sorclass-jest-sorest-thetayc-thetan"; }
                        Estimators.clear();
                        splitAtDash(calc, Estimators); 
                }
index d75f6f6410d8a6f9cc97a40a959c17caf1b6e0e5..523662ece3dae73f4ff48461621ba6b92ae9d8cc 100644 (file)
@@ -34,41 +34,96 @@ void HeatMap::getPic(OrderVector* order) {
                
                rabund = order->getRAbundVector();
                
+               //get users scaling method
+               scaler = globaldata->getScaler();
+               
+               float maxbin = 0.0;
                for (int i = 0; i < rabund.size(); i++) {
-                       colorScale[rabund.get(i)] = "";
+                       if (rabund.get(i) != 0) { //don't want log value of 0.
+                                       if (scaler == "log10") {
+                                               colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))] = "";  
+                                               if (maxbin < (log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))) { maxbin = (log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100)); }
+                                       }else if (scaler == "log2") {
+                                               colorScale[(log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))] = "";  
+                                               if (maxbin < (log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))) { maxbin = (log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100)); }
+                                       }else if (scaler == "linear") {
+                                               colorScale[rabund.get(i)] = "";
+                                               if (maxbin < rabund.get(i)) { maxbin = rabund.get(i); }
+                                       }else {  //if user enters invalid scaler option.
+                                               cout << scaler << " is not a valid scaler option. I will use log10." << endl;
+                                               colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))] = ""; 
+                                               if (maxbin < (log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))) { maxbin = (log10((rabund.get(i)) / (float)rabund.getNumSeqs()) * 100); }  
+                                       } 
+                       }else { colorScale[0] = "00";  }
                }
                
-               float scaler = 255 / (float) colorScale.size();
+               float scalers = 255 / (float) maxbin;
                
                //go through map and give each score a color value
                for (it = colorScale.begin(); it != colorScale.end(); it++) {
-                       it->second = toHex(int(float(it->first) * scaler));
+                       it->second = toHex(int(float(it->first) * scalers));
                        if(it->second.length() == 1) {  it->second = "0" + it->second;  }
                }
 
                string filenamesvg = getRootName(globaldata->inputFileName) + order->getLabel() + ".heatmap.svg";
-               
                openOutputFile(filenamesvg, outsvg);
                
-               //scale max rank so the maxrank = bright red
-                       
                //svg image
-               outsvg << "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 300 " + toString((rabund.getNumBins()*5 + 15))  + "\">\n";
+               outsvg << "<svg width=\"100%\" height=\"100%\" viewBox=\"0 0 300 " + toString((rabund.getNumBins()*5 + 120))  + "\">\n";
                outsvg << "<g>\n";
                
-               int x = 15;
-               int y = 15;
+               //white backround
+               outsvg << "<rect fill=\"white\" stroke=\"white\" x=\"0\" y=\"0\" width=\"300\" height=\"" + toString((rabund.getNumBins()*5 + 120))  + "\"/>"; 
+               outsvg << "<text fill=\"black\" class=\"seri\" x=\"100\" y=\"25\">Heatmap at distance " + order->getLabel() + "</text>\n";
+               
+               //output legend and color labels
+               //go through map and give each score a color value
                string color;
+               int x = 0;
+               int y = 103 + (rabund.getNumBins()*5);
+               if (maxbin != 0) {
+                       //convert maxbin to relative abundance again
+                       if (scaler == "log10") {
+                               maxbin = pow(10, maxbin) / 100;
+                       }else if (scaler == "log2") {
+                               maxbin = pow(2, maxbin) / 100;
+                       }else {  maxbin = pow(10, maxbin) / 100;        } 
+               }else { maxbin = 0.00; }
+               
+               //5 is the number of boxes in the legend
+               float maxbinScaler = maxbin / 10;
+               float colorScaler = 255 / 10;
+                                       
+               for (int i = 0; i < 10; i++) {
+                       string label = toString(((i+1) * maxbinScaler));
+                       //set precision of relative abundance to 3
+                       int pos = label.find_first_of('.');
+                       label = label.substr(0,pos+4);
+                       color = toHex(int((float)(i+1) * colorScaler));
 
+                       outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"30\" height=\"10\"/>\n";
+                       outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\">" + label + "</text>\n";
+                       x += 30;
+               }
+       
+               x = 0;
+               y = 70;
                for (int i = 0; i <= rabund.getNumBins(); i++) {
-               
-                       color = colorScale[rabund.get(i)];
+                       if (rabund.get(i) != 0) { //don't want log value of 0.
+                               if (scaler == "log10") {
+                                       color = colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))];  
+                               }else if (scaler == "log2") {
+                                       color = colorScale[(log2((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))];  
+                               }else if (scaler == "linear") {
+                                       color = colorScale[rabund.get(i)]; 
+                               }else {  color = colorScale[(log10((rabund.get(i) / (float)rabund.getNumSeqs()) * 100))];       } 
+                       }else { color = "OO";  }
                        
                        outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"300\" height=\"5\"/>\n";
                        y += 5;
                }
-               outsvg << "</g>\n</svg>\n";
                
+               outsvg << "</g>\n</svg>\n";
                outsvg.close();
                
        }
@@ -102,28 +157,21 @@ void HeatMap::getPic(SharedOrderVector* sharedorder) {
                                        if (scaler == "log10") {
                                                colorScale[(log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))] = "";  
                                                if (maxbin < (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))) { maxbin = (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)); }
-       //cout << "abundance  = " << lookup[i]->getAbundance(j) << '\t' << " relative adundance = " << (lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) << '\t';
-       //cout << (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)) << endl;
                                        }else if (scaler == "log2") {
                                                colorScale[(log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))] = "";  
                                                if (maxbin < (log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))) { maxbin = (log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)); }
-       //cout << "abundance  = " << lookup[i]->getAbundance(j) << '\t' << " relative adundance = " << lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs() << '\t';
-       //cout << (log2((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100)) << endl;
                                        }else if (scaler == "linear") {
                                                colorScale[lookup[i]->getAbundance(j)] = "";
                                                if (maxbin < lookup[i]->getAbundance(j)) { maxbin = lookup[i]->getAbundance(j); }
-       //cout << "abundance  = " << lookup[i]->getAbundance(j) << '\t' << " relative adundance = " << lookup[i]->getAbundance(j) << '\t';
-       //cout << lookup[i]->getAbundance(j) << endl;
                                        }else {  //if user enters invalid scaler option.
                                                cout << scaler << " is not a valid scaler option. I will use log10." << endl;
                                                colorScale[(log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))] = ""; 
                                                if (maxbin < (log10((lookup[i]->getAbundance(j) / (float)lookup[i]->getNumSeqs()) * 100))) { maxbin = (log10((lookup[i]->getAbundance(j)) / (float)lookup[i]->getNumSeqs()) * 100); }  
                                        } 
                                }else { colorScale[0] = "00";  }
-                               
                        }
                }
-//cout << "maxbin = "  << maxbin << endl;      
+               
                //get scaler
                float scalers = 255 / (float) maxbin;
                
@@ -132,7 +180,6 @@ void HeatMap::getPic(SharedOrderVector* sharedorder) {
                for (it = colorScale.begin(); it != colorScale.end(); it++) {
                        it->second = toHex(int(float(it->first) * scalers));
                        if(it->second.length() == 1) {  it->second = "0" + it->second;  }
-//cout << it->first << " " << it->second << endl;
                }
                
                string filenamesvg = getRootName(globaldata->inputFileName) + sharedorder->getLabel() + ".heatmap.svg";
@@ -151,39 +198,40 @@ void HeatMap::getPic(SharedOrderVector* sharedorder) {
                        outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(((300 * (h+1)) - 150) - ((int)lookup[h]->getGroup().length() / 2)) + "\" y=\"50\">" + lookup[h]->getGroup() + "</text>\n"; 
                }
                
-               
                //output legend and color labels
                //go through map and give each score a color value
                string color;
                int x = 0;
-               int y = 90 + (lookup[0]->getNumBins()*5);
-               for (it = colorScale.begin(); it != colorScale.end(); it++) {
-                       color = it->second;     
-                       float value = it->first;
-                       
-                       //convert it->first to relative abundance again
+               int y = 103 + (lookup[0]->getNumBins()*5);
+               if (maxbin != 0) {
+                       //convert maxbin to relative abundance again
                        if (scaler == "log10") {
-                               value = pow(10, value) / 100;
+                               maxbin = pow(10, maxbin) / 100;
                        }else if (scaler == "log2") {
-                               value = pow(2, value) / 100;
-                       }else {  value = pow(10, value) / 100;  } 
-                       
-                       string itprec = toString(value);
-                       
-                       //set precision of relative abundance to 2
-                       int pos = itprec.find_first_of('.');
-                       itprec = itprec.substr(0,pos+3);
+                               maxbin = pow(2, maxbin) / 100;
+                       }else {  maxbin = pow(10, maxbin) / 100;        } 
+               }else { maxbin = 0.00; }
+               
+               //((lookup.size() * 300) / 60) is the number of boxes in the legend
+               float maxbinScaler = maxbin / ((lookup.size() * 300) / 60);
+               float colorScaler = 255 / ((lookup.size() * 300) / 60);
+                                       
+               for (int i = 0; i < ((lookup.size() * 300) / 60); i++) {
+                       string label = toString(((i+1) * maxbinScaler));
+                       //set precision of relative abundance to 3
+                       int pos = label.find_first_of('.');
+                       label = label.substr(0,pos+4);
 
-                       outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"25\" height=\"10\"/>\n";
-                       outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\">" + itprec + "</text>\n";
-                       x += 25;
+                       color = toHex(int(((i+1) * colorScaler) + 15));
+                       outsvg << "<rect fill=\"#" + color + "0000\" stroke=\"#" + color + "0000\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\" width=\"30\" height=\"10\"/>\n";
+                       outsvg << "<text fill=\"black\" class=\"seri\" x=\"" + toString(x) + "\" y=\"" + toString(y) + "\">" + label + "</text>\n";
+                       x += 30;
                }
                
                x = 0;
                y = 70;
                
-               //start at 1 since bin 0 is nothing
-               for (int i = 1; i <= lookup[0]->getNumBins(); i++) {
+               for (int i = 0; i <= lookup[0]->getNumBins(); i++) {
                        for (int j = 0; j < lookup.size(); j++) {
                                
                                if (lookup[j]->getAbundance(i) != 0) { //don't want log value of 0.
index 9e85590bc2854aae88d46ce711a9f080ab5b04a6..16938077c7cd43999ceba642753085b972172ded 100644 (file)
@@ -76,7 +76,7 @@ int HelpCommand::execute(){
                cout << "both the line and label parameters at the same time. The collect.single command should be in the following format: " << "\n";
                cout << "collect.single(label=yourLabel, line=yourLines, iters=yourIters, freq=yourFreq, calc=yourEstimators)." << "\n";
                cout << "Example collect(label=unique-.01-.03, line=0-5-10, iters=10000, freq=10, calc=sobs-chao-ace-jack)." << "\n";
-               cout << "The default values for freq is 100, and calc are sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson." << "\n";
+               cout << "The default values for freq is 100, and calc are sobs-chao-ace-jack-shannon-npshannon-simpson." << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
                cout << "Note: No spaces between parameter labels (i.e. freq), '=' and parameters (i.e.yourFreq)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "collect.shared") {
@@ -84,8 +84,8 @@ int HelpCommand::execute(){
                cout << "The collect.shared command parameters are label, line, freq, jumble, calc and groups.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The collect.shared command should be in the following format: " << "\n";
                cout << "collect.shared(label=yourLabel, line=yourLines, freq=yourFreq, jumble=yourJumble, calc=yourEstimators, groups=yourGroups)." << "\n";
-               cout << "Example collect.shared(label=unique-.01-.03, line=0-5-10, freq=10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
-               cout << "The default values for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble), freq is 100 and calc are sharedsobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN." << "\n";
+               cout << "Example collect.shared(label=unique-.01-.03, line=0-5-10, freq=10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN)." << "\n";
+               cout << "The default values for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble), freq is 100 and calc are sharedsobs-sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN." << "\n";
                cout << "The default value for groups is all the groups in your groupfile." << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
                cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed.  You must enter at least 2 valid groups." << "\n";
@@ -136,7 +136,7 @@ int HelpCommand::execute(){
                cout << "both the line and label parameters at the same time. The summary.single command should be in the following format: " << "\n";
                cout << "summary.single(label=yourLabel, line=yourLines, calc=yourEstimators)." << "\n";
                cout << "Example summary.single(label=unique-.01-.03, line=0,5,10, calc=sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson)." << "\n";
-               cout << "The default value calc is sobs-chao-ace-jack-bootstrap-shannon-npshannon-simpson" << "\n";
+               cout << "The default value calc is sobs-chao-ace-jack-shannon-npshannon-simpson" << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
                cout << "Note: No spaces between parameter labels (i.e. line), '=' and parameters (i.e.yourLines)." << "\n" << "\n";
        }else if (globaldata->helpRequest == "summary.shared") { 
@@ -144,8 +144,8 @@ int HelpCommand::execute(){
                cout << "The summary.shared command parameters are label, line, jumble and calc.  No parameters are required, but you may not use " << "\n";
                cout << "both the line and label parameters at the same time. The summary.shared command should be in the following format: " << "\n";
                cout << "summary.shared(label=yourLabel, line=yourLines, jumble=yourJumble, calc=yourEstimators, groups=yourGroups)." << "\n";
-               cout << "Example summary.shared(label=unique-.01-.03, line=0,5,10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN)." << "\n";
-               cout << "The default value for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble) and calc is sharedsobs-sharedChao-sharedAce-sharedJabund-sharedSorensonAbund-sharedJclass-sharedSorClass-sharedJest-sharedSorEst-SharedThetaYC-SharedThetaN" << "\n";
+               cout << "Example summary.shared(label=unique-.01-.03, line=0,5,10, jumble=1, groups=B-C, calc=sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN)." << "\n";
+               cout << "The default value for jumble is 1 (meaning jumble, if it’s set to 0 then it will not jumble) and calc is sharedsobs-sharedChao-sharedAce-Jabund-SorensonAbund-Jclass-SorClass-Jest-SorEst-ThetaYC-ThetaN" << "\n";
                cout << "The default value for groups is all the groups in your groupfile." << "\n";
                cout << "The label and line parameters are used to analyze specific lines in your input." << "\n";
                cout << "The groups parameter allows you to specify which of the groups in your groupfile you would like analyzed.  You must enter at least 2 valid groups." << "\n";
index 77888b50b456abf5bb16222ec165a55c4b4e37b4..08ca8fd9cf5ebc46716fe854f7415b9bb73f5e20 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedAnderberg::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Anderberg::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                int S1, S2, S12, tempA, tempB;
                S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; 
@@ -40,11 +40,11 @@ EstOutput SharedAnderberg::getValues(SharedRAbundVector* shared1, SharedRAbundVe
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedAnderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the Anderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedAnderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the Anderberg class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 0443d02df08a93393c8e94dbf5023594fabd9922..1c8d9ce64a80c9004efbe647d1e2799d5e640861 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDANDERBERG_H
-#define SHAREDANDERBERG_H
+#ifndef ANDERBERG_H
+#define ANDERBERG_H
 /*
  *  sharedanderberg.h
  *  Mothur
 
 /***********************************************************************/
 
-class SharedAnderberg : public Calculator  {
+class Anderberg : public Calculator  {
        
        public:
-               SharedAnderberg() :  Calculator("SharedAnderberg", 1) {};
+               Anderberg() :  Calculator("Anderberg", 1) {};
                EstOutput getValues(SAbundVector*) {return data;};
                EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
        private:
index 3d314c35d0cbdddf6ece3c5d28b41ad5b69945ab..d00385d79f4597ea691650933ad996f844f6e0d5 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-double SharedBDiversity::whitt(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::whitt(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
        double nz1 = (double)shared1->numNZ();
        double nz2 = (double)shared2->numNZ();
        double sum = nz1;
@@ -25,7 +25,7 @@ double SharedBDiversity::whitt(SharedRAbundVector* shared1, SharedRAbundVector*
 
 /***********************************************************************/
 
-double SharedBDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
        double a = 0;
        double b = 0;
        double c = 0;
@@ -46,7 +46,7 @@ double SharedBDiversity::ms(SharedRAbundVector* shared1, SharedRAbundVector* sha
 
 /***********************************************************************/
 
-double SharedBDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
        double sum = 0;
        double asum = 0;
        double bsum = 0;
@@ -67,7 +67,7 @@ double SharedBDiversity::sor(SharedRAbundVector* shared1, SharedRAbundVector* sh
 
 /***********************************************************************/
 
-double SharedBDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+double BDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
        double multSum = 0;
        double powSum1 = 0;
        double powSum2 = 0;
@@ -87,7 +87,7 @@ double SharedBDiversity::mor(SharedRAbundVector* shared1, SharedRAbundVector* sh
 }
 /***********************************************************************/
        
-EstOutput SharedBDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+EstOutput BDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
        try {
                data.resize(4,0);
                
@@ -113,11 +113,11 @@ EstOutput SharedBDiversity::getValues(SharedRAbundVector* shared1, SharedRAbundV
        }
                
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the NPShannon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the BDiversity class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the NPShannon class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the BDiversity class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index b32d6d8c7390b24f500d2abe0aea9fe83120931d..1a8eb87046099ca23ab13ec01b135a4d7afaf509 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDBDIVERSITY_H
-#define SHAREDBDIVERSITY_H
+#ifndef BDIVERSITY_H
+#define BDIVERSITY_H
 /*
  *  bdiversity.h
  *  Mothur
@@ -15,10 +15,10 @@ It is a child of the calculator class.*/
 
 /***********************************************************************/
 
-class SharedBDiversity : public Calculator  {
+class BDiversity : public Calculator  {
        
 public:
-       SharedBDiversity() : Calculator("sharedbdiversity", 3) {};
+       BDiversity() : Calculator("bdiversity", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 3cc31773f4231cf95ee4a343b4368535b3894451..0f29b2393f76b80f74cec7b59cb971fc58dd4a68 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 //This is used by SharedJAbund and SharedSorAbund
-EstOutput SharedBrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput BrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {   
                EstOutput data;
                data.resize(1,0);
@@ -48,11 +48,11 @@ EstOutput SharedBrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundV
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedBrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the BrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedBrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the BrayCurtis class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 
index ba36729de5117110c182d830c2a8a02694641c1c..bbd09f598270e789829b9bff61fe50a2da53f253 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDBRAYCURTIS_H
-#define SHAREDBRAYCURTIS_H
+#ifndef BRAYCURTIS_H
+#define BRAYCURTIS_H
 /*
  *  sharedbraycurtis.h
  *  Mothur
 
 /***********************************************************************/
 
-class SharedBrayCurtis : public Calculator  {
+class BrayCurtis : public Calculator  {
        
 public:
-       SharedBrayCurtis() :  Calculator("SharedBrayCurtis", 1) {};
+       BrayCurtis() :  Calculator("BrayCurtis", 1) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 1c0b6ed37ace1f3042eee85769280168f13d78ce..79a57455668b1df99396d17ceb6bf3bcbe0bb2f6 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedJAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput JAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                EstOutput UVest;
                UVest.resize(2,0);
@@ -27,11 +27,11 @@ EstOutput SharedJAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedJAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the JAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedJAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the JAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 426f2042f35d590fa146bac0c239360ce51d1aae..5e4424374e006557e2c6faa7c753f763bcf0dd9c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDJABUND_H
-#define SHAREDJABUND_H
+#ifndef JABUND_H
+#define JABUND_H
 /*
  *  sharedjabund.h
  *  Dotur
@@ -17,10 +17,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedJAbund : public Calculator  {
+class JAbund : public Calculator  {
        
 public:
-       SharedJAbund() :  Calculator("SharedJAbund", 3) {};
+       JAbund() :  Calculator("JAbund", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 2c7d8c9422d4c4c95b74374f05e5f7b0291aa2d9..54d87ccc9a39170c5715a29ee73a86453176f7e7 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedJclass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Jclass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                int S1, S2, S12, tempA, tempB;
                S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; 
@@ -41,11 +41,11 @@ EstOutput SharedJclass::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedJclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the Jclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedJclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the Jclass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 301518bc5eefa191b8d56a6e3045b2c3ce7badde..bafc3f76c357c2347778d08b51be84f41c51c20e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDJCLASS_H
-#define SHAREDJCLASS_H
+#ifndef JCLASS_H
+#define JCLASS_H
 /*
  *  sharedjclass.h
  *  Dotur
@@ -16,10 +16,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedJclass : public Calculator  {
+class Jclass : public Calculator  {
        
 public:
-       SharedJclass() :  Calculator("SharedJclass", 3) {};
+       Jclass() :  Calculator("Jclass", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 5a3b6b83781d397756e1c7f3db06795378525f15..079cdef11de26892e35942c329a2f8e974131eed 100644 (file)
@@ -14,7 +14,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedJest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Jest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                EstOutput S1, S2, S12;
                S12.resize(1,0);
@@ -46,11 +46,11 @@ EstOutput SharedJest::getValues(SharedRAbundVector* shared1, SharedRAbundVector*
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedJest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the Jest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedJest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the Jest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 405e68c65fee05eb84be835639e6fe547cc68dea..fa1f613e610631247b693ae2b4e1ce8be857390b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDJEST_H
-#define SHAREDJEST_H
+#ifndef JEST_H
+#define JEST_H
 /*
  *  sharedjest.h
  *  Dotur
@@ -17,10 +17,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedJest : public Calculator  {
+class Jest : public Calculator  {
        
 public:
-       SharedJest() :  Calculator("SharedJest", 3) {};
+       Jest() :  Calculator("Jest", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 8daa0eba3287bb27e529bb0549eba25681a9aed2..604f1f67ff1b42e09dc14a0c46ed8e30793799cf 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedKSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+EstOutput KSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
        try {
                data.resize(2,0);
                
@@ -65,11 +65,11 @@ EstOutput SharedKSTest::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the NPShannon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the KSTest class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the NPShannon class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the KSTest class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index dfe1c1a7232f2cdafd0d8c7829498d68b9b5bb70..89440256f36fea1aa99b615705ea3f247a9a336c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDKSTEST_H
-#define SHAREDKSTEST_H
+#ifndef KSTEST_H
+#define KSTEST_H
 /*
  *  kstest.h
  *  Mothur
@@ -15,10 +15,10 @@ It is a child of the calculator class.*/
 
 /***********************************************************************/
 
-class SharedKSTest : public Calculator  {
+class KSTest : public Calculator  {
        
 public:
-       SharedKSTest() : Calculator("sharedkstest", 3) {};
+       KSTest() : Calculator("kstest", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 30c8c7a34a9b1d79f99637fa6c1874df2dd0f3d9..a4a20a70594bbce286ec2f6d1ac04606b2a2af29 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedKulczynski::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Kulczynski::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                int S1, S2, S12, tempA, tempB;
                S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; 
@@ -40,11 +40,11 @@ EstOutput SharedKulczynski::getValues(SharedRAbundVector* shared1, SharedRAbundV
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedKulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the Kulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedKulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the Kulczynski class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 91a19cadc65593145fb1f1b047801ad4ce9c4ec3..574ddd59c38f338cc3ee60fbaed6e6ba79dda244 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDKULCZYNSKI_H
-#define SHAREDKULCZYNSKI_H
+#ifndef KULCZYNSKI_H
+#define KULCZYNSKI_H
 /*
  *  sharedkulczynski.h
  *  Mothur
 
 /***********************************************************************/
 
-class SharedKulczynski : public Calculator  {
+class Kulczynski : public Calculator  {
        
 public:
-       SharedKulczynski() :  Calculator("SharedKulczynski", 1) {};
+       Kulczynski() :  Calculator("Kulczynski", 1) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 3de7e76b322a5496806e8e82e6bef12028290acb..66f9d076aa637d8fee5349917fc414c3bdff80f5 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedKulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput KulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                int S1, S2, S12, tempA, tempB;
                S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; 
@@ -40,11 +40,11 @@ EstOutput SharedKulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAb
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedKulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the KulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedKulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the KulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 7fb30ce45423892dbef55ccccc3cefc2dcdedd9b..20ac44e98f374ea50fdf09ca8c988db57e80ad4d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDKULCZYNSKICODY_H
-#define SHAREDKULCZYNSKICODY_H
+#ifndef KULCZYNSKICODY_H
+#define KULCZYNSKICODY_H
 
 /*
  *  sharedkulczynskicody.h
 
 /***********************************************************************/
 
-class SharedKulczynskiCody : public Calculator  {
+class KulczynskiCody : public Calculator  {
        
 public:
-       SharedKulczynskiCody() :  Calculator("SharedKulczynskiCody", 1) {};
+       KulczynskiCody() :  Calculator("KulczynskiCody", 1) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 45dfc6aa8a6762b8125718b3b211a2ef3dc8ba8c..b002a68f8a17af79fb04a668f1fd035332c7fa54 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedLennon::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Lennon::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                int S1, S2, S12, tempA, tempB, min;
                S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; min = 0;
@@ -46,11 +46,11 @@ EstOutput SharedLennon::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedLennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the Lennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedLennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the Lennon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 57a63554a36585c00d35ca51be1301a1fce41dd4..51bc9ed4bbb56b71f99040f91ca5dae276a571ec 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDLENNON_H
-#define SHAREDLENNON_H
+#ifndef LENNON_H
+#define LENNON_H
 
 /*
  *  sharedlennon.h
 
 /***********************************************************************/
 
-class SharedLennon : public Calculator  {
+class Lennon : public Calculator  {
        
 public:
-       SharedLennon() :  Calculator("SharedLennon", 1) {};
+       Lennon() :  Calculator("Lennon", 1) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 6ceac75dd1e928f827e1b19d6e1186c1da87b9b9..579f56a80da8733fa68ea507f9346d32a8760d59 100644 (file)
@@ -10,7 +10,7 @@
 #include "sharedmorisitahorn.h"
 
 /***********************************************************************/
-EstOutput SharedMorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput MorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {   
                data.resize(1,0);
                
@@ -52,11 +52,11 @@ EstOutput SharedMorHorn::getValues(SharedRAbundVector* shared1, SharedRAbundVect
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedMorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the MorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedMorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the MorHorn class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 9c2f75514d2bbc4e2a8c09be111fee2d8246a9fa..dd01dc78d322eb02b21118918fe559307305b52b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDMORHORN_H
-#define SHAREDMORHORN_H
+#ifndef MORHORN_H
+#define MORHORN_H
 /*
  *  sharedmorisitahorn.h
  *  Mothur
 
 /***********************************************************************/
 
-class SharedMorHorn : public Calculator  {
+class MorHorn : public Calculator  {
        
 public:
-       SharedMorHorn() :  Calculator("SharedMorisitaHorn", 1) {};
+       MorHorn() :  Calculator("MorisitaHorn", 1) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 9a64a2c6ec72d8d7db93deea70ddadc9c9b12752..a9677e5b6731d0c93c50692d106e5bfb36bc6fff 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedOchiai::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput Ochiai::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                int S1, S2, S12, tempA, tempB;
                S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; 
@@ -40,11 +40,11 @@ EstOutput SharedOchiai::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedOchiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the Ochiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedOchiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the Ochiai class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 27de37555ef521615659b5bc844d498a02c76fbb..26c6c586a65c791a56b25325bdb9b9d2c8399315 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDOCHIAI_H
-#define SHAREDOCHIAI_H
+#ifndef OCHIAI_H
+#define OCHIAI_H
 /*
  *  sharedochiai.h
  *  Mothur
 
 /***********************************************************************/
 
-class SharedOchiai : public Calculator  {
+class Ochiai : public Calculator  {
        
 public:
-       SharedOchiai() :  Calculator("SharedOchiai", 1) {};
+       Ochiai() :  Calculator("Ochiai", 1) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index e8953819decf34c6f90efec99da646a7ca38af33..36478deab9f91812d44b4a214ea7ff64d037e513 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedSorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput SorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                EstOutput UVest;
                UVest.resize(2,0);
@@ -27,11 +27,11 @@ EstOutput SharedSorAbund::getValues(SharedRAbundVector* shared1, SharedRAbundVec
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedSorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the SorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedSorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the SorAbund class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index e1ca45abc8a681001edbd6f860f2c632cc297a8d..452471ae4153339f16bdbe6938ab3de38e413e5c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDSORABUND_H
-#define SHAREDSORABUND_H
+#ifndef SORABUND_H
+#define SORABUND_H
 /*
  *  sharedsorabund.h
  *  Dotur
@@ -17,10 +17,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedSorAbund : public Calculator  {
+class SorAbund : public Calculator  {
        
 public:
-       SharedSorAbund() :  Calculator("SharedSorAbund", 3) {};
+       SorAbund() :  Calculator("SorAbund", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 81d8d86b7d295502dc2d75b85cd5accdbc167cdc..4fafe3e8d7b5619a1641b4342355b43b499d8a40 100644 (file)
@@ -11,7 +11,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedSorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput SorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                int S1, S2, S12, tempA, tempB;
                S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; 
@@ -41,11 +41,11 @@ EstOutput SharedSorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVec
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedSorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the SorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedSorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the SorClass class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 7a5e282421fafeb74b8aa10d5958557c409e78b1..f867b2228271b8bbb8c6cd88db41c0b581621630 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDSORCLASS_H
-#define SHAREDSORCLASS_H
+#ifndef SORCLASS_H
+#define SORCLASS_H
 /*
  *  sharedsorclass.h
  *  Dotur
@@ -17,10 +17,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedSorClass : public Calculator  {
+class SorClass : public Calculator  {
        
 public:
-       SharedSorClass() :  Calculator("SharedSorClass", 3) {};
+       SorClass() :  Calculator("SorClass", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 4f44b910dfc3a8c61e8c3e9daff78df2322e371b..68048b10dc5f5f53cbddbbd42873ed01b5edeaaf 100644 (file)
@@ -13,7 +13,7 @@
 
 /***********************************************************************/
 
-EstOutput SharedSorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput SorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {
                EstOutput S1, S2, S12;
                S12.resize(1,0);
@@ -45,11 +45,11 @@ EstOutput SharedSorEst::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedSorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the SorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedSorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the SorEst class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 1589ccc88ded7362314c294699f34c04d329d738..58de55225bc96227f82b21a7666bc5d8554e5b3c 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDSOREST_H
-#define SHAREDSOREST_H
+#ifndef SOREST_H
+#define SOREST_H
 /*
  *  sharedsorest.h
  *  Dotur
@@ -17,10 +17,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedSorEst : public Calculator  {
+class SorEst : public Calculator  {
        
 public:
-       SharedSorEst() :  Calculator("SharedSorEst", 3) {};
+       SorEst() :  Calculator("SorEst", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index 3c97d89bb648baa6807b17cf43ee260b6d05f6f3..853bf810f1c37bcd9f325b069db535cf20f92892 100644 (file)
@@ -10,7 +10,7 @@
 #include "sharedthetan.h"
 
 /***********************************************************************/
-EstOutput SharedThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput ThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {   
                data.resize(1,0);
                
@@ -51,11 +51,11 @@ EstOutput SharedThetaN::getValues(SharedRAbundVector* shared1, SharedRAbundVecto
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the ThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the ThetaN class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index 02b9f87327974fe56897a5130f4be0b8ec50a2fc..459868e2753a9be6dee26f49b969d363ce1df43a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDTHETAN_H
-#define SHAREDTHETAN_H
+#ifndef THETAN_H
+#define THETAN_H
 /*
  *  sharedthetan.h
  *  Dotur
@@ -17,10 +17,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedThetaN : public Calculator  {
+class ThetaN : public Calculator  {
        
 public:
-       SharedThetaN() :  Calculator("SharedThetaN", 3) {};
+       ThetaN() :  Calculator("ThetaN", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index ad2e1c574302b678f9d503dc235ef3b5a6b38db2..1357cb611b407319de5c093ca2d0e99e14be7ead 100644 (file)
@@ -10,7 +10,7 @@
 #include "sharedthetayc.h"
 
 /***********************************************************************/
-EstOutput SharedThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+EstOutput ThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
        try {   
                data.resize(1,0);
                
@@ -52,11 +52,11 @@ EstOutput SharedThetaYC::getValues(SharedRAbundVector* shared1, SharedRAbundVect
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the SharedThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "Standard Error: " << e.what() << " has occurred in the ThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }
        catch(...) {
-               cout << "An unknown error has occurred in the SharedThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               cout << "An unknown error has occurred in the ThetaYC class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
                exit(1);
        }       
 }
index c3c00005d3d6a9b89211cb16994758c7d21f8788..b17d3c4cf858277fe5e10c02a6aa7cb1169f2977 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SHAREDTHETAYC_H
-#define SHAREDTHETAYC_H
+#ifndef THETAYC_H
+#define THETAYC_H
 /*
  *  sharedthetayc.h
  *  Dotur
@@ -17,10 +17,10 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
-class SharedThetaYC : public Calculator  {
+class ThetaYC : public Calculator  {
        
 public:
-       SharedThetaYC() :  Calculator("SharedThetaYC", 3) {};
+       ThetaYC() :  Calculator("ThetaYC", 3) {};
        EstOutput getValues(SAbundVector*) {return data;};
        EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
 private:
index bebdf2637edad951b4b766760d4d96ee86281f69..05a5f7efa56c34e2ef452dd682aeacbbb4217ee3 100644 (file)
@@ -51,43 +51,43 @@ SummarySharedCommand::SummarySharedCommand(){
                                        sumCalculators.push_back(new SharedChao1());
                                }else if (globaldata->Estimators[i] == "sharedace") { 
                                        sumCalculators.push_back(new SharedAce());
-                               }else if (globaldata->Estimators[i] == "sharedjabund") {        
-                                       sumCalculators.push_back(new SharedJAbund());
-                               }else if (globaldata->Estimators[i] == "sharedsorensonabund") { 
-                                       sumCalculators.push_back(new SharedSorAbund());
-                               }else if (globaldata->Estimators[i] == "sharedjclass") { 
-                                       sumCalculators.push_back(new SharedJclass());
-                               }else if (globaldata->Estimators[i] == "sharedsorclass") { 
-                                       sumCalculators.push_back(new SharedSorClass());
-                               }else if (globaldata->Estimators[i] == "sharedjest") { 
-                                       sumCalculators.push_back(new SharedJest());
-                               }else if (globaldata->Estimators[i] == "sharedsorest") { 
-                                       sumCalculators.push_back(new SharedSorEst());
-                               }else if (globaldata->Estimators[i] == "sharedthetayc") { 
-                                       sumCalculators.push_back(new SharedThetaYC());
-                               }else if (globaldata->Estimators[i] == "sharedthetan") { 
-                                       sumCalculators.push_back(new SharedThetaN());
-                               }else if (globaldata->Estimators[i] == "sharedkstest") { 
-                                       sumCalculators.push_back(new SharedKSTest());
+                               }else if (globaldata->Estimators[i] == "jabund") {      
+                                       sumCalculators.push_back(new JAbund());
+                               }else if (globaldata->Estimators[i] == "sorensonabund") { 
+                                       sumCalculators.push_back(new SorAbund());
+                               }else if (globaldata->Estimators[i] == "jclass") { 
+                                       sumCalculators.push_back(new Jclass());
+                               }else if (globaldata->Estimators[i] == "sorclass") { 
+                                       sumCalculators.push_back(new SorClass());
+                               }else if (globaldata->Estimators[i] == "jest") { 
+                                       sumCalculators.push_back(new Jest());
+                               }else if (globaldata->Estimators[i] == "sorest") { 
+                                       sumCalculators.push_back(new SorEst());
+                               }else if (globaldata->Estimators[i] == "thetayc") { 
+                                       sumCalculators.push_back(new ThetaYC());
+                               }else if (globaldata->Estimators[i] == "thetan") { 
+                                       sumCalculators.push_back(new ThetaN());
+                               }else if (globaldata->Estimators[i] == "kstest") { 
+                                       sumCalculators.push_back(new KSTest());
                                }else if (globaldata->Estimators[i] == "sharednseqs") { 
                                        sumCalculators.push_back(new SharedNSeqs());
-                               }else if (globaldata->Estimators[i] == "sharedochiai") { 
-                                       sumCalculators.push_back(new SharedOchiai());
-                               }else if (globaldata->Estimators[i] == "sharedanderberg") { 
-                                       sumCalculators.push_back(new SharedAnderberg());
-                               }else if (globaldata->Estimators[i] == "sharedkulczynski") { 
-                                       sumCalculators.push_back(new SharedKulczynski());
-                               }else if (globaldata->Estimators[i] == "sharedkulczynskicody") { 
-                                       sumCalculators.push_back(new SharedKulczynskiCody());
-                               }else if (globaldata->Estimators[i] == "sharedlennon") { 
-                                       sumCalculators.push_back(new SharedLennon());
-                               }else if (globaldata->Estimators[i] == "sharedmorisitahorn") { 
-                                       sumCalculators.push_back(new SharedMorHorn());
-                               }else if (globaldata->Estimators[i] == "sharedbraycurtis") { 
-                                       sumCalculators.push_back(new SharedBrayCurtis());
+                               }else if (globaldata->Estimators[i] == "ochiai") { 
+                                       sumCalculators.push_back(new Ochiai());
+                               }else if (globaldata->Estimators[i] == "anderberg") { 
+                                       sumCalculators.push_back(new Anderberg());
+                               }else if (globaldata->Estimators[i] == "kulczynski") { 
+                                       sumCalculators.push_back(new Kulczynski());
+                               }else if (globaldata->Estimators[i] == "kulczynskicody") { 
+                                       sumCalculators.push_back(new KulczynskiCody());
+                               }else if (globaldata->Estimators[i] == "lennon") { 
+                                       sumCalculators.push_back(new Lennon());
+                               }else if (globaldata->Estimators[i] == "morisitahorn") { 
+                                       sumCalculators.push_back(new MorHorn());
+                               }else if (globaldata->Estimators[i] == "braycurtis") { 
+                                       sumCalculators.push_back(new BrayCurtis());
                                }
-                               else if (globaldata->Estimators[i] == "sharedbdiversity") { 
-                                       sumCalculators.push_back(new SharedBDiversity());
+                               else if (globaldata->Estimators[i] == "bdiversity") { 
+                                       sumCalculators.push_back(new BDiversity());
                                }
                                
                        }
index bdd664a55d360fe753318900456828b69b8daa4f..a6e1918ffdefcf34d6052730f5161d011d644567 100644 (file)
@@ -31,24 +31,24 @@ TreeGroupCommand::TreeGroupCommand(){
                int i;
                for (i=0; i<globaldata->Estimators.size(); i++) {
                        if (validCalculator->isValidCalculator("treegroup", globaldata->Estimators[i]) == true) { 
-                               if (globaldata->Estimators[i] == "sharedjabund") {      
-                                       treeCalculators.push_back(new SharedJAbund());
-                               }else if (globaldata->Estimators[i] == "sharedsorensonabund") { 
-                                       treeCalculators.push_back(new SharedSorAbund());
-                               }else if (globaldata->Estimators[i] == "sharedjclass") { 
-                                       treeCalculators.push_back(new SharedJclass());
-                               }else if (globaldata->Estimators[i] == "sharedsorclass") { 
-                                       treeCalculators.push_back(new SharedSorClass());
-                               }else if (globaldata->Estimators[i] == "sharedjest") { 
-                                       treeCalculators.push_back(new SharedJest());
-                               }else if (globaldata->Estimators[i] == "sharedsorest") { 
-                                       treeCalculators.push_back(new SharedSorEst());
-                               }else if (globaldata->Estimators[i] == "sharedthetayc") { 
-                                       treeCalculators.push_back(new SharedThetaYC());
-                               }else if (globaldata->Estimators[i] == "sharedthetan") { 
-                                       treeCalculators.push_back(new SharedThetaN());
-                               }else if (globaldata->Estimators[i] == "sharedmorisitahorn") { 
-                                       treeCalculators.push_back(new SharedMorHorn());
+                               if (globaldata->Estimators[i] == "jabund") {    
+                                       treeCalculators.push_back(new JAbund());
+                               }else if (globaldata->Estimators[i] == "sorensonabund") { 
+                                       treeCalculators.push_back(new SorAbund());
+                               }else if (globaldata->Estimators[i] == "jclass") { 
+                                       treeCalculators.push_back(new Jclass());
+                               }else if (globaldata->Estimators[i] == "sorclass") { 
+                                       treeCalculators.push_back(new SorClass());
+                               }else if (globaldata->Estimators[i] == "jest") { 
+                                       treeCalculators.push_back(new Jest());
+                               }else if (globaldata->Estimators[i] == "sorest") { 
+                                       treeCalculators.push_back(new SorEst());
+                               }else if (globaldata->Estimators[i] == "thetayc") { 
+                                       treeCalculators.push_back(new ThetaYC());
+                               }else if (globaldata->Estimators[i] == "thetan") { 
+                                       treeCalculators.push_back(new ThetaN());
+                               }else if (globaldata->Estimators[i] == "morisitahorn") { 
+                                       treeCalculators.push_back(new MorHorn());
                                }
                        }
                }
index 90257c77eefbc1218698ebcc808e66d4c7bd34e9..4c05e4a8e466e2a99a2628e0ca7e1cf31c5e4bfe 100644 (file)
@@ -175,7 +175,7 @@ void ValidCalculators::initialSingle() {
                single["logsd"]         = "logsd";
                single["qstat"]         = "qstat";
                single["bstick"]        = "bstick";
-               single["nseqs"]         = "nseqs";
+               single["nseqs"]                 = "nseqs";
                single["default"]           = "default";
        }
        catch(exception& e) {
@@ -194,24 +194,24 @@ void ValidCalculators::initialShared() {
                shared["sharedsobs"]                    = "sharedsobs";
                shared["sharedchao"]                    = "sharedchao";
                shared["sharedace"]                             = "sharedace";
-               shared["sharedjabund"]                  = "sharedjabund";
-               shared["sharedsorensonabund"]   = "sharedsorensonabund";
-               shared["sharedjclass"]                  = "sharedjclass";
-               shared["sharedsorclass"]                = "sharedsorclass";
-               shared["sharedjest"]                    = "sharedjest";
-               shared["sharedsorest"]                  = "sharedsorest";
-               shared["sharedthetayc"]                 = "sharedthetayc";
-               shared["sharedthetan"]                  = "sharedthetan";
-               shared["sharedkstest"]          = "sharedkstest";
-               shared["sharedbdiversity"]      = "sharedbdiversity";
+               shared["jabund"]                                = "jabund";
+               shared["sorensonabund"]                 = "sorensonabund";
+               shared["jclass"]                                = "jclass";
+               shared["sorclass"]                              = "sorclass";
+               shared["jest"]                                  = "jest";
+               shared["sorest"]                                = "sorest";
+               shared["thetayc"]                               = "thetayc";
+               shared["thetan"]                                = "thetan";
+               shared["kstest"]                                = "kstest";
+               shared["bdiversity"]                    = "bdiversity";
                shared["sharednseqs"]                   = "sharednseqs";
-               shared["sharedochiai"]                  = "sharedochiai";
-               shared["sharedanderberg"]               = "sharedanderberg";
-               shared["sharedkulczynski"]              = "sharedkulczynski";
-               shared["sharedkulczynskicody"]  = "sharedkulczynskicody";
-               shared["sharedlennon"]                  = "sharedlennon";
-               shared["sharedmorisitahorn"]    = "sharedmorisitahorn";
-               shared["sharedbraycurtis"]              = "sharedbraycurtis";
+               shared["ochiai"]                                = "ochiai";
+               shared["anderberg"]                             = "anderberg";
+               shared["kulczynski"]                    = "kulczynski";
+               shared["kulczynskicody"]                = "kulczynskicody";
+               shared["lennon"]                                = "lennon";
+               shared["morisitahorn"]                  = "morisitahorn";
+               shared["braycurtis"]                    = "braycurtis";
                shared["default"]                   = "default";
        }
        catch(exception& e) {
@@ -284,24 +284,24 @@ void ValidCalculators::initialSharedSummary() {
                sharedsummary["sharedsobs"]                             = "sharedsobs";
                sharedsummary["sharedchao"]                             = "sharedchao";
                sharedsummary["sharedace"]                              = "sharedace";
-               sharedsummary["sharedjabund"]                   = "sharedjabund";
-               sharedsummary["sharedsorensonabund"]    = "sharedsorensonabund";
-               sharedsummary["sharedjclass"]                   = "sharedjclass";
-               sharedsummary["sharedsorclass"]                 = "sharedsorclass";
-               sharedsummary["sharedjest"]                             = "sharedjest";
-               sharedsummary["sharedsorest"]                   = "sharedsorest";
-               sharedsummary["sharedthetayc"]                  = "sharedthetayc";
-               sharedsummary["sharedthetan"]                   = "sharedthetan";
-               sharedsummary["sharedkstest"]           = "sharedkstest";
-               sharedsummary["sharedbdiversity"]       = "sharedbdiversity";
+               sharedsummary["jabund"]                                 = "jabund";
+               sharedsummary["sorensonabund"]                  = "sorensonabund";
+               sharedsummary["jclass"]                                 = "jclass";
+               sharedsummary["sorclass"]                               = "sorclass";
+               sharedsummary["jest"]                                   = "jest";
+               sharedsummary["sorest"]                                 = "sorest";
+               sharedsummary["thetayc"]                                = "thetayc";
+               sharedsummary["thetan"]                                 = "thetan";
+               sharedsummary["kstest"]                                 = "kstest";
+               sharedsummary["bdiversity"]                             = "bdiversity";
                sharedsummary["sharednseqs"]                    = "sharednseqs";
-               sharedsummary["sharedochiai"]                   = "sharedochiai";
-               sharedsummary["sharedanderberg"]                = "sharedanderberg";
-               sharedsummary["sharedkulczynski"]               = "sharedkulczynski";
-               sharedsummary["sharedkulczynskicody"]   = "sharedkulczynskicody";
-               sharedsummary["sharedlennon"]                   = "sharedlennon";
-               sharedsummary["sharedmorisitahorn"]             = "sharedmorisitahorn";
-               sharedsummary["sharedbraycurtis"]               = "sharedbraycurtis";
+               sharedsummary["ochiai"]                                 = "ochiai";
+               sharedsummary["anderberg"]                              = "anderberg";
+               sharedsummary["kulczynski"]                             = "kulczynski";
+               sharedsummary["kulczynskicody"]                 = "kulczynskicody";
+               sharedsummary["lennon"]                                 = "lennon";
+               sharedsummary["morisitahorn"]                   = "morisitahorn";
+               sharedsummary["braycurtis"]                             = "braycurtis";
                sharedsummary["default"]                                = "default";
        }
        catch(exception& e) {
@@ -339,9 +339,9 @@ void ValidCalculators::initialVennSingle() {
        try {
                vennsingle["sobs"]              = "sobs";
                vennsingle["chao"]                  = "chao";
-               vennsingle["ace"]                               = "ace";
+               vennsingle["ace"]                       = "ace";
                vennsingle["jack"]                  = "jack";
-               vennsingle["default"]                   = "default";
+               vennsingle["default"]           = "default";
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
@@ -374,15 +374,15 @@ void ValidCalculators::initialVennShared() {
 /********************************************************************/
 void ValidCalculators::initialTreeGroups() {
        try {   
-               treegroup["sharedjabund"]                       = "sharedjabund";
-               treegroup["sharedsorensonabund"]        = "sharedsorensonabund";
-               treegroup["sharedjclass"]                       = "sharedjclass";
-               treegroup["sharedsorclass"]                     = "sharedsorclass";
-               treegroup["sharedjest"]                         = "sharedjest";
-               treegroup["sharedsorest"]                       = "sharedsorest";
-               treegroup["sharedthetayc"]                      = "sharedthetayc";
-               treegroup["sharedthetan"]                       = "sharedthetan";
-               treegroup["sharedmorisitahorn"]         = "sharedmorisitahorn";
+               treegroup["jabund"]                                     = "jabund";
+               treegroup["sorensonabund"]                      = "sorensonabund";
+               treegroup["jclass"]                                     = "jclass";
+               treegroup["sorclass"]                           = "sorclass";
+               treegroup["jest"]                                       = "jest";
+               treegroup["sorest"]                                     = "sorest";
+               treegroup["thetayc"]                            = "thetayc";
+               treegroup["thetan"]                                     = "thetan";
+               treegroup["morisitahorn"]                       = "morisitahorn";
        }
        catch(exception& e) {
                cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialTreeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";