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