MCPcopy Create free account
hub / github.com/OpenGene/fastp / initIndexFiltering

Method initIndexFiltering

src/options.cpp:462–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void Options::initIndexFiltering(string blacklistFile1, string blacklistFile2, int threshold) {
463 if(blacklistFile1.empty() && blacklistFile2.empty())
464 return;
465
466 if(!blacklistFile1.empty()){
467 check_file_valid(blacklistFile1);
468 indexFilter.blacklist1 = makeListFromFileByLine(blacklistFile1);
469 }
470
471 if(!blacklistFile2.empty()){
472 check_file_valid(blacklistFile2);
473 indexFilter.blacklist2 = makeListFromFileByLine(blacklistFile2);
474 }
475
476 if(indexFilter.blacklist1.empty() && indexFilter.blacklist2.empty())
477 return;
478
479 indexFilter.enabled = true;
480 indexFilter.threshold = threshold;
481}
482
483vector<string> Options::makeListFromFileByLine(string filename) {
484 vector<string> ret;

Callers 1

mainFunction · 0.80

Calls 1

check_file_validFunction · 0.85

Tested by

no test coverage detected