]> git.donarmstrong.com Git - mothur.git/blobdiff - readblast.cpp
made make.table alias to count.seqs command. added large parameter to count.seqs...
[mothur.git] / readblast.cpp
index 1efaf5b5e3526b8ec53ff3651f9de4b540720b7e..2d4947745be0a52fafba4c33f38fb6504ede2288 100644 (file)
@@ -66,7 +66,7 @@ int ReadBlast::read(NameAssignment* nameMap) {
                if (m->control_pressed) { 
                        fileHandle.close();
                        if (!hclusterWanted) {  delete matrix; }
-                       else { outOverlap.close(); remove(overlapFile.c_str()); outDist.close(); remove(distFile.c_str());  }
+                       else { outOverlap.close(); m->mothurRemove(overlapFile); outDist.close(); m->mothurRemove(distFile);  }
                        return 0;
                }
                
@@ -90,8 +90,8 @@ int ReadBlast::read(NameAssignment* nameMap) {
                                //convert name to number
                                map<string,int>::iterator itA = nameMap->find(firstName);
                                map<string,int>::iterator itB = nameMap->find(secondName);
-                               if(itA == nameMap->end()){   cerr << "AAError: Sequence '" << firstName << "' was not found in the names file, please correct\n";  exit(1);  }
-                               if(itB == nameMap->end()){   cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n"; exit(1);  }
+                               if(itA == nameMap->end()){  m->mothurOut("AAError: Sequence '" + firstName + "' was not found in the names file, please correct\n"); exit(1);  }
+                               if(itB == nameMap->end()){  m->mothurOut("ABError: Sequence '" + secondName + "' was not found in the names file, please correct\n"); exit(1);  }
                                
                                thisRowsBlastScores[itB->second] = score;
                                
@@ -117,7 +117,7 @@ int ReadBlast::read(NameAssignment* nameMap) {
                        if (m->control_pressed) { 
                                fileHandle.close();
                                if (!hclusterWanted) {  delete matrix; }
-                               else { outOverlap.close(); remove(overlapFile.c_str()); outDist.close(); remove(distFile.c_str());  }
+                               else { outOverlap.close(); m->mothurRemove(overlapFile); outDist.close(); m->mothurRemove(distFile);  }
                                delete reading;
                                return 0;
                        }
@@ -143,8 +143,8 @@ int ReadBlast::read(NameAssignment* nameMap) {
                                                //convert name to number
                                                map<string,int>::iterator itA = nameMap->find(firstName);
                                                map<string,int>::iterator itB = nameMap->find(secondName);
-                                               if(itA == nameMap->end()){   cerr << "AAError: Sequence '" << firstName << "' was not found in the names file, please correct\n";  exit(1);  }
-                                               if(itB == nameMap->end()){   cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n"; exit(1);  }
+                                               if(itA == nameMap->end()){  m->mothurOut("AAError: Sequence '" + firstName + "' was not found in the names file, please correct\n"); exit(1);  }
+                                               if(itB == nameMap->end()){  m->mothurOut("ABError: Sequence '" + secondName + "' was not found in the names file, please correct\n"); exit(1);  }
                                                
                                                //save score
                                                thisRowsBlastScores[itB->second] = score;
@@ -210,8 +210,8 @@ int ReadBlast::read(NameAssignment* nameMap) {
                                                //convert name to number
                                                map<string,int>::iterator itA = nameMap->find(firstName);
                                                map<string,int>::iterator itB = nameMap->find(secondName);
-                                               if(itA == nameMap->end()){   cerr << "AAError: Sequence '" << firstName << "' was not found in the names file, please correct\n";  exit(1);  }
-                                               if(itB == nameMap->end()){   cerr << "ABError: Sequence '" << secondName << "' was not found in the names file, please correct\n"; exit(1);  }
+                                               if(itA == nameMap->end()){  m->mothurOut("AAError: Sequence '" + firstName + "' was not found in the names file, please correct\n"); exit(1);  }
+                                               if(itB == nameMap->end()){  m->mothurOut("ABError: Sequence '" + secondName + "' was not found in the names file, please correct\n"); exit(1);  }
                                                
                                                thisRowsBlastScores[itB->second] = score;
                                                
@@ -271,7 +271,7 @@ int ReadBlast::read(NameAssignment* nameMap) {
                if (m->control_pressed) { 
                                fileHandle.close();
                                if (!hclusterWanted) {  delete matrix; }
-                               else { outOverlap.close(); remove(overlapFile.c_str()); outDist.close(); remove(distFile.c_str());  }
+                               else { outOverlap.close(); m->mothurRemove(overlapFile); outDist.close(); m->mothurRemove(distFile);  }
                                delete reading;
                                return 0;
                }
@@ -286,7 +286,7 @@ int ReadBlast::read(NameAssignment* nameMap) {
                if (m->control_pressed) { 
                                fileHandle.close();
                                if (!hclusterWanted) {  delete matrix; }
-                               else {  remove(overlapFile.c_str());  remove(distFile.c_str());  }
+                               else {  m->mothurRemove(overlapFile);  m->mothurRemove(distFile);  }
                                delete reading;
                                return 0;
                }