legumeinfo / gcv

Federating genomes with love (and synteny derived from functional annotations)
https://gcv.legumeinfo.org/
Apache License 2.0
40 stars 12 forks source link

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

Open adf-ncgr opened 7 years ago

adf-ncgr commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

@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 commented 2 years ago

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: