Skip to content

Commit

Permalink
Fix printed threshold calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodr97 committed Nov 22, 2024
1 parent 6c7fa1a commit 9a598e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/Cleaner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ Alignment *Cleaner::cleanByCutValueOverpass(
int residueIndex, numberColumnsToRecover, *keptResiduesGaps;
int oldNumberKeptResidues = 0, newNumberKeptResidues = 0;
Alignment *newAlig = new Alignment(*alig);
double gapThreshold = maxGaps / alig->originalNumberOfResidues;
double gapThreshold = maxGaps / alig->originalNumberOfSequences;

debug.report(InfoCode::GapThreshold, new std::string[2]{std::to_string((int) maxGaps), std::to_string(gapThreshold)});


// Select the columns with a gaps value
// less or equal than the cut point.
//
Expand Down Expand Up @@ -536,7 +535,7 @@ Alignment *Cleaner::cleanStrict(int gapCut, const int *gInCol, float simCut, con
int i, x, pos, counter, lenBlock;
Alignment *newAlig = new Alignment(*alig);

double gapThreshold = (double) gapCut / alig->originalNumberOfResidues;
double gapThreshold = (double) gapCut / alig->originalNumberOfSequences;
debug.report(InfoCode::GapThreshold, new std::string[2]{std::to_string(gapCut), std::to_string(gapThreshold)});

// Reject columns with gaps number greater than the gap threshold.
Expand Down

0 comments on commit 9a598e6

Please sign in to comment.