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