@@ -186,14 +186,16 @@ int execute(config const & cfg)
186186
187187// https://godbolt.org/z/PeKnxzjn1
188188#if defined(__clang__)
189- auto tuple = chopper::layout::read_layout_file (layout_file);
189+ auto tuple = chopper::layout::read_layouts_file (layout_file);
190190 // https://godbolt.org/z/WoWf55KPb
191191 auto filenames = std::move (std::get<0 >(tuple));
192192 auto chopper_config = std::move (std::get<1 >(tuple));
193- auto hibf_layout = std::move (std::get<2 >(tuple));
193+ auto hibf_layouts = std::move (std::get<2 >(tuple));
194194#else
195- auto [filenames, chopper_config, hibf_layouts] = chopper::layout::read_layouts_file (layout_file );
195+ auto [filenames, chopper_config, hibf_layouts] = chopper::layout::read_layouts_file (layouts_file );
196196#endif
197+
198+ auto const & hibf_layout = hibf_layouts[0 ];
197199 auto const & hibf_config = chopper_config.hibf_config ;
198200
199201 layout_file.close ();
@@ -223,7 +225,7 @@ int execute(config const & cfg)
223225 // If the index is the same, sort by file sizes (happens for merged bins).
224226 // Using the smallest file to initialise the shared k-mers later will be less work.
225227 std::ranges::sort (
226- hibf_layouts [0 ].user_bins ,
228+ hibf_layout [0 ].user_bins ,
227229 [&filesizes](seqan::hibf::layout::layout::user_bin const & lhs,
228230 seqan::hibf::layout::layout::user_bin const & rhs)
229231 {
@@ -232,7 +234,7 @@ int execute(config const & cfg)
232234 return first_idx < second_idx || (first_idx == second_idx && filesizes[lhs.idx ] < filesizes[rhs.idx ]);
233235 });
234236
235- size_t const total_ub_count = hibf_layouts [0 ].user_bins .size ();
237+ size_t const total_ub_count = hibf_layout [0 ].user_bins .size ();
236238 progress_bar progress{total_ub_count};
237239
238240 // Create chunks containing user bin indices for one technical bin.
@@ -249,8 +251,8 @@ int execute(config const & cfg)
249251 // Two user bins belong to the same chunk if they are in the same technical bin.
250252 auto predicate = [&](size_t const lhs, size_t const rhs)
251253 {
252- auto const & lhs_ub = hibf_layouts [0 ].user_bins [lhs];
253- auto const & rhs_ub = hibf_layouts [0 ].user_bins [rhs];
254+ auto const & lhs_ub = hibf_layout [0 ].user_bins [lhs];
255+ auto const & rhs_ub = hibf_layout [0 ].user_bins [rhs];
254256 // The top-level technical bin index for the current user bin.
255257 // user_bin.previous_TB_indices.size() == 0: true for split bins, false for merged bins
256258 // user_bin.storage_TB_id: technical bin index on the lowest level
@@ -289,7 +291,7 @@ int execute(config const & cfg)
289291
290292 for (size_t const ub_index : chunk)
291293 {
292- auto const & user_bin = hibf_layouts [0 ].user_bins [ub_index];
294+ auto const & user_bin = hibf_layout [0 ].user_bins [ub_index];
293295 current_kmers.clear ();
294296
295297 // We don't need to keep the current_kmers if there are no shared k-mers to merge them with.
@@ -325,7 +327,7 @@ int execute(config const & cfg)
325327 }
326328
327329 // Into how many techincal bins is the user bin split? Always 1 for merged bins.
328- size_t const split_count{is_merged ? 1u : hibf_layouts [0 ].user_bins [chunk[0 ]].number_of_technical_bins };
330+ size_t const split_count{is_merged ? 1u : hibf_layout [0 ].user_bins [chunk[0 ]].number_of_technical_bins };
329331 size_t const avg_kmer_count = (current_kmer_set.size () + split_count - 1u ) / split_count;
330332 size_t const sketch_estimate = (sketch.estimate () + split_count - 1u ) / split_count;
331333
0 commit comments