Biostrings
Biostrings copied to clipboard
fix: Issue #65
THIS IS A WIP
Early stage work-in-progress solution for discussion in #65.
Goals:
- solve misleading "error" when
BString
object contains a null byte (as.raw(0)
) - improve UX for converting between
BString
andraw/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 BString
s 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.