Skip to content

Commit

Permalink
Correct warning bounds for hg filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bkille committed Aug 19, 2023
1 parent 565756b commit 93d12ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/map/include/parseCmdArgs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ sequences shorter than segment length will be ignored", ArgvParser::OptionRequir

cmd.defineOption("noHgFilter", "Don't use the hypergeometric filtering and instead use the MashMap2 first pass filtering.");
cmd.defineOption("hgFilterAniDiff", "Filter out mappings unlikely to be this ANI less than the best mapping [default: 0.0]", ArgvParser::OptionRequiresValue);
cmd.defineOption("hgFilterConf", "Confidence value for the hypergeometric filtering [default: 0.999]", ArgvParser::OptionRequiresValue);
cmd.defineOption("hgFilterConf", "Confidence value for the hypergeometric filtering [default: 99.9%]", ArgvParser::OptionRequiresValue);

cmd.defineOption("filterLengthMismatches", "Filter mappings where the ratio of reference/query mapped lengths disagrees with the ANI threshold");

Expand Down Expand Up @@ -564,11 +564,11 @@ sequences shorter than segment length will be ignored", ArgvParser::OptionRequir
if (cmd.foundOption("hgFilterAniDiff")) {
str << cmd.optionValue("hgFilterAniDiff");
str >> parameters.ANIDiff;
parameters.ANIDiff /= 100;
if (parameters.ANIDiff < 0 || parameters.ANIDiff > 100) {
std::cerr << "ERROR, skch::parseandSave, ANI difference must be between 0 and 100" << std::endl;
exit(1);
}
parameters.ANIDiff /= 100;
} else {
parameters.ANIDiff = skch::fixed::ANIDiff;
}
Expand All @@ -577,11 +577,11 @@ sequences shorter than segment length will be ignored", ArgvParser::OptionRequir
if (cmd.foundOption("hgFilterConf")) {
str << cmd.optionValue("hgFilterConf");
str >> parameters.ANIDiffConf;
parameters.ANIDiffConf /= 100;
if (parameters.ANIDiffConf < 0 || parameters.ANIDiffConf > 1) {
std::cerr << "ERROR, skch::parseandSave, hypergeometric confidence must be between 0 and 1" << std::endl;
if (parameters.ANIDiffConf < 0 || parameters.ANIDiffConf > 100) {
std::cerr << "ERROR, skch::parseandSave, hypergeometric confidence must be between 0 and 100" << std::endl;
exit(1);
}
parameters.ANIDiffConf /= 100;
} else {
parameters.ANIDiffConf = skch::fixed::ANIDiffConf;
}
Expand Down

0 comments on commit 93d12ad

Please sign in to comment.