]> git.donarmstrong.com Git - mothur.git/blobdiff - readcolumn.cpp
fixed sub.sample so that it will eliminate samples with abundances that are less...
[mothur.git] / readcolumn.cpp
index f6f26d512f1a11dffa1de864e971d29dd919884c..53a8c4263dddc4687acc5a64cf7c5b1d27aac647 100644 (file)
@@ -55,13 +55,8 @@ int ReadColumnMatrix::read(NameAssignment* nameMap){
                        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->second == 8) && (itB->second == 1588)) || ((itA->second == 1588) && (itB->second == 8))) { cout << "found it" << endl; }
+                       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);  }
 
                        if (distance == -1) { distance = 1000000; }
                        else if (sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.
@@ -117,12 +112,8 @@ int ReadColumnMatrix::read(NameAssignment* nameMap){
                                map<string,int>::iterator itA = nameMap->find(firstName);
                                map<string,int>::iterator itB = nameMap->find(secondName);
                                
-                               if(itA == nameMap->end()){
-                                       cerr << "BError: Sequence '" << firstName << "' was not found in the names file, please correct\n";
-                               }
-                               if(itB == nameMap->end()){
-                                       cerr << "BError: Sequence '" << secondName << "' was not found in the names file, please correct\n";
-                               }
+                               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);  }
                                
                                if (distance == -1) { distance = 1000000; }
                                else if (sim) { distance = 1.0 - distance;  }  //user has entered a sim matrix that we need to convert.