]> git.donarmstrong.com Git - mothur.git/blobdiff - seqerrorcommand.cpp
changing command name classify.shared to classifyrf.shared
[mothur.git] / seqerrorcommand.cpp
index 00897dcfee5881be8dfd37d00bbbe705a3d034f3..5879241372dd3b60b34683683a0c1edbcbd64d57 100644 (file)
@@ -358,7 +358,7 @@ int SeqErrorCommand::execute(){
                if(namesFileName != "")     {   weights = getWeights();         }
         else if (countfile != "")   {
             CountTable ct;
-            ct.readTable(countfile);
+            ct.readTable(countfile, false);
             weights = ct.getNameMap();
         }
                
@@ -666,7 +666,7 @@ int SeqErrorCommand::createProcesses(string filename, string qFileName, string r
                        int misMatchSize;
                        in >> misMatchSize; m->gobble(in);
                        if (misMatchSize > misMatchCounts.size()) {     misMatchCounts.resize(misMatchSize, 0); }
-                       for (int j = 0; j < misMatchCounts.size(); j++) {
+                       for (int j = 0; j < misMatchSize; j++) {
                                in >> tempNum; misMatchCounts[j] += tempNum;
                        }
                        m->gobble(in);
@@ -881,7 +881,7 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName,
                                if (queryFile.eof()) { break; }
                        #endif
                        
-                       if(index % 100 == 0){   m->mothurOut(toString(index));  m->mothurOutEndLine(); }
+                       if(index % 100 == 0){   m->mothurOutJustToScreen(toString(index)+"\n");  }
                }
                queryFile.close();
                outChimeraReport.close();
@@ -892,7 +892,7 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName,
                else if(qFileName != "" && aligned == false){   qualFile.close();                       }
         
                //report progress
-               m->mothurOut(toString(index));  m->mothurOutEndLine();
+               m->mothurOutJustToScreen(toString(index)+"\n"); 
                
                return index;
        }
@@ -1412,9 +1412,7 @@ int SeqErrorCommand::setLines(string filename, string qfilename, string rfilenam
                                        string sname = "";  nameStream >> sname;
                                        sname = sname.substr(1);
                     
-                    for (int i = 0; i < sname.length(); i++) {
-                        if (sname[i] == ':') { sname[i] = '_'; m->changedSeqNames = true; }
-                    }
+                    m->checkName(sname);
                                        
                                        map<string, int>::iterator it = firstSeqNames.find(sname);
                                        
@@ -1475,9 +1473,7 @@ int SeqErrorCommand::setLines(string filename, string qfilename, string rfilenam
                     istringstream nameStream(input);
                     string sname = "";  nameStream >> sname;
                     
-                    for (int i = 0; i < sname.length(); i++) {
-                        if (sname[i] == ':') { sname[i] = '_'; m->changedSeqNames = true; }
-                    }
+                    m->checkName(sname);
                     
                     map<string, int>::iterator it = firstSeqNamesReport.find(sname);