Skip to content

Commit

Permalink
improve output
Browse files Browse the repository at this point in the history
  • Loading branch information
smehringer committed Dec 5, 2023
1 parent 714016d commit 47caf7f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/layout/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ void write_user_bins_to(std::vector<std::vector<std::string>> const & filenames,
size_t counter{};
for (auto const & filenames_of_user_bin : filenames)
{
stream << seqan::hibf::prefix::meta_header << counter++ << ' ';
// the below will write lines like this:
// @0 file1.fa file2.fa
// @1 fileABC.fa
char const separator = ' ';
stream << seqan::hibf::prefix::meta_header << counter++;
for (std::string const & filename : filenames_of_user_bin)
stream << filename << ' ';
stream.seekp(static_cast<int>(stream.tellp()) - 1); // overwrite last ' '
stream << separator << filename;
stream << '\n';
}
stream << chopper::prefix::meta_chopper_user_bins_end << '\n';
Expand Down

0 comments on commit 47caf7f

Please sign in to comment.