Skip to content
Prev 10123 / 21312 Next

[Bioc-devel] vmatchPattern Returns Out of Bounds Indices

Hello,

If using vmatchPattern to find a sequence in another sequence, the resulting end index can be beyond the length of the subject XStringSet. For example:

forwardPrimer <- "TCTTGTGGAAAGGACGAAACACCG"
[1] 75 75
primerEnds <- vmatchPattern(forwardPrimer, reads, max.mismatch = 1)
[1] 23 76

This causes problems if using extractAt to obtain the sequences within each read. For example:

sequences = extractAt(reads, locations)
Error in .normarg_at2(at, x) : 
  some ranges in 'at' are off-limits with respect to their corresponding sequence
  in 'x'

It's rare, but still a problem, nonetheless.
FALSE   TRUE 
366225      2

This happens with Biostrings 2.42.0.

--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia