]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
fixed bug with trim.seqs allfiles=t
[mothur.git] / mothurout.cpp
index 3205ae794165a5b8c045c473403d8a66b1b54f90..5a0ea1281b3644e1c0b42035054f9f7f2e0cf0f6 100644 (file)
@@ -1229,6 +1229,33 @@ float MothurOut::ceilDist(float dist, int precision){
                exit(1);
        }
 }
+/**********************************************************************************************************************/
+int MothurOut::readNames(string namefile, map<string, string>& nameMap) { 
+       try {
+               
+               //open input file
+               ifstream in;
+               openInputFile(namefile, in);
+               
+               while (!in.eof()) {
+                       if (control_pressed) { break; }
+                       
+                       string firstCol, secondCol;
+                       in >> firstCol >> secondCol; gobble(in);
+                       
+                       nameMap[firstCol] = secondCol;
+               }
+               in.close();
+               
+               return 0;
+               
+       }
+       catch(exception& e) {
+               errorOut(e, "MothurOut", "readNames");
+               exit(1);
+       }
+}
+
 /**********************************************************************************************************************/
 map<string, int> MothurOut::readNames(string namefile) { 
        try {