Bioconductor / Biostrings

Efficient manipulation of biological strings
https://bioconductor.org/packages/Biostrings
54 stars 16 forks source link

get Seq off limits #100

Closed MelinaKlostermann closed 5 months ago

MelinaKlostermann commented 1 year ago

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 1 year ago

please provide a reproducible example

hpages commented 5 months ago

Closing this for lack of reproducible example.