]> git.donarmstrong.com Git - mothur.git/blob - validcalculator.cpp
added heatmap.sim command and changed heatmap to heatmap.bin
[mothur.git] / validcalculator.cpp
1 /*
2  *  validcalculator.cpp
3  *  Dotur
4  *
5  *  Created by Sarah Westcott on 1/5/09.
6  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
7  *
8  */
9
10 #include "validcalculator.h"
11
12 /********************************************************************/
13 ValidCalculators::ValidCalculators() {
14         try {
15                  initialSingle();
16                  initialShared();
17                  initialRarefaction();
18                  initialSharedRarefact();
19                  initialSummary();
20                  initialSharedSummary();
21                  initialVennSingle();
22                  initialVennShared();
23                  initialTreeGroups();
24                  initialBoot();
25                  initialDistance();
26                  initialMatrix();
27                  initialHeat();
28         }
29         catch(exception& e) {
30                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function ValidCalculator. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
31                 exit(1);
32         }
33         catch(...) {
34                 cout << "An unknown error has occurred in the ValidCalculator class function ValidCalculator. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
35                 exit(1);
36         }                
37 }
38
39 /********************************************************************/
40
41 ValidCalculators::~ValidCalculators() {}
42
43 /********************************************************************/
44
45 bool ValidCalculators::isValidCalculator(string parameter, string calculator) {
46         try {   
47                 //are you looking for a calculator for a single parameter
48                 if (parameter == "single") {
49                         //is it valid
50                         if ((single.find(calculator)) != (single.end())) {
51                                 return true;
52                         }else { 
53                                 cout << calculator << " is not a valid estimator for the collect.single command and will be disregarded. Valid estimators are ";
54                                 for (it = single.begin(); it != single.end(); it++) {
55                                         cout << it->first << ", ";
56                                 }
57                                 cout << endl;
58                                 return false; }
59                 //are you looking for a calculator for a shared parameter
60                 }else if (parameter == "shared") {
61                         //is it valid
62                         if ((shared.find(calculator)) != (shared.end())) {
63                                 return true;
64                         }else { 
65                                 cout << calculator << " is not a valid estimator for the collect.shared command and will be disregarded.  Valid estimators are ";
66                                 for (it = shared.begin(); it != shared.end(); it++) {
67                                         cout << it->first << ", ";
68                                 }
69                                 cout << endl;
70                                 return false; }
71                 //are you looking for a calculator for a rarefaction parameter
72                 }else if (parameter == "rarefaction") {
73                         //is it valid
74                         if ((rarefaction.find(calculator)) != (rarefaction.end())) {
75                                 return true;
76                         }else { 
77                                 cout << calculator << " is not a valid estimator for the rarefaction.single command and will be disregarded. Valid estimators are ";
78                                 for (it = rarefaction.begin(); it != rarefaction.end(); it++) {
79                                         cout << it->first << ", ";
80                                 }
81                                 cout << endl;
82                                 return false; }
83                 //are you looking for a calculator for a summary parameter
84                 }else if (parameter == "summary") {
85                         //is it valid
86                         if ((summary.find(calculator)) != (summary.end())) {
87                                 return true;
88                         }else { 
89                                 cout << calculator << " is not a valid estimator for the summary.shared command and will be disregarded. Valid estimators are ";
90                                 for (it = summary.begin(); it != summary.end(); it++) {
91                                         cout << it->first << ", ";
92                                 }
93                                 cout << endl;
94                                 return false; }
95                 //are you looking for a calculator for a sharedsummary parameter
96                 }else if (parameter == "sharedsummary") {
97                         //is it valid
98                         if ((sharedsummary.find(calculator)) != (sharedsummary.end())) {
99                                 return true;
100                         }else { 
101                                 cout << calculator << " is not a valid estimator for the summary.shared command and will be disregarded. Valid estimators are ";
102                                 for (it = sharedsummary.begin(); it != sharedsummary.end(); it++) {
103                                         cout << it->first << ", ";
104                                 }
105                                 cout << endl;
106                                 return false; }
107                 }else if (parameter == "sharedrarefaction") {
108                         //is it valid
109                         if ((sharedrarefaction.find(calculator)) != (sharedrarefaction.end())) {
110                                 return true;
111                         }else { 
112                                 cout << calculator << " is not a valid estimator for the rarefaction.shared command and will be disregarded. Valid estimator is ";
113                                 for (it = sharedrarefaction.begin(); it != sharedrarefaction.end(); it++) {
114                                         cout << it->first << ", ";
115                                 }
116                                 cout << endl;
117                                 return false; }
118                 }else if (parameter == "vennsingle") {
119                         //is it valid
120                         if ((vennsingle.find(calculator)) != (vennsingle.end())) {
121                                 return true;
122                         }else { 
123                                 cout << calculator << " is not a valid estimator for the venn command in single mode and will be disregarded. Valid estimators are ";
124                                 for (it = vennsingle.begin(); it != vennsingle.end(); it++) {
125                                         cout << it->first << ", ";
126                                 }
127                                 cout << endl;
128                                 return false; }
129                 }else if (parameter == "vennshared") {
130                         //is it valid
131                         if ((vennshared.find(calculator)) != (vennshared.end())) {
132                                 return true;
133                         }else { 
134                                 cout << calculator << " is not a valid estimator for the venn command in shared mode and will be disregarded. Valid estimators are ";
135                                 for (it = vennshared.begin(); it != vennshared.end(); it++) {
136                                         cout << it->first << ", ";
137                                 }
138                                 cout << endl;
139                                 return false; }
140                 }else if (parameter == "treegroup") {
141                         //is it valid
142                         if ((treegroup.find(calculator)) != (treegroup.end())) {
143                                 return true;
144                         }else { 
145                                 cout << calculator << " is not a valid estimator for the tree.shared command and will be disregarded. Valid estimators are ";
146                                 for (it = treegroup.begin(); it != treegroup.end(); it++) {
147                                         cout << it->first << ", ";
148                                 }
149                                 cout << endl;
150                                 return false; }
151                 }else if (parameter == "matrix") {
152                         //is it valid
153                         if ((matrix.find(calculator)) != (matrix.end())) {
154                                 return true;
155                         }else { 
156                                 cout << calculator << " is not a valid estimator for the matrix.output command and will be disregarded. Valid estimators are ";
157                                 for (it = matrix.begin(); it != matrix.end(); it++) {
158                                         cout << it->first << ", ";
159                                 }
160                                 cout << endl;
161                                 return false; }
162                 }else if (parameter == "heat") {
163                         //is it valid
164                         if ((heat.find(calculator)) != (heat.end())) {
165                                 return true;
166                         }else { 
167                                 cout << calculator << " is not a valid estimator for the heatmap.sim command and will be disregarded. Valid estimators are ";
168                                 for (it = heat.begin(); it != heat.end(); it++) {
169                                         cout << it->first << ", ";
170                                 }
171                                 cout << endl;
172                                 return false; }
173                 }else if (parameter == "boot") {
174                         //is it valid
175                         if ((boot.find(calculator)) != (boot.end())) {
176                                 return true;
177                         }else { 
178                                 cout << calculator << " is not a valid estimator for the bootstrap.shared command and will be disregarded. Valid estimators are ";
179                                 for (it = boot.begin(); it != boot.end(); it++) {
180                                         cout << it->first << ", ";
181                                 }
182                                 cout << endl;
183                                 return false; }
184                 }else if (parameter == "distance") {
185                         //is it valid
186                         if ((distance.find(calculator)) != (distance.end())) {
187                                 return true;
188                         }else { 
189                                 cout << calculator << " is not a valid estimator for the distance command and will be disregarded. Valid calculators are ";
190                                 for (it = distance.begin(); it != distance.end(); it++) {
191                                         cout << it->first << ", ";
192                                 }
193                                 cout << endl;
194                                 return false; }
195                 //not a valid parameter
196                 }else { return false; }
197                 
198         }
199         catch(exception& e) {
200                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function isValidCalculator. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
201                 exit(1);
202         }
203         catch(...) {
204                 cout << "An unknown error has occurred in the ValidCalculator class function isValidCalculator. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
205                 exit(1);
206         }       
207 }
208
209 /********************************************************************/
210 void ValidCalculators::initialSingle() {
211         try {   
212                 single["sobs"]          = "sobs";
213                 single["chao"]              = "chao";
214                 single["ace"]               = "ace";
215                 single["jack"]              = "jack";
216                 single["shannon"]           = "shannon";
217                 single["npshannon"]     = "npshannon";
218                 single["simpson"]           = "simpson";
219                 single["bergerparker"]  = "bergerparker";
220                 single["bootstrap"]     = "bootstrap";
221                 single["geometric"]     = "geometric";
222                 single["logseries"]         = "logseries";
223                 single["qstat"]         = "qstat";
224                 single["bstick"]        = "bstick";
225                 single["goodscoverage"] = "goodscoverage";
226                 single["nseqs"]                 = "nseqs";
227                 single["coverage"]              = "coverage";
228                 single["efron"]         = "efron";
229                 single["boneh"]         = "boneh";
230                 single["solow"]         = "solow";
231                 single["shen"]          = "shen";
232                 single["default"]           = "default";
233         }
234         catch(exception& e) {
235                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
236                 exit(1);
237         }
238         catch(...) {
239                 cout << "An unknown error has occurred in the ValidCalculator class function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
240                 exit(1);
241         }       
242 }
243
244 /********************************************************************/
245 void ValidCalculators::initialShared() {
246         try {   
247                 shared["sharedsobs"]                    = "sharedsobs";
248                 shared["sharedchao"]                    = "sharedchao";
249                 shared["sharedace"]                             = "sharedace";
250                 shared["jabund"]                                = "jabund";
251                 shared["sorabund"]                              = "sorabund";
252                 shared["jclass"]                                = "jclass";
253                 shared["sorclass"]                              = "sorclass";
254                 shared["jest"]                                  = "jest";
255                 shared["sorest"]                                = "sorest";
256                 shared["thetayc"]                               = "thetayc";
257                 shared["thetan"]                                = "thetan";
258                 shared["kstest"]                                = "kstest";
259                 shared["whittaker"]                         = "whittaker";
260                 shared["sharednseqs"]                   = "sharednseqs";
261                 shared["ochiai"]                                = "ochiai";
262                 shared["anderberg"]                             = "anderberg";
263                 shared["kulczynski"]                    = "kulczynski";
264                 shared["kulczynskicody"]                = "kulczynskicody";
265                 shared["lennon"]                                = "lennon";
266                 shared["morisitahorn"]                  = "morisitahorn";
267                 shared["braycurtis"]                    = "braycurtis";
268                 shared["default"]                   = "default";
269         }
270         catch(exception& e) {
271                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialShared. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
272                 exit(1);
273         }
274         catch(...) {
275                 cout << "An unknown error has occurred in the ValidCalculator class function initialShared. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
276                 exit(1);
277         }       
278 }
279
280 /********************************************************************/
281 void ValidCalculators::initialRarefaction() {
282         try {   
283                 rarefaction["sobs"]                     = "sobs";
284                 rarefaction["chao"]                     = "chao";
285                 rarefaction["ace"]                      = "ace";
286                 rarefaction["jack"]                     = "jack";
287                 rarefaction["shannon"]          = "shannon";
288                 rarefaction["npshannon"]        = "npshannon";
289                 rarefaction["simpson"]          = "simpson";
290                 rarefaction["bootstrap"]        = "bootstrap";
291                 rarefaction["nseqs"]            = "nseqs";
292                 rarefaction["coverage"]         = "coverage";
293                 rarefaction["default"]      = "default";
294         }
295         catch(exception& e) {
296                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialRarefaction. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
297                 exit(1);
298         }
299         catch(...) {
300                 cout << "An unknown error has occurred in the ValidCalculator class function initialRarefaction. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
301                 exit(1);
302         }       
303 }
304
305 /********************************************************************/
306
307 void ValidCalculators::initialSummary() {
308         try {   
309                 summary["sobs"]                 = "sobs";
310                 summary["chao"]                 = "chao";
311                 summary["ace"]                  = "ace";
312                 summary["jack"]                 = "jack";
313                 summary["shannon"]              = "shannon";
314                 summary["npshannon"]    = "npshannon";
315                 summary["simpson"]              = "simpson";
316                 summary["bergerparker"] = "bergerparker";
317                 summary["geometric"]    = "geometric";
318                 summary["bootstrap"]    = "bootstrap";
319                 summary["logseries"]    = "logseries";
320                 summary["qstat"]        = "qstat";
321                 summary["bstick"]       = "bstick";
322                 summary["nseqs"]                = "nseqs";
323                 summary["goodscoverage"]= "goodscoverage";
324                 summary["coverage"]             = "coverage";
325                 summary["efron"]        = "efron";
326                 summary["boneh"]        = "boneh";
327                 summary["solow"]        = "solow";
328                 summary["shen"]         = "shen";
329                 summary["default"]          = "default";
330         }
331         catch(exception& e) {
332                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSummary. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
333                 exit(1);
334         }
335         catch(...) {
336                 cout << "An unknown error has occurred in the ValidCalculator class function initialSummary. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
337                 exit(1);
338         }       
339 }
340
341 /********************************************************************/
342 void ValidCalculators::initialSharedSummary() {
343         try {   
344                 sharedsummary["sharedsobs"]                             = "sharedsobs";
345                 sharedsummary["sharedchao"]                             = "sharedchao";
346                 sharedsummary["sharedace"]                              = "sharedace";
347                 sharedsummary["jabund"]                                 = "jabund";
348                 sharedsummary["sorabund"]                       = "sorabund";
349                 sharedsummary["jclass"]                                 = "jclass";
350                 sharedsummary["sorclass"]                               = "sorclass";
351                 sharedsummary["jest"]                                   = "jest";
352                 sharedsummary["sorest"]                                 = "sorest";
353                 sharedsummary["thetayc"]                                = "thetayc";
354                 sharedsummary["thetan"]                                 = "thetan";
355                 sharedsummary["kstest"]                                 = "kstest";
356                 sharedsummary["whittaker"]                              = "whittaker";
357                 sharedsummary["sharednseqs"]                    = "sharednseqs";
358                 sharedsummary["ochiai"]                                 = "ochiai";
359                 sharedsummary["anderberg"]                              = "anderberg";
360                 sharedsummary["kulczynski"]                             = "kulczynski";
361                 sharedsummary["kulczynskicody"]                 = "kulczynskicody";
362                 sharedsummary["lennon"]                                 = "lennon";
363                 sharedsummary["morisitahorn"]                   = "morisitahorn";
364                 sharedsummary["braycurtis"]                             = "braycurtis";
365                 sharedsummary["default"]                                = "default";
366         }
367         catch(exception& e) {
368                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSharedSummary. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
369                 exit(1);
370         }
371         catch(...) {
372                 cout << "An unknown error has occurred in the ValidCalculator class function initialSharedSummary. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
373                 exit(1);
374         }       
375 }
376
377
378 /********************************************************************/
379
380 void ValidCalculators::initialSharedRarefact() {
381         try {   
382                 sharedrarefaction["sharedobserved"]     = "sharedobserved";
383                 sharedrarefaction["sharednseqs"]        = "sharednseqs";
384                 sharedrarefaction["default"]        = "default";
385         }
386         catch(exception& e) {
387                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSharedRarefact. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
388                 exit(1);
389         }
390         catch(...) {
391                 cout << "An unknown error has occurred in the ValidCalculator class function initialSharedRarefact. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
392                 exit(1);
393         }       
394 }
395
396
397 /********************************************************************/
398 void ValidCalculators::initialVennSingle() {
399         try {
400                 vennsingle["sobs"]              = "sobs";
401                 vennsingle["chao"]                  = "chao";
402                 vennsingle["ace"]                       = "ace";
403                 vennsingle["jack"]                  = "jack";
404                 vennsingle["default"]           = "default";
405         }
406         catch(exception& e) {
407                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
408                 exit(1);
409         }
410         catch(...) {
411                 cout << "An unknown error has occurred in the ValidCalculator class function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
412                 exit(1);
413         }       
414 }
415
416 /********************************************************************/
417 void ValidCalculators::initialVennShared() {
418         try {
419                 vennshared["sharedsobs"]        = "sharedsobs";
420                 vennshared["sharedchao"]        = "sharedchao";
421                 vennshared["sharedace"]         = "sharedace";
422                 vennshared["default"]           = "default";
423         }
424         catch(exception& e) {
425                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
426                 exit(1);
427         }
428         catch(...) {
429                 cout << "An unknown error has occurred in the ValidCalculator class function initialSingle. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
430                 exit(1);
431         }       
432 }
433
434 /********************************************************************/
435 void ValidCalculators::initialTreeGroups() {
436         try {   
437                 treegroup["jabund"]                                     = "jabund";
438                 treegroup["sorabund"]                           = "sorabund";
439                 treegroup["jclass"]                                     = "jclass";
440                 treegroup["sorclass"]                           = "sorclass";
441                 treegroup["jest"]                                       = "jest";
442                 treegroup["sorest"]                                     = "sorest";
443                 treegroup["thetayc"]                            = "thetayc";
444                 treegroup["thetan"]                                     = "thetan";
445                 treegroup["morisitahorn"]                       = "morisitahorn";
446                 treegroup["braycurtis"]                         = "braycurtis";
447         }
448         catch(exception& e) {
449                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialTreeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
450                 exit(1);
451         }
452         catch(...) {
453                 cout << "An unknown error has occurred in the ValidCalculator class function initialTreeGroups. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
454                 exit(1);
455         }       
456 }
457 /********************************************************************/
458 void ValidCalculators::initialHeat() {
459         try {   
460                 heat["jabund"]                          = "jabund";
461                 heat["sorabund"]                        = "sorabund";
462                 heat["jclass"]                          = "jclass";
463                 heat["sorclass"]                        = "sorclass";
464                 heat["jest"]                            = "jest";
465                 heat["sorest"]                          = "sorest";
466                 heat["thetayc"]                         = "thetayc";
467                 heat["thetan"]                          = "thetan";
468                 heat["morisitahorn"]            = "morisitahorn";
469                 heat["braycurtis"]                      = "braycurtis";
470         }
471         catch(exception& e) {
472                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialHeat. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
473                 exit(1);
474         }
475         catch(...) {
476                 cout << "An unknown error has occurred in the ValidCalculator class function initialHeat. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
477                 exit(1);
478         }       
479 }
480
481 /********************************************************************/
482 void ValidCalculators::initialMatrix() {
483         try {   
484                 matrix["jabund"]                                = "jabund";
485                 matrix["sorabund"]                              = "sorabund";
486                 matrix["jclass"]                                = "jclass";
487                 matrix["sorclass"]                              = "sorclass";
488                 matrix["jest"]                                  = "jest";
489                 matrix["sorest"]                                = "sorest";
490                 matrix["thetayc"]                               = "thetayc";
491                 matrix["thetan"]                                = "thetan";
492                 matrix["morisitahorn"]                  = "morisitahorn";
493                 matrix["braycurtis"]                    = "braycurtis";
494         }
495         catch(exception& e) {
496                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialMatrix. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
497                 exit(1);
498         }
499         catch(...) {
500                 cout << "An unknown error has occurred in the ValidCalculator class function initialMatrix. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
501                 exit(1);
502         }       
503 }
504
505 /********************************************************************/
506 void ValidCalculators::initialBoot() {
507         try {   
508                 boot["jabund"]                          = "jabund";
509                 boot["sorabund"]                        = "sorabund";
510                 boot["jclass"]                          = "jclass";
511                 boot["sorclass"]                        = "orclass";
512                 boot["jest"]                            = "jest";
513                 boot["sorest"]                          = "sorest";
514                 boot["thetayc"]                         = "thetayc";
515                 boot["thetan"]                          = "thetan";
516                 boot["morisitahorn"]            = "morisitahorn";
517                 boot["braycurtis"]                      = "braycurtis";
518         }
519         catch(exception& e) {
520                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialBoot. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
521                 exit(1);
522         }
523         catch(...) {
524                 cout << "An unknown error has occurred in the ValidCalculator class function initialBoot. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
525                 exit(1);
526         }       
527 }
528 /********************************************************************/
529 void ValidCalculators::initialDistance() {
530         try {   
531                 distance["nogaps"]              = "nogaps";
532                 distance["eachgap"]             = "eachgap";
533                 distance["onegap"]              = "onegap";
534         }
535         catch(exception& e) {
536                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function initialDistance. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
537                 exit(1);
538         }
539         catch(...) {
540                 cout << "An unknown error has occurred in the ValidCalculator class function initialDistance. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
541                 exit(1);
542         }       
543 }
544
545 /********************************************************************/
546 void ValidCalculators::printCalc(string parameter, ostream& out) {
547         try{
548                 out << "The available estimators for calc are ";
549                 //are you looking for a calculator for a single parameter
550                 if (parameter == "single") {
551                         for (it = single.begin(); it != single.end(); it++) {
552                                 out << it->first << ", ";
553                         }
554                 //are you looking for a calculator for a shared parameter
555                 }else if (parameter == "shared") {
556                         for (it = shared.begin(); it != shared.end(); it++) {
557                                 out << it->first << ", ";
558                         }
559                 //are you looking for a calculator for a rarefaction parameter
560                 }else if (parameter == "rarefaction") {
561                         for (it = rarefaction.begin(); it != rarefaction.end(); it++) {
562                                 out << it->first << ", ";
563                         }
564                 //are you looking for a calculator for a summary parameter
565                 }else if (parameter == "summary") {
566                         for (it = summary.begin(); it != summary.end(); it++) {
567                                 out << it->first << ", ";
568                         }
569                 //are you looking for a calculator for a sharedsummary parameter
570                 }else if (parameter == "sharedsummary") {
571                         for (it = sharedsummary.begin(); it != sharedsummary.end(); it++) {
572                                 out << it->first << ", ";
573                         }
574                 }else if (parameter == "sharedrarefaction") {
575                         for (it = sharedrarefaction.begin(); it != sharedrarefaction.end(); it++) {
576                                 out << it->first << ", ";
577                         }
578                 }else if (parameter == "vennsingle") {
579                         for (it = vennsingle.begin(); it != vennsingle.end(); it++) {
580                                 out << it->first << ", ";
581                         }
582                 }else if (parameter == "vennshared") {
583                         for (it = vennshared.begin(); it != vennshared.end(); it++) {
584                                 out << it->first << ", ";
585                         }
586                 }else if (parameter == "treegroup") {
587                         for (it = treegroup.begin(); it != treegroup.end(); it++) {
588                                 out << it->first << ", ";
589                         }
590                 }else if (parameter == "matrix") {
591                         for (it = matrix.begin(); it != matrix.end(); it++) {
592                                 out << it->first << ", ";
593                         }
594                 }else if (parameter == "boot") {
595                         for (it = boot.begin(); it != boot.end(); it++) {
596                                 out << it->first << ", ";
597                         }
598                 }else if (parameter == "distance") {
599                         for (it = distance.begin(); it != distance.end(); it++) {
600                                 out << it->first << ", ";
601                         }
602                 }
603
604                 out << endl;
605         }
606         catch(exception& e) {
607                 cout << "Standard Error: " << e.what() << " has occurred in the ValidCalculator class Function printCalc. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
608                 exit(1);
609         }
610         catch(...) {
611                 cout << "An unknown error has occurred in the ValidCalculator class function printCalc. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
612                 exit(1);
613         }       
614
615 }
616 /********************************************************************/
617