-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to display transcript's name when clicking on a gene in JbrowseLinearView #1234
Comments
Currently the feature details dialog does not render information about subfeatures such as transcripts, which is probably a needed here. Additionally, rendering the transcript names directly on the track might be useful too...might require #175 |
Thanks for the answer, I've taken a look on how to render subfeatures information, and for what I understand the feature detail window is implemented in by Anyway, as I don't really know how to transpile the code to be importable like in the BCC2020 course, I don't see how I could try to implement it. Is there a doc on that somewhere ? |
I think that probably we can make subfeatures rendered using just BaseFeatureDetails. It's true there are some specialized types but we should make BaseFeatureDetails able to render anything that allows feature.get('subfeatures') which a gene with transcripts has. If you are interested in taking on such a task, you can comment out the "subfeatures" line from the omit array, and then fix the formatting as the formatting (currently the code does a hack and renders highly nested data to JSON in the feature detail panel but it should actually instantiate subsections in the feature detail panel for each nested data structure) |
It's also certainly something we can take care of in time, but you are welcome to contribute and this would be super great :))) |
As far as setting up a development environment I recommend clone github repo Then navigate to http://localhost:3000/?config=test_data/volvox/config.json for example to get the volvox data pictured above That will probably be easier than developing with the embedded lgv itself |
@cmdcolin Thanks for the instructions, I've been able to setup a dev environment and I will try to do it this week. |
Hi @cmdcolin, I've finally got some time to take a look on it today, and I've been able to make BaseFeatureDetails render subfeatures in Card similar to Attributes. I precise that I've made the SubFeatures Cards closed by default. In the actual state I don't think I can make a PR today, due to the optimization problem. If you have any idea for optimization, or for the title of the subfeatures Card, I appreciate it ! |
This has been a persistent challenge for us where loading up the webpage with too much data slows it down a lot. On jbrowse 1, we have a button called "load subfeatures" in the dialog box It loads all genes and transcripts but does not attempt to render the exon/cds features unless a button "Load subfeatures" is clicked. Might be an ok balance |
Thank for the answer, it's a good idea indeed ! |
Right, the slowness generally comes from putting a lot of data into the DOM. The "load subfeatures" is just to "load subfeatures into the display", they are already parsed in memory Render on scroll, aka "virtualized" rendering, is another option. I'm currently working on a virtualized rendering for our tracklist because if there are hundreds or thousands of tracks it slows down in a similar way |
I've found some react packages for simple on scroll render, but I imagine we prefer to avoid adding around 7.5kb (not gzipped) for just that |
Anyways, I think I've found some examples on how to do that without adding a dependancies. |
Don't hesitate to make a PR, can set the PR as a draft and we can continue dialog on the code. It's your call though :) I am not sure if I understand the question you mentioned in your last sentence? "But maybe should I display something specifics for exon/cds/3'UTR and other ?". I guess it is true those are pretty redundant too. It's possible we could try to make a compressed version of it. For example, like this https://github.com/Arabidopsis-Information-Portal/SeqLighter where it automatically stitches the exon sequences together to make cdna sequence. That would be pretty cool, and likely more informative than the long list of exons. It's been something people always wanted in jbrowse 1 but was never in core jbrowse 1, just made a plugin |
Hi @cmdcolin, This afternoon I've also made a recursive version (but without a Notice it display also the subfeature primary data (which was not the case in the one in PR), but is clearly not pretty for now. I think I will change at least some color if not shape of subfeature once I've had add the |
Thanks again @Akusem :) I did a little refining on master after your PR merged but this is great. Lemme know what you think |
Thanks @cmdcolin, your version is indeed more elegant, and I'm happy to see the issue resolved. |
Question
I'm currently using JbrowseLinearView to diplay basic information about gene, which work correctly. However I would like to have some additional information about transcript when the user click on a gene. Like writing transcript's name in the
Attributes
field for example. Is there a way to do that ?Additional information
I don't know if it useful, but here is my config of JbrowseLinearView:
Assembly config:
Tracks config:
DefaultSession config:
The text was updated successfully, but these errors were encountered: