Commit e6cb2e89 authored by Li's avatar Li
Browse files

Fix an issue of early stopping

parent 8b31bade
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1963,7 +1963,7 @@ void Chromap<MappingRecord>::VerifyCandidatesOnOneDirectionUsingSIMD(Direction c
      }
      valid_candidate_index = 0;
      // Check whether we should stop early. Assuming the candidates are sorted 
      if (GetMAPQForSingleEndRead(error_threshold_, num_candidates, 0, read_length + error_threshold_, *min_num_errors, *num_best_mappings, *second_min_num_errors, *num_second_best_mappings) == 0)
      if (GetMAPQForSingleEndRead(error_threshold_, num_candidates, 0, read_length + error_threshold_, *min_num_errors, *num_best_mappings, *second_min_num_errors, *num_second_best_mappings) == 0 && candidate_count_threshold + 1 < candidates[candidate_index].count)
        candidate_count_threshold = candidates[candidate_index].count - 1 ;
    }
    ++candidate_index;