cmdcolin / jbrowse-plugin-gwas

3 stars 1 forks source link

Enable Feature Details panel #11

Open svengato opened 1 year ago

svengato commented 1 year ago

When you click on a dot in the LinearManhattanDisplay, it would be nice to pop up the Feature Details panel listing its core details and other attributes (as in LinearBasicDisplay).

cmdcolin commented 1 year ago

i would probably want to incorporate this along with https://github.com/cmdcolin/jbrowse-plugin-gwas/issues/2.

it might be possible to add this feature without https://github.com/cmdcolin/jbrowse-plugin-gwas/issues/2, but the current wiggle mouseover is based very much on x-coordinate with no notion of y-coordinate and likely wont give you the right value unless you are zoomed in quite close https://github.com/cmdcolin/jbrowse-plugin-gwas/issues/2

svengato commented 1 year ago

My data can have multiple points with the same x coordinate but different y coordinate (that is, GWAS data in the same location, with different p-values for different traits). Therefore a mouseover or click would currently identify only one of them?

cmdcolin commented 1 year ago

yes, in this case, the code wouldn't really work. the current mouseover code is from the wiggle track (which is this code, which you can see, grabs the first feature that overlaps in the currently hovered x coordinate https://github.com/GMOD/jbrowse-components/blob/main/plugins/wiggle/src/WiggleRendering.tsx#L48). this is all because this plugin currently uses a lot of wiggle concepts. that is a simplifying assumption, as gwas data is similar to a wiggle track in some ways, but it needs some improvement to be able to click on individual features