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

add ability to search for gene(s) in current view #9

Open
adf-ncgr opened this issue May 22, 2017 · 3 comments
Open

add ability to search for gene(s) in current view #9

adf-ncgr opened this issue May 22, 2017 · 3 comments

Comments

@adf-ncgr
Copy link
Contributor

in addition to the thing we've discussed for just having an entry box that will initiate a new search with a given gene, sometimes it is useful to just want to ask to have a given gene (or possibly a set of genes) that one expects to be in the current view to be highlighted (e.g. as if the user had moused-over it, but without requiring them to do the needle in haystack shtick).
This could be a more exciting functionality if genes could have more metadata associated with them and it would be made searchable in this fashion- e.g. supposing a provider could add descriptors or gene ontology terms.

let's leave this one as a idea for the future (ie after our fling with pangenomics or else when you need a software engineering task to calm your nerves).

@adf-ncgr
Copy link
Contributor Author

adf-ncgr commented Aug 7, 2017

adf-ncgr notes to self that this issue has some conceptual overlap with the hack that he put in a local version of the legend.js code to aid in evaluating FrequentedRegions algorithm results, something along these lines in the on mouseover associated function with elements generated in the legend _drawKey method; Hopefully, if we ever actually address this issue, it will be through something far less hacky and involving breakpoints and injection of state via the console!
selection[0] = [];
var fs=['phytozome_10_2.59205044','phytozome_10_2.59028006','phytozome_10_2.59315123','phytozome_10_2.59271012','phytozome_10_2.59073169','phytozome_10_2.59179688','phytozome_10_2.59310457','phytozome_10_2.59227160'];
fs.map(f => {selection[0].push.apply(selection[0], d3.selectAll('.GCV [data-family="'+f+'"]')[0])});

@alancleary
Copy link
Contributor

@adf-ncgr Since the gene that you would be searching for would only be present in the micro-synteny viewer, does it make sense to repurpose the existing search widget for this purpose and add a new search widget to the main navbar at the top for providing a new focus gene?

@alancleary
Copy link
Contributor

I recently hacked a primitive version of this into GCV for @adf-ncgr, which made me recall this issue. Here are some implementation details that came to mind when implementing the hack:

  • This should be a top-level feature that applies to all micro-synteny viewers in the view, e.g. add a highlight icon to the top-level navbar
  • Clicking on the highlight icon should open a widget that allows users to toggle between highlighting the query genes and genes that they enter manually into a text field
  • The genes entered in the text field should persist between pages but not be encoded in the URL like other parameters due to URL query string length limitations (persistence should be implemented via NgRX/store)
  • Extra credit: the highlight widget could include a color selector that allows users to select what color they want to highlight genes with as an alternative to the default black color, which can make it hard to spot highlighted genes

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants