dalliance icon indicating copy to clipboard operation
dalliance copied to clipboard

More flexible search API

Open dasmoth opened this issue 10 years ago • 2 comments

Browser.search is only really suitable as a hook for the Browser chrome. A final API should:

        - Return match data to the caller, rather than triggering immediate browser navigation.
        - Allow control of which track(s) are queried.
        - Provide better support for ambiguous matches.

dasmoth avatar Jul 22 '14 09:07 dasmoth

Where is Browser.search documented?

moritzschaefer avatar Oct 26 '17 12:10 moritzschaefer

Per the original message, the current Browser.search is fairly specifically a hook for the "genome browser chrome" core, rather than a flexible API for running arbitrary searches. I'm still interested in replacing/augmenting it.

If you're interested, the currrent API takes two parameters:

      - A search string
      - A callback that's invoked in case of error.

If there's an error or no matches, you'll get a message returned to the callback. Otherwise, the browser will interrogate all currently-active tracks which provide a search capability (in practice, generally bigBed tracks with extra indices), and navigate directly to the region matching the search query. The "direct navigation" aspect is annoying, hence interest in a new API which returns search results rather than triggering navigation.

dasmoth avatar Oct 31 '17 20:10 dasmoth