]> git.donarmstrong.com Git - mothur.git/blob - globaldata.cpp
b4239f36bebb2fce5544cb171d6493c0d4a86aaf
[mothur.git] / globaldata.cpp
1 #include "globaldata.hpp"
2 #include "tree.h"
3 #include "sparsematrix.hpp"
4
5 /*******************************************************/
6
7 /******************************************************/
8 GlobalData* GlobalData::getInstance() {
9         if( _uniqueInstance == 0 ) {
10                 _uniqueInstance = new GlobalData();
11         }
12         return _uniqueInstance;
13 }
14 /*******************************************************/
15
16 /******************************************************/
17 //This function parses through the option string of the command to remove its parameters
18 void GlobalData::parseGlobalData(string commandString, string optionText){
19         try {
20                 commandName = commandString; //save command name to be used by other classes
21                 
22                 //set all non filename paramters to default
23                 reset();
24                 
25                 //clears out data from previous read
26                 if ((commandName == "read.dist") || (commandName == "read.otu") || (commandName == "read.tree")) { 
27                         clear();
28                         gGroupmap = NULL;
29                         gTree.clear();
30                         Treenames.clear();
31                         labels.clear(); lines.clear(); groups.clear();
32                         allLines = 1;
33                 }
34                 
35                 //saves help request
36                 if (commandName =="help") {
37                         helpRequest = optionText;
38                 }
39                 
40                 if (commandName == "libshuff") {
41                         iters = "10000";
42                         cutoff = "1.0";
43                 }
44                 
45                 //set default value for cutoff
46                 if (commandName == "dist.seqs") {       cutoff = "1.0";         }
47
48                 string key, value;              
49                 //reads in parameters and values
50                 if((optionText != "") && (commandName != "help")){
51                         while((optionText.find_first_of(',') != -1)) {  //while there are parameters
52                                 splitAtComma(value, optionText);
53                                 splitAtEquals(key, value);
54                                 
55                                 if (key == "phylip" )   { phylipfile = value; inputFileName = value; fileroot = value; format = "phylip";       }
56                                 if (key == "column" )   { columnfile = value; inputFileName = value; fileroot = value; format = "column";       }
57                                 if (key == "list" )             { listfile = value; inputFileName = value; fileroot = value; format = "list";           }
58                                 if (key == "rabund" )   { rabundfile = value; inputFileName = value; fileroot = value; format = "rabund";       }
59                                 if (key == "sabund" )   { sabundfile = value; inputFileName = value; fileroot = value; format = "sabund";       } 
60                                 if (key == "fasta" )    { fastafile = value; inputFileName = value; fileroot = value; format = "fasta";         }
61                                 if (key == "nexus" )    { nexusfile = value; inputFileName = value; fileroot = value; format = "nexus";         } 
62                                 if (key == "clustal" )  { clustalfile = value; inputFileName = value; fileroot = value; format = "clustal"; }
63                                 if (key == "tree" )             { treefile = value; inputFileName = value; fileroot = value; format = "tree";           }
64                                 if (key == "shared" )   { sharedfile = value; inputFileName = value; fileroot = value; format = "sharedfile";   }
65                                 if (key == "name" )             { namefile = value;             }
66                                 if (key == "order" )    { orderfile = value;    }
67                                 if (key == "group" )    { groupfile = value;    }
68                                 if (key == "cutoff" )           { cutoff = value;               }
69                                 if (key == "precision" )        { precision = value;    }
70                                 if (key == "iters" )            { iters = value;                }
71                                 if (key == "jumble" )           { jumble = value;               }
72                                 if (key == "freq" )                     { freq = value;                 }
73                                 if (key == "method" )           { method = value;               }
74                                 if (key == "fileroot" )         { fileroot = value;             }
75                                 if (key == "abund" )        { abund = value;        }
76                                 if (key == "random" )           { randomtree = value;   }
77                                 if (key == "calc")                      { calc = value;                 }
78                                 if (key == "step")                      { step = value;                 }
79                                 if (key == "form")                      { form = value;                 }
80                                 if (key == "sorted")            { sorted = value;               }
81                                 if (key == "vertical")          { vertical = value;             }
82                                 if (key == "trump")                 { trump = value;            }
83                                 if (key == "filter")            { filter = value;               }
84                                 if (key == "soft")                  { soft = value;                 }
85                                 if (key == "scale")                     { scale = value;                }
86                                 if (key == "ends" )                     { ends = value;                 }
87                                 if (key == "processors" )       { processors = value;   }
88                                 if (key == "template")          { templatefile = value; }
89                                 if (key == "search")            { search = value;               }
90                                 if (key == "ksize")                     { ksize = value;                }
91                                 if (key == "align")                 { align = value;            }
92                                 if (key == "match")                     { match = value;                }
93                                 if (key == "mismatch")          { mismatch = value;         }
94                                 if (key == "gapopen")           { gapopen = value;              }
95                                 if (key == "gapextend" )        { gapextend = value;    }
96                                 
97                                 if (key == "line") {//stores lines to be used in a set
98                                         lines.clear();
99                                         labels.clear();
100                                         line = value;
101                                         label = "";
102                                         splitAtDash(value, lines);
103                                         allLines = 0;
104                                 }
105                                 if (key == "label") {//stores labels to be used in a set
106                                         labels.clear();
107                                         lines.clear();
108                                         label = value;
109                                         line = "";
110                                         splitAtDash(value, labels);
111                                         allLines = 0;
112                                 }
113
114                                 if (key == "groups") {//stores groups to be used in a vector
115                                         Groups.clear();
116                                         groups = value;
117                                         splitAtDash(value, Groups);
118                                 }
119
120                         }
121                         
122                         //saves the last parameter
123                         value = optionText;
124                         splitAtEquals(key, value);
125                         if (key == "phylip" )   { phylipfile = value; inputFileName = value; fileroot = value; format = "phylip";       }
126                         if (key == "column" )   { columnfile = value; inputFileName = value; fileroot = value; format = "column";       }
127                         if (key == "list" )             { listfile = value; inputFileName = value; fileroot = value; format = "list";           }
128                         if (key == "rabund" )   { rabundfile = value; inputFileName = value; fileroot = value; format = "rabund";       }
129                         if (key == "sabund" )   { sabundfile = value; inputFileName = value; fileroot = value; format = "sabund";       }
130                         if (key == "fasta" )    { fastafile = value; inputFileName = value; fileroot = value; format = "fasta";         }
131                         if (key == "nexus" )    { nexusfile = value; inputFileName = value; fileroot = value; format = "nexus";         }
132                         if (key == "clustal" )  { clustalfile = value; inputFileName = value; fileroot = value; format = "clustal"; } 
133                         if (key == "tree" )             { treefile = value; inputFileName = value; fileroot = value; format = "tree";           } 
134                         if (key == "shared" )   { sharedfile = value; inputFileName = value; fileroot = value; format = "sharedfile";   } 
135                         if (key == "name" )             { namefile = value;             }
136                         if (key == "order" )    { orderfile = value;    }
137                         if (key == "group" )    { groupfile = value;    }
138                         if (key == "cutoff" )           { cutoff = value;               }
139                         if (key == "precision" )        { precision = value;    }
140                         if (key == "iters" )            { iters = value;                }
141                         if (key == "jumble" )           { jumble = value;               }
142                         if (key == "freq" )                     { freq = value;                 }
143                         if (key == "method" )           { method = value;               }
144                         if (key == "fileroot" )         { fileroot = value;             }
145                         if (key == "abund" )        { abund = value;        }
146                         if (key == "random" )           { randomtree = value;   }
147                         if (key == "calc")                      { calc = value;                 }
148                         if (key == "step")                      { step = value;                 }
149                         if (key == "form")                      { form = value;                 }
150                         if (key == "sorted")            { sorted = value;               }
151                         if (key == "vertical")          { vertical = value;             }
152                         if (key == "trump")                 { trump = value;            }
153                         if (key == "filter")            { filter = value;               }
154                         if (key == "soft")                  { soft = value;                 }
155                         if (key == "scale")                     { scale = value;                }
156                         if (key == "ends" )                     { ends = value;                 }
157                         if (key == "processors" )       { processors = value;   }
158                         if (key == "template")          { templatefile = value; }
159                         if (key == "search")            { search = value;               }
160                         if (key == "ksize")                     { ksize = value;                }
161                         if (key == "align")                 { align = value;            }
162                         if (key == "match")                     { match = value;                }
163                         if (key == "mismatch")          { mismatch = value;         }
164                         if (key == "gapopen")           { gapopen = value;              }
165                         if (key == "gapextend" )        { gapextend = value;    }
166
167                         if (key == "line") {//stores lines to be used in a vector
168                                 lines.clear();
169                                 labels.clear();
170                                 line = value;
171                                 label = "";
172                                 if (line != "all") {  splitAtDash(value, lines);  allLines = 0;  }
173                                 else { allLines = 1;  }
174                         }
175                         
176                         if (key == "label") {//stores lines to be used in a vector
177                                 labels.clear();
178                                 lines.clear();
179                                 label = value;
180                                 line = "";
181                                 if (label != "all") {  splitAtDash(value, labels);  allLines = 0;  }
182                                 else { allLines = 1;  }
183                         }
184                         
185                         if (key == "groups") {//stores groups to be used in a vector
186                                         Groups.clear();
187                                         groups = value;
188                                         splitAtDash(value, Groups);
189                         }
190                 }
191                 
192                 //set format for shared
193                 if ((listfile != "") && (groupfile != "")) { format = "shared"; }
194                 if ((phylipfile != "") && (groupfile != "")) { format = "matrix"; }
195                                 
196                 //input defaults for calculators
197                 if (commandName == "collect.single") {
198
199                         if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-shannon-npshannon-simpson"; }
200                         Estimators.clear();
201                         splitAtDash(calc, Estimators); 
202                 }
203                 if (commandName == "rarefaction.single") {
204                         if ((calc == "default") || (calc == "")) { calc = "sobs"; }
205                         Estimators.clear();
206                         splitAtDash(calc, Estimators); 
207                 }
208                 if (commandName == "collect.shared") {
209
210                         if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan"; }
211                         Estimators.clear();
212                         splitAtDash(calc, Estimators); 
213                 }
214                 if (commandName == "summary.single") {
215                         if ((calc == "default") || (calc == "")) { calc = "sobs-chao-ace-jack-shannon-npshannon-simpson"; }
216                         Estimators.clear();
217                         splitAtDash(calc, Estimators); 
218                 }
219                 if (commandName == "summary.shared") {
220                         if ((calc == "default") || (calc == "")) { calc = "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan"; }
221                         Estimators.clear();
222                         splitAtDash(calc, Estimators); 
223                 }
224                 if (commandName == "rarefaction.shared") {
225                         if ((calc == "default") || (calc == "")) { calc = "sharedobserved"; }
226                         Estimators.clear();
227                         splitAtDash(calc, Estimators); 
228                 }
229                 if (commandName == "dist.seqs") {
230                         if ((calc == "default") || (calc == "")) {  calc = "onegap";  }
231                         Estimators.clear();
232                         splitAtDash(calc, Estimators); 
233                 }
234                 if (commandName == "venn") {
235                         if ((calc == "default") || (calc == "")) { 
236                                 if (format == "list") { calc = "sobs"; }
237                                 else { calc = "sharedsobs"; }
238                         }
239                         Estimators.clear();
240                         splitAtDash(calc, Estimators); 
241                 }
242                 if ((commandName == "tree.shared") || (commandName == "bootstrap.shared")) {
243                         if (calc != "") { 
244                                 Estimators.clear();
245                                 splitAtDash(calc, Estimators);                  
246                         }else { cout << "You have not specified any calculators." << endl; }
247                 }
248
249
250                 //if you have done a read.otu with a groupfile but don't want to use it anymore because you want to do single commands
251                 if ((commandName == "collect.single") || (commandName == "rarefaction.single") || (commandName == "summary.single")) {
252                         if (listfile != "") { format = "list"; }
253                         else if (sabundfile != "") { format = "sabund"; }
254                         else if (rabundfile != "") { format = "rabund"; }
255                 }
256         }
257         catch(exception& e) {
258                 cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function parseGlobalData. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
259                 exit(1);
260         }
261         catch(...) {
262                 cout << "An unknown error has occurred in the GlobalData class function parseGlobalData. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
263                 exit(1);
264         }
265 }
266 /*******************************************************/
267
268 /******************************************************/
269 // These functions give you the option parameters of the commands
270 string GlobalData::getPhylipFile()              {       return phylipfile;      }
271 string GlobalData::getColumnFile()              {       return columnfile;      }
272 string GlobalData::getListFile()                {       return listfile;        }
273 string GlobalData::getRabundFile()              {       return rabundfile;      }
274 string GlobalData::getSabundFile()              {       return sabundfile;      }
275 string GlobalData::getNameFile()                {       return namefile;        }
276 string GlobalData::getGroupFile()               {       return groupfile;       }
277 string GlobalData::getOrderFile()               {       return orderfile;       }
278 string GlobalData::getTreeFile()                {       return treefile;        }
279 string GlobalData::getSharedFile()              {       return sharedfile;      }
280 string GlobalData::getFastaFile()               {       return fastafile;       }
281 string GlobalData::getNexusFile()               {       return nexusfile;       }
282 string GlobalData::getClustalFile()     {   return clustalfile; }
283 string GlobalData::getCutOff()                  {       return cutoff;          }
284 string GlobalData::getFormat()                  {       return format;          }
285 string GlobalData::getPrecision()               {       return precision;       }
286 string GlobalData::getMethod()                  {       return method;          }
287 string GlobalData::getFileRoot()                {       return fileroot;        }
288 string GlobalData::getIters()                   {       return iters;           }
289 string GlobalData::getJumble()                  {       return jumble;          }
290 string GlobalData::getFreq()                    {       return freq;            }
291 string GlobalData::getAbund()           {   return abund;       }
292 string GlobalData::getRandomTree()              {       return randomtree;      }
293 string GlobalData::getGroups()                  {       return groups;          }
294 string GlobalData::getStep()                    {       return step;            }
295 string GlobalData::getForm()                    {       return form;            }
296 string GlobalData::getSorted()                  {       return sorted;          }
297 string GlobalData::getTrump()                   {   return trump;       }
298 string GlobalData::getSoft()                    {   return soft;                }
299 string GlobalData::getFilter()                  {   return filter;              }
300 string GlobalData::getScale()                   {       return scale;           }
301 string GlobalData::getEnds()                    {   return ends;                }
302 string GlobalData::getProcessors()              {       return processors;      }
303 string GlobalData::getTemplateFile()    {       return templatefile;}
304 string GlobalData::getSearch()                  {       return search;          }
305 string GlobalData::getKSize()                   {       return ksize;           }
306 string GlobalData::getAlign()                   {       return align;           }
307 string GlobalData::getMatch()                   {       return match;           }
308 string GlobalData::getMismatch()                {       return mismatch;        }
309 string GlobalData::getGapopen()                 {       return gapopen;         }
310 string GlobalData::getGapextend()               {       return gapextend;       }
311
312 void GlobalData::setListFile(string file)               {       listfile = file;        inputFileName = file;}
313 void GlobalData::setGroupFile(string file)              {       groupfile = file;       }
314 void GlobalData::setRabundFile(string file)             {       rabundfile = file;      inputFileName = file;}
315 void GlobalData::setSabundFile(string file)             {       sabundfile = file;      inputFileName = file;}
316 void GlobalData::setPhylipFile(string file)             {       phylipfile = file;    inputFileName = file;}
317 void GlobalData::setColumnFile(string file)             {       columnfile = file;    inputFileName = file;}
318 void GlobalData::setSharedFile(string file)             {       sharedfile = file;      inputFileName = file; fileroot = file;}
319 void GlobalData::setNameFile(string file)               {       namefile = file;                }
320 void GlobalData::setFormat(string Format)               {       format = Format;                }
321 void GlobalData::setRandomTree(string Random)   {       randomtree = Random;    }
322 void GlobalData::setGroups(string g)                    {       groups = g;                             }
323 void GlobalData::setCalc(string Calc)                   {       calc = Calc;                    }
324 void GlobalData::setEnds(string e)                              {   ends = e;                           }
325 void GlobalData::setProcessors(string p)                {       processors = p;                 }
326
327
328 /*******************************************************/
329
330 /******************************************************/
331 GlobalData::GlobalData() {
332         //option definitions should go here...
333         helpRequest = "";
334         clear();
335         gListVector == NULL;            
336         gSparseMatrix == NULL;  
337 }
338 /*******************************************************/
339
340 /******************************************************/
341 void GlobalData::clear() {
342         //option definitions should go here...
343         phylipfile              =       "";
344         columnfile              =       "";
345         listfile                =       "";
346         rabundfile              =       "";
347         sabundfile              =       "";
348         namefile                =       "";
349         groupfile               =       ""; 
350         orderfile               =       "";
351         fastafile               =   "";
352         nexusfile               =   "";
353         clustalfile             =   "";
354         treefile                =       "";
355         sharedfile              =       "";
356         templatefile    =       "";
357         cutoff                  =       "10.00";
358         format                  =       "";
359         precision               =       "100";
360         iters                   =       "1000"; 
361         line                    =   "";
362         label                   =       "";
363         groups                  =       "";
364         jumble                  =       "1";    //0 means don't jumble, 1 means jumble.
365         randomtree              =       "";  //"" means user will enter some user trees, "outputfile" means they just want the random tree distribution to be outputted to outputfile.
366         freq                    =       "100";
367         method                  =       "furthest";
368         fileroot                =       "";
369         abund           =   "10";
370         step                    =       "0.01";
371         form                    =       "integral";
372         sorted                  =       "T";  //F means don't sort, T means sort.
373         vertical        =   "";         
374         trump           =   "";         
375         filter          =   "";         
376         soft            =   ""; 
377         scale                   =       "log10";
378         ends                    =   "T";  //yes
379         processors              =       "1";
380         search                  =       "suffix";
381         ksize                   =       "7";
382         align                   =       "blast";
383         match                   =       "1.0";
384         mismatch                =       "-1.0";
385         gapopen                 =       "-5.0";
386         gapextend               =       "-2.0";
387         
388
389 }
390
391 //*******************************************************/
392
393 /******************************************************/
394 void GlobalData::reset() {
395         cutoff                  =       "10.00";
396         precision               =       "100";
397         iters                   =       "1000"; 
398         groups                  =       "";
399         jumble                  =       "1";    //0 means don't jumble, 1 means jumble.
400         sorted                  =       "T";  //F means don't sort, T means sort.
401         randomtree              =       "";  //"" means user will enter some user trees, "outputfile" means they just want the random tree distribution to be outputted to outputfile.
402         freq                    =       "100";
403         method                  =       "furthest";
404         calc                    =       "";
405         abund                   =   "10";
406         step                    =       "0.01";
407         form                    =       "integral";
408         ends                    =   "T";
409         processors              =       "1";
410         search                  =       "suffix";
411         ksize                   =       "7";
412         align                   =       "blast";
413         match                   =       "1.0";
414         mismatch                =       "-1.0";
415         gapopen                 =       "-5.0";
416         gapextend               =       "-2.0";
417 }
418 /*******************************************************/
419
420 /******************************************************/
421 GlobalData::~GlobalData() {
422         _uniqueInstance = 0;
423         if(gListVector != NULL)         {       delete gListVector;             }
424         if(gSparseMatrix != NULL)       {       delete gSparseMatrix;   }
425         if(gorder != NULL)                      {       delete gorder;          }
426 }
427 /*******************************************************/
428
429 /*******************************************************/
430 void GlobalData::parseTreeFile() {
431         //only takes names from the first tree and assumes that all trees use the same names.
432         try {
433                 string filename = treefile;
434                 ifstream filehandle;
435                 openInputFile(filename, filehandle);
436                 int c, comment;
437                 comment = 0;
438                 
439                 //if you are not a nexus file 
440                 if ((c = filehandle.peek()) != '#') {  
441                         while((c = filehandle.peek()) != ';') { 
442                                 while ((c = filehandle.peek()) != ';') {
443                                         // get past comments
444                                         if(c == '[') {
445                                                 comment = 1;
446                                         }
447                                         if(c == ']'){
448                                                 comment = 0;
449                                         }
450                                         if((c == '(') && (comment != 1)){ break; }
451                                         filehandle.get();
452                                 }
453
454                                 readTreeString(filehandle); 
455                         }
456                 //if you are a nexus file
457                 }else if ((c = filehandle.peek()) == '#') {
458                         string holder = "";
459                                         
460                         // get past comments
461                         while(holder != "translate" && holder != "Translate"){  
462                                 if(holder == "[" || holder == "[!"){
463                                         comment = 1;
464                                 }
465                                 if(holder == "]"){
466                                         comment = 0;
467                                 }
468                                 filehandle >> holder; 
469         
470                                 //if there is no translate then you must read tree string otherwise use translate to get names
471                                 if(holder == "tree" && comment != 1){   
472                                         //pass over the "tree rep.6878900 = "
473                                         while (((c = filehandle.get()) != '(') && ((c = filehandle.peek()) != EOF) ) {;}
474
475                                         if (c == EOF ) { break; }
476                                         filehandle.putback(c);  //put back first ( of tree.
477                                         readTreeString(filehandle);     
478                                         break;
479                                 }
480                         }
481                         
482                         //use nexus translation rather than parsing tree to save time
483                         if ((holder == "translate") || (holder == "Translate")) {
484
485                                 string number, name, h;
486                                 h = ""; // so it enters the loop the first time
487                                 while((h != ";") && (number != ";")) { 
488                                         filehandle >> number;
489                                         filehandle >> name;
490         
491                                         //c = , until done with translation then c = ;
492                                         h = name.substr(name.length()-1, name.length()); 
493                                         name.erase(name.end()-1);  //erase the comma
494                                         Treenames.push_back(number);
495                                 }
496                                 if (number == ";") { Treenames.pop_back(); }  //in case ';' from translation is on next line instead of next to last name
497                         }
498                 }
499                 
500         }
501         catch(exception& e) {
502                 cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function parseTreeFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
503                 exit(1);
504         }
505         catch(...) {
506                 cout << "An unknown error has occurred in the GlobalData class function parseTreeFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
507                 exit(1);
508         }               
509 }
510 /*******************************************************/
511
512 /*******************************************************/
513 void GlobalData::readTreeString(ifstream& filehandle)   {
514         try {
515                 int c;
516                 string name; //k
517                 
518                 while((c = filehandle.peek()) != ';') { 
519                                 //if you are a name
520                         if ((c != '(') && (c != ')') && (c != ',') && (c != ':') && (c != '\n') && (c != '\t') && (c != 32)) { //32 is space
521                                 name = "";
522                                 c = filehandle.get();
523         //              k = c;
524 //cout << k << endl;
525                                 while ((c != '(') && (c != ')') && (c != ',') && (c != ':') && (c != '\n') && (c != 32) && (c != '\t')) {                       
526                                         name += c;
527                                         c = filehandle.get();
528                 //      k = c;
529 //cout << " in name while " << k << endl;
530                                 }
531                                 
532 //cout << "name = " << name << endl;
533                                 Treenames.push_back(name);
534                                 filehandle.putback(c);
535 //k = c;
536 //cout << " after putback" <<  k << endl;
537                         } 
538                         
539                         if (c  == ':') { //read until you reach the end of the branch length
540                                 while ((c != '(') && (c != ')') && (c != ',') && (c != ';') && (c != '\n') && (c != '\t') && (c != 32)) {
541                                         c = filehandle.get();
542                                 //      k = c;
543         //cout << " in branch while " << k << endl;
544                                 }
545                                 filehandle.putback(c);
546                         }
547                         c = filehandle.get();
548                         if (c == ';') { break; }
549                 //      k = c;
550 //cout << k << endl;
551
552                 }
553         }
554         catch(exception& e) {
555                 cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function parseTreeFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
556                 exit(1);
557         }
558         catch(...) {
559                 cout << "An unknown error has occurred in the GlobalData class function parseTreeFile. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
560                 exit(1);
561         }               
562 }       
563
564 /*******************************************************/
565
566 /*******************************************************/
567
568