]> git.donarmstrong.com Git - mothur.git/blob - reportfile.cpp
pat's changes to seq.error command
[mothur.git] / reportfile.cpp
1 /*
2  *  reportfile.cpp
3  *  Mothur
4  *
5  *  Created by Pat Schloss on 12/19/10.
6  *  Copyright 2010 Schloss Lab. All rights reserved.
7  *
8  */
9
10 #include "reportfile.h"
11
12 /**************************************************************************************************/
13
14 ReportFile::ReportFile(){
15         try {
16                 m = MothurOut::getInstance();
17         }
18         catch(exception& e) {
19                 m->errorOut(e, "ReportFile", "ReportFile");
20                 exit(1);
21         }                                                       
22 }
23
24 /**************************************************************************************************/
25
26 ReportFile::ReportFile(ifstream& repFile, string repFileName){
27         try {           
28                 m = MothurOut::getInstance();
29                 
30                 m->openInputFile(repFileName, repFile);
31                 m->getline(repFile);
32         }
33         catch(exception& e) {
34                 m->errorOut(e, "ReportFile", "ReportFile");
35                 exit(1);
36         }                                                       
37 }
38
39
40 /**************************************************************************************************/
41
42 ReportFile::ReportFile(ifstream& repFile){
43         try {
44                 
45                 m = MothurOut::getInstance();
46                 
47                 repFile >> queryName;
48                 repFile >> queryLength;
49                 repFile >> templateName;
50                 repFile >> templateLength;
51                 repFile >> searchMethod;
52                 repFile >> searchScore;
53                 repFile >> alignmentMethod;
54                 repFile >> queryStart;
55                 repFile >> queryEnd;
56                 repFile >> templateStart;
57                 repFile >> templateEnd;
58                 repFile >> pairwiseAlignmentLength;
59                 repFile >> gapsInQuery;
60                 repFile >> gapsInTemplate;
61                 repFile >> longestInsert;
62                 repFile >> simBtwnQueryAndTemplate;
63
64                 m->gobble(repFile);             
65         }
66         catch(exception& e) {
67                 m->errorOut(e, "ReportFile", "ReportFile");
68                 exit(1);
69         }                                                       
70         
71 }
72
73 /**************************************************************************************************/