]> git.donarmstrong.com Git - mothur.git/blobdiff - formatphylip.cpp
fixed bugs for 1.8
[mothur.git] / formatphylip.cpp
index 4a7878a54a19fb6a63ad32c00d359c7b490e5216..d7211cf8c0a2b1b0ef08c8696e348358404ae369 100644 (file)
@@ -165,16 +165,16 @@ void FormatPhylipMatrix::read(NameAssignment* nameMap){
                                int index = nseqs;
                                map<int, float> rowMap;
                                map<int, float>::iterator itRow;
-
+                               rowPos.resize(nseqs, -1);
                 
                                for(int i=0;i<nseqs;i++){
                                        fileHandle >> name;                
-                                                                               
+                                                                       
                                        list->set(i, name);
                                        
                                        for(int j=0;j<nseqs;j++){
                                                fileHandle >> distance;
-                                               
+                                       
                                                if (distance == -1) { distance = 1000000; }
                                                
                                                if((distance < cutoff) && (j != i)){
@@ -184,6 +184,8 @@ void FormatPhylipMatrix::read(NameAssignment* nameMap){
                                                reading->update(index);
                                        }
                                        
+                                       gobble(fileHandle);
+                       
                                        //save position in file of each new row
                                        rowPos[i] = out.tellp();