Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

regex search plugin bug #833

Open
nathandunn opened this issue Dec 1, 2016 · 2 comments
Open

regex search plugin bug #833

nathandunn opened this issue Dec 1, 2016 · 2 comments
Labels
bug this is a problem that needs to be fixed help wanted actively soliciting new contributors to take this on!

Comments

@nathandunn
Copy link
Contributor

related to GMOD/Apollo#267

I get good results for forward-strand AA and DNA and reverse-strand DNA. For some bizarre reason, reverse-strand AA fails and drops strand info as well depending on the zoom level.

Top strand is protein search strand and bottom strand is dna search strand:

screen shot 2016-12-01 at 11 24 14 am

When I zoom in the strand is dropped and its in the wrong place. No console errors.

screen shot 2016-12-01 at 11 24 24 am

@cmdcolin
Copy link
Contributor

It's likely because the search string crosses block boundaries, and block boundaries change depending on zoom level so that's the weird behavior.

There are probably a lot of corner cases that are not really possible to address if you keep the block based boundaries limitation for this plugin. You can just imagine constructing a regex that crosses a boundary and therefore doesn't match. Or just plugin a really long dna string into the search box, it won't match because it crosses a block boundary and therefore is not found since regex is evaluated within each block.

One workaround is to instruct jbrowse to load the sequence for the visible region into a string (in contrast to calculating on the blocks, you are loading the sequence for entire visible region in a string).....and then you can run the regex over that. This allows consistent evaluation of the regex within the region. Downside is that you might need to add a button or something to update the view when the user scrolls, since it'd be resource intensive to automatically do that every time user scrolls.

@rbuels rbuels added bug this is a problem that needs to be fixed needs review this needs investigation before work can be done labels Jan 28, 2018
@rbuels
Copy link
Collaborator

rbuels commented Jan 28, 2018

It might be possible to have the plugin look at some sequence past each block boundary to reduce the impact of this.

@rbuels rbuels added help wanted actively soliciting new contributors to take this on! and removed needs review this needs investigation before work can be done labels Jan 28, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug this is a problem that needs to be fixed help wanted actively soliciting new contributors to take this on!
Projects
None yet
Development

No branches or pull requests

3 participants