New issue

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

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

Already on GitHub? Sign in to your account

Highlight with negative start value prevent JBrowse loading. #769

h2akim opened this Issue Jun 17, 2016 · 4 comments


None yet
3 participants

h2akim commented Jun 17, 2016

I have tested this problem when highlight using highlight from middle to start. Difficulty to precisely set the highlight to 0 would force user to highlight all the way before 0 coordinate (negative value).

Returning back to the URL with highlight parameter including start coordinate with negative value prevent JBrowse from loading at all.

Suggestion: Force the highlight to reset to 0 when highlight start is below 0 value. I've tried to fix on the source, currently no luck.

Thanks :)


This comment has been minimized.


cmdcolin commented Jun 20, 2016

I think this patch can fix it. It just fixes the regex that is used to parse the location

diff --git a/src/JBrowse/Util.js b/src/JBrowse/Util.js
index fd1841b..3e5133c 100644
--- a/src/JBrowse/Util.js
+++ b/src/JBrowse/Util.js
@@ -296,7 +296,7 @@ Util = {
             locstring = tokens[1];

-        tokens = locstring.match( /^\s*([\d,]+)\s*\.\.+\s*([\d,]+)/ );
+        tokens = locstring.match( /^\s*([-\d,]+)\s*\.\.+\s*([-\d,]+)/ );
         if( tokens ) { // range of two numbers?
             location.start = parseCoord( tokens[1] )-1;


This comment has been minimized.


cmdcolin commented Jun 20, 2016

Either a patch like that could be used or just something more general that catches the case where the regex fails


This comment has been minimized.

h2akim commented Aug 25, 2016

Seems now JBrowse force negative number to re-set to 1. I close the issue.

@h2akim h2akim closed this Aug 25, 2016


This comment has been minimized.


cmdcolin commented Aug 25, 2016

@h2akim I think it's a real bug

It affects the &highlight= but it doesn't affect &loc=

See following link

@h2akim h2akim reopened this Aug 25, 2016

@rbuels rbuels added the bug label Jan 28, 2018

@rbuels rbuels added this to the 1.12.4 milestone Jan 28, 2018

@wafflebot wafflebot bot added the in progress label Feb 12, 2018

@rbuels rbuels closed this in 1e6f250 Feb 12, 2018

@wafflebot wafflebot bot removed the in progress label Feb 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment