Skip to content

Commit

Permalink
[FIX] display layout
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Jun 3, 2024
1 parent 40b79a0 commit b14cc34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ jobs:
-DCMAKE_CXX_FLAGS="-Werror ${{ matrix.cxx_flags }}"
make -j3 gtest_main
- name: Debug
if: failure()
run: cat /Users/runner/work/chopper/chopper/build/CMakeFiles/CMakeError.log

- name: Build tests
run: |
ccache -z
Expand Down
7 changes: 5 additions & 2 deletions src/util/display_layout/general.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ int execute(config const & cfg)
std::vector<uint64_t> current_kmers{};
// How many user bins are stored in the current technical bin? Always 1 for split bins.
size_t const ub_count{chunk.size()};
bool const is_merged{ub_count > 1u};
// The current technical bin is a merged bin if it contains more than one user bin or if the (only) user bin
// has previous technical bins.
bool const is_merged{ub_count > 1u || hibf_layout.user_bins[chunk[0]].previous_TB_indices.size() != 0};

for (size_t const ub_index : chunk)
{
Expand Down Expand Up @@ -326,7 +328,8 @@ int execute(config const & cfg)
progress.report();
}

// Into how many techincal bins is the user bin split? Always 1 for merged bins.
// Into how many techincal bins is the user bin split? Always 1 for merged bins. If it is a split bin,
// there is only one user bin.
size_t const split_count{is_merged ? 1u : hibf_layout.user_bins[chunk[0]].number_of_technical_bins};
size_t const avg_kmer_count = (current_kmer_set.size() + split_count - 1u) / split_count;
size_t const sketch_estimate = (sketch.estimate() + split_count - 1u) / split_count;
Expand Down

0 comments on commit b14cc34

Please sign in to comment.