@@ -287,14 +287,14 @@ void IndexCreator::getTaxonomyOfAccessions(vector<Accession> & observedAccession
287287 vector<pair<string, pair<TaxID, TaxID>>> acc2accId;
288288 int fd = open (acc2taxidFileName.c_str (), O_RDONLY);
289289 if (fd < 0 ) {
290- cerr << " Cannot open file for mapping from accession to tax ID" << endl;
290+ cout << " Cannot open file for mapping from accession to tax ID" << endl;
291291 return ;
292292 }
293293
294294 // Get the size of the file
295295 struct stat sb;
296296 if (fstat (fd, &sb) == -1 ) {
297- cerr << " Cannot get the size of the file for mapping from accession to tax ID" << endl;
297+ cout << " Cannot get the size of the file for mapping from accession to tax ID" << endl;
298298 close (fd);
299299 return ;
300300 }
@@ -304,7 +304,7 @@ void IndexCreator::getTaxonomyOfAccessions(vector<Accession> & observedAccession
304304 // Map the file to memory
305305 char * fileData = static_cast <char *>(mmap (nullptr , fileSize, PROT_READ, MAP_PRIVATE, fd, 0 ));
306306 if (fileData == MAP_FAILED) {
307- cerr << " mmap failed" << endl;
307+ cout << " mmap failed" << endl;
308308 close (fd);
309309 return ;
310310 }
@@ -353,7 +353,7 @@ void IndexCreator::getTaxonomyOfAccessions(vector<Accession> & observedAccession
353353 TaxID accTaxId = taxonomy->getSmallestUnusedExternalTaxID (usedExternalTaxIDs);
354354 acc2accId.emplace_back (accession, make_pair (taxID, accTaxId));
355355 if (accTaxId == 0 ) {
356- cerr << " accTaxId is 0 for accession " << accession << " " << taxID << endl;
356+ cout << " accTaxId is 0 for accession " << accession << " " << taxID << endl;
357357 }
358358 observedAccessionsVec[it->second ].taxID = accTaxId;
359359 newTaxons.emplace_back (accTaxId, taxID, " accession" , accession);
@@ -366,7 +366,7 @@ void IndexCreator::getTaxonomyOfAccessions(vector<Accession> & observedAccession
366366 }
367367
368368 if (munmap (fileData, fileSize) == -1 ) {
369- cerr << " munmap failed" << endl;
369+ cout << " munmap failed" << endl;
370370 }
371371
372372 if (par.accessionLevel == 1 ) {
@@ -379,7 +379,7 @@ void IndexCreator::getTaxonomyOfAccessions(vector<Accession> & observedAccession
379379 vector<std::string> unmappedAccessions;
380380 for (size_t i = 0 ; i < observedAccessionsVec.size (); ++i) {
381381 if (taxonomy->getInternalTaxID (observedAccessionsVec[i].taxID ) == 0 || observedAccessionsVec[i].taxID == 0 ) {
382- // cerr << "TaxID is 0 for accession " << observedAccessionsVec[i].accession << " " << observedAccessionsVec[i].taxID << endl;
382+ // cout << "TaxID is 0 for accession " << observedAccessionsVec[i].accession << " " << observedAccessionsVec[i].taxID << endl;
383383 unmappedAccessions.push_back (observedAccessionsVec[i].accession );
384384 continue ;
385385 }
@@ -819,7 +819,7 @@ void IndexCreator::load_assacc2taxid(const string & mappingFile, unordered_map<s
819819 }
820820 }
821821 } else {
822- cerr <<" Cannot open file for mappig from assemlby accession to tax ID" <<endl;
822+ cout <<" Cannot open file for mappig from assemlby accession to tax ID" <<endl;
823823 }
824824 map.close ();
825825}
@@ -1297,7 +1297,7 @@ void IndexCreator::loadCdsInfo(const string & cdsInfoFileList) {
12971297void IndexCreator::loadMergedTaxIds (const std::string &mergedFile, unordered_map<TaxID, TaxID> & old2new) {
12981298 std::ifstream ss (mergedFile);
12991299 if (ss.fail ()) {
1300- cerr << " File " << mergedFile << " not found!\n " ;
1300+ cout << " File " << mergedFile << " not found!\n " ;
13011301 EXIT (EXIT_FAILURE);
13021302 }
13031303
0 commit comments