Biostrings icon indicating copy to clipboard operation
Biostrings copied to clipboard

fix: Issue #65

Open ahl27 opened this issue 8 months ago • 1 comments

THIS IS A WIP

Early stage work-in-progress solution for discussion in #65.

Goals:

  1. solve misleading "error" when BString object contains a null byte (as.raw(0))
  2. improve UX for converting between BString and raw/integer vectors

The issue in (1) is that a BString containing a null byte throws an error whenever R tries to display the position(s) containins the null byte. This leads users to think that the object itself is corrupted, when in fact it's purely an error with R attempting to display it on the console. as.integer() and other methods work properly on these objects.

This issue would be more obvious if more people used BString objects with values in the complete 0:255 range, but building a BString from bytes is currently very difficult. Helper functions to create BStrings from raw vectors would be preferable.

This PR will be blocked from merging until it's actually finalized; currently displaying to organize thoughts and reprexes.

ahl27 avatar Jun 08 '24 21:06 ahl27