diff --git a/include/hibf/detail/sketch/toolbox.hpp b/include/hibf/detail/sketch/toolbox.hpp index 7741468c..bfd5162b 100644 --- a/include/hibf/detail/sketch/toolbox.hpp +++ b/include/hibf/detail/sketch/toolbox.hpp @@ -49,9 +49,7 @@ struct entry using distance_matrix = std::vector; //!\brief Sorts filenames and cardinalities by looking only at the cardinalities. -void sort_by_cardinalities(std::vector const & sketches, - std::vector const & counts, - std::vector & positions); +void sort_by_cardinalities(std::vector const & counts, std::vector & positions); /*!\brief Estimate the cardinality of the union for a single user bin j with all prior ones j' < j. * \param[out] estimates output row @@ -106,7 +104,6 @@ void rearrange_bins(std::vector const & sketches, */ void cluster_bins(std::vector const & sketches, - std::vector const & counts, std::vector & positions, std::vector & permutation, size_t const first, diff --git a/src/detail/layout/hierarchical_binning.cpp b/src/detail/layout/hierarchical_binning.cpp index 8dadef94..5c32438f 100644 --- a/src/detail/layout/hierarchical_binning.cpp +++ b/src/detail/layout/hierarchical_binning.cpp @@ -30,7 +30,7 @@ size_t hierarchical_binning::execute() if (!data->user_bins_arranged) { - sketch::toolbox::sort_by_cardinalities(*data->sketches, *data->kmer_counts, data->positions); + sketch::toolbox::sort_by_cardinalities(*data->kmer_counts, data->positions); if (!config.disable_estimate_union && !config.disable_rearrangement) sketch::toolbox::rearrange_bins(*data->sketches, diff --git a/src/detail/sketch/toolbox.cpp b/src/detail/sketch/toolbox.cpp index 551fe034..860d15c3 100644 --- a/src/detail/sketch/toolbox.cpp +++ b/src/detail/sketch/toolbox.cpp @@ -17,9 +17,7 @@ namespace seqan::hibf::sketch::toolbox { -void sort_by_cardinalities(std::vector const & sketches, - std::vector const & kmer_counts, - std::vector & positions) +void sort_by_cardinalities(std::vector const & kmer_counts, std::vector & positions) { assert(positions.size() <= kmer_counts.size()); @@ -97,7 +95,7 @@ void rearrange_bins(std::vector const & sketches, if (last == positions.size() || kmer_counts[positions[first]] * max_ratio > kmer_counts[positions[last]]) { // if this is not the first group, we want one bin overlap - cluster_bins(sketches, kmer_counts, positions, permutation, first, last, num_threads); + cluster_bins(sketches, positions, permutation, first, last, num_threads); first = last; } ++last; @@ -114,7 +112,6 @@ void rearrange_bins(std::vector const & sketches, } void cluster_bins(std::vector const & sketches, - std::vector const & counts, std::vector & positions, std::vector & permutation, size_t const first, diff --git a/test/unit/hibf/detail/sketch/toolbox_test.cpp b/test/unit/hibf/detail/sketch/toolbox_test.cpp index d613d058..e98081a2 100644 --- a/test/unit/hibf/detail/sketch/toolbox_test.cpp +++ b/test/unit/hibf/detail/sketch/toolbox_test.cpp @@ -68,7 +68,7 @@ struct toolbox_test : public ::testing::Test TEST_F(toolbox_test, sort_by_cardinalities) { - seqan::hibf::sketch::toolbox::sort_by_cardinalities(test_sketches, test_kmer_counts, test_positions); + seqan::hibf::sketch::toolbox::sort_by_cardinalities(test_kmer_counts, test_positions); // filenames do not change EXPECT_RANGE_EQ(test_filenames, (std::vector{"small.fa", "small.fa", "small2.fa", "small2.fa"})); @@ -264,7 +264,6 @@ TEST_F(toolbox_test, cluster_bins) { // whole range std::vector permutation{}; seqan::hibf::sketch::toolbox::cluster_bins(test_sketches, - test_kmer_counts, test_positions, permutation, 0 /*interval start*/, @@ -277,7 +276,6 @@ TEST_F(toolbox_test, cluster_bins) { // intervals std::vector permutation{}; seqan::hibf::sketch::toolbox::cluster_bins(test_sketches, - test_kmer_counts, test_positions, permutation, 0 /*interval start*/, @@ -285,7 +283,6 @@ TEST_F(toolbox_test, cluster_bins) 1 /*number of threads*/); EXPECT_RANGE_EQ(permutation, (std::vector{0})); seqan::hibf::sketch::toolbox::cluster_bins(test_sketches, - test_kmer_counts, test_positions, permutation, 1 /*interval start*/,