-
It is currently possible with the jbrowse-webb app to query for a specific gene and reference using url arguments. ...I'm currently trying to implement this functionality into a website I've built that uses the JBrowseApp component. Is there any documentation anywhere for the various state related objects and API detailing how we are supposed to interact with them? Does anyone have any clear idea on how I can get the desired behavior? EDIT: After digging around a bit more, I've found a function: .session.addLinearGenomeViewOfAssembly ...that allows for adding a lineargenomeview to the assembly. I can't find documentation for this function anywhere other than the chrome console and it is all but useless...
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
hi there, you can see the docs for that here the caveat though is that these url params are NOT available in the embedded components. I have considered trying to make an easy to use way to expose this functionality though (see issue #3722) but, in the meantime, you can try to copy and paste some code the jbrowse-web does to replicate this functionality. i made an example that calls the LaunchView-LinearGenomeView 'extension point' which is what jbrowse-web uses. we use this because it is actually quite tricky to programmatically automate the "session snapshots". it is a longer term project to made that simpler, but hopefully the simplified LaunchView can help here is a live storybook example source code here https://github.com/GMOD/jbrowse-components/blob/main/products/jbrowse-react-app/stories/examples/WithLaunchLinearGenomeView.tsx the "LaunchView" interface is somewhat simplified, but hopefully it can help! https://jbrowse.org/jb2/docs/developer_guides/extension_points/#launchview-lineargenomeview |
Beta Was this translation helpful? Give feedback.
-
Thank you for the help here. That actually worked well. For reference for anyone finding this in the future, here is my current nextjs component that allows users to enter a gene and a reference and jump straight to the relevant location. This component probably isn't minimal and may even have weird issues with it that I don't understand. I'm not a nextjs or react or jbrowse expert.
|
Beta Was this translation helpful? Give feedback.
hi there,
this is a bit of a tricky one. the jbrowse-web app has some 'magic sauce' that it uses to load data from the url and make a linear genome view
you can see the docs for that here
https://jbrowse.org/jb2/docs/urlparams/
the caveat though is that these url params are NOT available in the embedded components. I have considered trying to make an easy to use way to expose this functionality though (see issue #3722)
but, in the meantime, you can try to copy and paste some code the jbrowse-web does to replicate this functionality. i made an example that calls the LaunchView-LinearGenomeView 'extension point' which is what jbrowse-web uses. we use this because it is actually quite tricky…