Skip to content

Commit

Permalink
[FIX] Reduce number of concurrently open files
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Oct 12, 2020
1 parent c01c996 commit 49c23f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 1.0.1

## Bug fixes

* Reduced the number of open file handles ([\#10](https://github.com/seqan/raptor/pull/10))
9 changes: 4 additions & 5 deletions src/raptor_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ struct ibf_builder
{
using sequence_file_t = seqan3::sequence_file_input<dna4_traits, seqan3::fields<seqan3::field::seq>>;

std::vector<sequence_file_t> technical_bins;
technical_bins.reserve(arguments->bins);

for (size_t i = 0; i < arguments->bins; ++i)
technical_bins.emplace_back(arguments->bin_path[i]);
auto technical_bins = std::views::iota(0u, arguments->bins)
| std::views::transform( [&] (auto const i) {
return sequence_file_t{arguments->bin_path[i]};
});

seqan3::ibf_config cfg{seqan3::bin_count{arguments->bins},
seqan3::bin_size{arguments->bits / arguments->parts},
Expand Down

0 comments on commit 49c23f2

Please sign in to comment.