Biostrings
Biostrings copied to clipboard
[Bug] Overflow causes weird error message in `xscat`
XString_xscat seems to rely on int types. Passing in a value larger than the maximum size of an unsigned int will cause a confusing error message about negative-length vectors. Function should probably check for overflow and report a better error message.
library(Biostrings)
x <- paste(sample(DNA_BASES, 2^30, replace=TRUE), collapse="") # works with 2^30 - 1
x <- DNAString(x)
x <- xscat(x, x)
## Error in .Call2("XString_xscat", args, PACKAGE = "Biostrings") :
## negative length vectors are not allowed