seqan3 icon indicating copy to clipboard operation
seqan3 copied to clipboard

[WIP] append to sequence file output

Open eseiler opened this issue 7 months ago • 2 comments

Example usage:

seqan3::sequence_file_output fout{"/tmp/test.sam",
                                  seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{},
                                  std::ios_base::app};
  • It's annoying, but acceptable, that the fields have to be given.
Old

Example usage:

seqan3::sequence_file_output fout{"/tmp/test.sam",
                                  seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{},
                                  {.append = true}};
  • It's annoying, but acceptable, that the fields have to be given.
  • I just reused sequence_file_output_options for this because I didn't want to add another enum/strong type. We could also do an enum or a bool. Or even a std::ios_base::openmode (with constraints?).
  • sequence_file_output_options::append is the only option that's fixed on construction
seqan3::sequence_file_output fout{"/tmp/test.sam",
                                  seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{},
                                  {.append = true}};
fout.options.append = false; // No effect
seqan3::sequence_file_output fout{"/tmp/test.sam",
                                  seqan3::fields<seqan3::field::id, seqan3::field::seq, seqan3::field::qual>{}};
fout.options.append = true; // No effect

eseiler avatar May 22 '25 14:05 eseiler

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.11%. Comparing base (ca62168) to head (599f0f5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3365   +/-   ##
=======================================
  Coverage   98.11%   98.11%           
=======================================
  Files         270      270           
  Lines       11913    11913           
  Branches      103      103           
=======================================
  Hits        11689    11689           
  Misses        224      224           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 22 '25 14:05 codecov[bot]

Documentation preview available at https://docs.seqan.de/preview/seqan/seqan3/3365

seqan-actions avatar May 22 '25 15:05 seqan-actions