Skip to content

Commit

Permalink
fix AccWL validation
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-raden committed Sep 19, 2019
1 parent ad8eb94 commit c684460
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/bin/CommandLineParsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ CommandLineParsing::CommandLineParsing( const Personality personality )
(qAccW.name.c_str()
, value<int>(&(qAccW.val))
->default_value(qAccW.def)
->notifier(boost::bind(&CommandLineParsing::validate_numberArgument<int>,this,qAccW,_1))
->notifier(boost::bind(&CommandLineParsing::validate_qAccW,this,_1))
, std::string("accessibility computation : sliding window size for query accessibility computation"
" (arg in range ["+toString(qAccW.min)+","+toString(qAccW.max)+"];"
Expand All @@ -366,7 +365,6 @@ CommandLineParsing::CommandLineParsing( const Personality personality )
(qAccL.name.c_str()
, value<int>(&(qAccL.val))
->default_value(qAccL.def)
->notifier(boost::bind(&CommandLineParsing::validate_numberArgument<int>,this,qAccL,_1))
->notifier(boost::bind(&CommandLineParsing::validate_qAccL,this,_1))
, std::string("accessibility computation : maximal loop length (base pair span) for query accessibility computation"
" (arg in range ["+toString(qAccL.min)+","+toString(qAccL.max)+"]; 0 will use to sliding window size 'qAccW')").c_str())
Expand Down Expand Up @@ -459,7 +457,6 @@ CommandLineParsing::CommandLineParsing( const Personality personality )
(tAccW.name.c_str()
, value<int>(&(tAccW.val))
->default_value(tAccW.def)
->notifier(boost::bind(&CommandLineParsing::validate_numberArgument<int>,this,tAccW,_1))
->notifier(boost::bind(&CommandLineParsing::validate_tAccW,this,_1))
, std::string("accessibility computation : sliding window size for query accessibility computation"
" (arg in range ["+toString(tAccW.min)+","+toString(tAccW.max)+"];"
Expand All @@ -469,7 +466,6 @@ CommandLineParsing::CommandLineParsing( const Personality personality )
(tAccL.name.c_str()
, value<int>(&(tAccL.val))
->default_value(tAccL.def)
->notifier(boost::bind(&CommandLineParsing::validate_numberArgument<int>,this,tAccL,_1))
->notifier(boost::bind(&CommandLineParsing::validate_tAccL,this,_1))
, std::string("accessibility computation : maximal loop size (base pair span) for query accessibility computation"
" (arg in range ["+toString(tAccL.min)+","+toString(tAccL.max)+"]; 0 will use the sliding window size 'tAccW')").c_str())
Expand Down
8 changes: 8 additions & 0 deletions src/bin/CommandLineParsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,8 @@ void CommandLineParsing::validate_qSet(const std::string & value) {
inline
void CommandLineParsing::validate_qAccW(const int & value)
{
// standard check
validate_numberArgument<int>(qAccW,value);
// check lower bound
if (qAccW.val > 0 && qAccW.val < 3) {
LOG(ERROR) <<"\n qAccW = " <<value <<" : has to be 0 or > 3";
Expand All @@ -1159,6 +1161,8 @@ void CommandLineParsing::validate_qAccW(const int & value)
inline
void CommandLineParsing::validate_qAccL(const int & value)
{
// standard check
validate_numberArgument<int>(qAccL,value);
// check lower bound
if (qAccL.val > 0 && qAccL.val < 3) {
LOG(ERROR) <<"qAccL = " <<value <<" : has to be 0 or > 3";
Expand Down Expand Up @@ -1277,6 +1281,8 @@ void CommandLineParsing::validate_tSet(const std::string & value) {
inline
void CommandLineParsing::validate_tAccW(const int & value)
{
// standard check
validate_numberArgument<int>(tAccW,value);
// check lower bound
if (tAccW.val > 0 && tAccW.val < 3) {
LOG(ERROR) <<"tAccW = " <<value <<" : has to be 0 or > 3";
Expand All @@ -1289,6 +1295,8 @@ void CommandLineParsing::validate_tAccW(const int & value)
inline
void CommandLineParsing::validate_tAccL(const int & value)
{
// standard check
validate_numberArgument<int>(tAccL,value);
// check lower bound
if (tAccL.val > 0 && tAccL.val < 3) {
LOG(ERROR) <<"tAccL = " <<value <<" : has to be 0 or > 3";
Expand Down

0 comments on commit c684460

Please sign in to comment.