Skip to content

Commit 0349996

Browse files
committed
[MISC] Force partial rebuild
1 parent ccb94fe commit 0349996

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/update/insert/is_fpr_exceeded.hpp

+8-6
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919
namespace raptor::detail
2020
{
2121

22-
inline bool
23-
is_fpr_exceeded_impl(raptor_index<index_structure::hibf> const & index, size_t const ibf_idx, size_t const bin_idx)
22+
inline bool is_fpr_exceeded_impl(raptor_index<index_structure::hibf> const & index,
23+
size_t const ibf_idx,
24+
size_t const bin_idx,
25+
bool const is_toplevel)
2426
{
2527
auto & hibf = index.ibf();
2628
auto & ibf = hibf.ibf_vector[ibf_idx];
@@ -34,20 +36,20 @@ is_fpr_exceeded_impl(raptor_index<index_structure::hibf> const & index, size_t c
3436
}();
3537

3638
bool const is_bin_merged = hibf.ibf_bin_to_user_bin_id[ibf_idx][bin_idx] == seqan::hibf::bin_kind::merged;
37-
double const target_fpr = is_bin_merged ? index.config().relaxed_fpr : index.fpr();
39+
double const target_fpr = is_bin_merged ? (index.config().relaxed_fpr * (is_toplevel ? 1.1 : 1.0)) : index.fpr();
3840

39-
return new_fpr > /* 1.1 * */ target_fpr; // TODO lenience?
41+
return new_fpr > target_fpr;
4042
}
4143

4244
inline bool is_fpr_exceeded(raptor_index<index_structure::hibf> const & index, insert_location const & insert_location)
4345
{
44-
return is_fpr_exceeded_impl(index, insert_location.ibf_idx, insert_location.bin_idx);
46+
return is_fpr_exceeded_impl(index, insert_location.ibf_idx, insert_location.bin_idx, false);
4547
}
4648

4749
inline bool is_fpr_exceeded(raptor_index<index_structure::hibf> const & index,
4850
rebuild_location const & rebuild_location)
4951
{
50-
return is_fpr_exceeded_impl(index, rebuild_location.ibf_idx, rebuild_location.bin_idx);
52+
return is_fpr_exceeded_impl(index, rebuild_location.ibf_idx, rebuild_location.bin_idx, true);
5153
}
5254

5355
} // namespace raptor::detail

src/update/insert_user_bin.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ void full_rebuild(update_arguments const & arguments, raptor_index<index_structu
256256

257257
seqan::hibf::config config{index.config()};
258258
// TODO: Should this accept a user given tmax?
259-
config.tmax = 0u; //seqan::hibf::next_multiple_of_64(config.tmax + 64u);
259+
// TODO: Partial!
260+
// config.tmax = 0u; //seqan::hibf::next_multiple_of_64(config.tmax + 64u);
260261
config.input_fn = std::move(input_fn);
261262
config.number_of_user_bins = bin_path.size();
262263
config.threads = arguments.threads;

0 commit comments

Comments
 (0)