Bioconductor/Biostrings

get Seq off limits

MelinaKlostermann opened this issue · 2 comments

Hello,
this is not a bug, but it would make my life a lot easier :)
I often have the problem that I get a the following error when using getSeq(granges, x = custom_sequences. (I use the mature transcript sequences from a fasta file as x).

Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'XStringSet': error in evaluating the argument 'value' in selecting a method for function 'unsplit': some ranges in 'at' are off-limits with respect to their corresponding
sequence in 'x'

I know that I can resolve the error by filtering my Granges file before, but I if the function would put NA for the lines that are off limits and not break, this would save me several lines of code and I ran into this problem quite often now. So I was wondering if maybe I am not the only one with this issue and it might be worth to catch the eror somehow without interrupting to improve usability.

Bests

vjcitn commented

please provide a reproducible example

Closing this for lack of reproducible example.