-
Notifications
You must be signed in to change notification settings - Fork 63
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
Avoid performing a text index search if input looks like a locstring #2960
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2960 +/- ##
==========================================
+ Coverage 60.67% 60.68% +0.01%
==========================================
Files 601 601
Lines 27342 27353 +11
Branches 6654 6665 +11
==========================================
+ Hits 16589 16600 +11
Misses 10442 10442
Partials 311 311
Continue to review full report at Codecov.
|
issue that this fixes was noted in gitter by @Shellfishgene |
Now it tries to detect essentially strings that are like ctgA:100 But won't do it for something like ctgA:FEATID It does so by detecting whether the string after the colon is a valid number, e.g. !Number.isNaN(parseInt(strAfterColon,10)), and if so, it thinks it is a locstring. |
946f695
to
141dd6a
Compare
Hello, I'm not sure if this is the right place to comment or I should open a new issue, but related to this it could be useful to interpret three words strings in the search bars as genome coordinates, without the need to include I think this may be helpful to users as I often browse the genome by copying coordinates from BED files or GRanges objects in R that have formats of chr |
@jantusan that sounds like a great idea, i'll reference this in a new issue. i think it should be possible to do |
@jantusan this feature was released in v1.7.10! at least the white space generated (chr start end), the chr\tstart-end wasn't done. let me know if the chr\tstart-end is valuable too |
Possible shortcut for refnameautocomplete
If the user input looks like a locstring then we can shortcircuit and not perform a text search
This shortcut already exists for a locstring that matches exactly a chromosome name in the assembly's refname list (or alias)
So, this just expands the shortcut to detect if it matches the a locstring with a colon, splitting on the colon and assuming the start of that is a locstring
That wouldn't perfectly apply for assembly based locstrings but the majority use case would be non-assembly-including locstrings probably