]> git.donarmstrong.com Git - mothur.git/commitdiff
get.oturep ifstream
authorwestcott <westcott>
Wed, 8 Dec 2010 16:52:46 +0000 (16:52 +0000)
committerwestcott <westcott>
Wed, 8 Dec 2010 16:52:46 +0000 (16:52 +0000)
getoturepcommand.cpp
mothur

index 44c58c31d26e66342e7a1bf73feb21f7f3919bfa..9cc99732e715d40f0ef06743bb85870a147f7036 100644 (file)
@@ -560,14 +560,15 @@ int GetOTURepCommand::execute(){
 //**********************************************************************************************************************
 void GetOTURepCommand::readNamesFile() {
        try {
+               ifstream in;
                vector<string> dupNames;
-               m->openInputFile(namefile, inNames);
+               m->openInputFile(namefile, in);
                
                string name, names, sequence;
        
-               while(!inNames.eof()){
-                       inNames >> name;                        //read from first column  A
-                       inNames >> names;               //read from second column  A,B,C,D
+               while(!in.eof()){
+                       in >> name;                     //read from first column  A
+                       in >> names;            //read from second column  A,B,C,D
                        
                        dupNames.clear();
                        
@@ -580,9 +581,9 @@ void GetOTURepCommand::readNamesFile() {
                                fasta->push_back(dupNames[i], sequence);
                        }
                
-                       m->gobble(inNames);
+                       m->gobble(in);
                }
-               inNames.close();
+               in.close();
 
        }
        catch(exception& e) {
@@ -594,14 +595,15 @@ void GetOTURepCommand::readNamesFile() {
 //read names file to find the weighted rep for each bin
 void GetOTURepCommand::readNamesFile(bool w) {
        try {
+               ifstream in;
                vector<string> dupNames;
-               m->openInputFile(namefile, inNames);
+               m->openInputFile(namefile, in);
                
                string name, names, sequence;
                
-               while(!inNames.eof()){
-                       inNames >> name;        m->gobble(inNames);             //read from first column  A
-                       inNames >> names;                                                       //read from second column  A,B,C,D
+               while(!in.eof()){
+                       in >> name;     m->gobble(in);          //read from first column  A
+                       in >> names;                                                    //read from second column  A,B,C,D
                        
                        dupNames.clear();
                        
@@ -612,9 +614,9 @@ void GetOTURepCommand::readNamesFile(bool w) {
                                nameFileMap[dupNames[i]] = name;
                        }
                        
-                       m->gobble(inNames);
+                       m->gobble(in);
                }
-               inNames.close();
+               in.close();
                
        }
        catch(exception& e) {
diff --git a/mothur b/mothur
index a3b2f0f971187f4342c63426b9ec87b924c1f70d..0f23015f75ecfda6bb2b8573acf2502237933abc 100755 (executable)
Binary files a/mothur and b/mothur differ