]> git.donarmstrong.com Git - mothur.git/blobdiff - nameassignment.cpp
Merge remote-tracking branch 'origin/master'
[mothur.git] / nameassignment.cpp
index 641be4e626fb9c52b9035a979acd95dbe654e35a..126c4e0c594b6745ec6a7c4fcd5228c717d67677 100644 (file)
@@ -6,7 +6,7 @@
 
 NameAssignment::NameAssignment(string nameMapFile){
        m = MothurOut::getInstance();
-       openInputFile(nameMapFile, fileHandle);
+       m->openInputFile(nameMapFile, fileHandle);
        
 }
 
@@ -22,7 +22,7 @@ void NameAssignment::readMap(){
                int rowIndex = 0;
                
                while(fileHandle){
-                       fileHandle >> firstCol;                         //read from first column
+                       fileHandle >> firstCol; m->gobble(fileHandle);                  //read from first column
                        fileHandle >> secondCol;                        //read from second column
                                                
                        itData = (*this).find(firstCol);
@@ -34,7 +34,7 @@ void NameAssignment::readMap(){
                                
                        }else{  m->mothurOut(firstCol + " is already in namesfile. I will use first definition."); m->mothurOutEndLine();  }
                        
-                       gobble(fileHandle);
+                       m->gobble(fileHandle);
                }
                fileHandle.close();
        
@@ -76,6 +76,7 @@ void NameAssignment::print(ostream& out){
 //cout << (*this).size() << endl;
                for(it = (*this).begin(); it!=(*this).end(); it++){
                        out << it->first << '\t' <<  it->second << endl;  //prints out keys and values of the map this.
+                       //out << it->first << '\t' <<  it->first << endl;
                }
        }
        catch(exception& e) {