-
Notifications
You must be signed in to change notification settings - Fork 230
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
Defined color function prevents saving igv session. #1541
Comments
Its not possible to save functions as text, so I don't have any solution. If you have suggestions which would not open igv.js to code injection vulnerabilities please post them for discussion. I will update the documentation to make this clear. |
If you could describe your use case in some detail there might be a workaround for specific cases. |
Thank you for your fast response. I have a presentation with igv.js where user can choose which predefined tracks are loaded into the igv view. I also wanted to incorporate the multi-view option and since I didn't find any function (there may be one, but I haven't found it) that would allow me to specify mutliple locations once the igv, I figured, that to preserve the user-chosen tracks, it should be possible to save the current igv state, rewrite the location specification in the object and load it back. This works well, except for the tracks with custom function for color specification. As to the Since my usage of the store/load is workaround itself it might suffice to have the ability to pass location in the browser API. However, I easily can imagine a case when user can store browser configuration to have it loaded with selected tracks when he comes back. Then it would be useful to have it possible to store the session even with functions in tracks. Other possible workaround that occurs to me is to precompute the color specification and store it with the annotations. |
For multi-view you can pass a space delimited list of loci to the "search" function. I just noticed this was not documented, it is now, for example
RE code injection, yes that was exactly the solution I thought of as well. This will require some development in igv.js, obviously. Leave this open until I have more time to consider how best to do this. Another possible workaround, which may or may not work for you, is to use a lookup table for color instead of a function. See examples/gff-colors.html and examples/variant-colors.html
|
Thank you for the Leaving this open as requested. |
When I have defined function for coloring features loaded in annotation track it prevents me from storing the session object with the
browser.toJSON()
andbrowser.loadSessionObject()
functionality.Console log from [igv.min.js:72:216962]
Is there any solution apart from removing the
color
function?If more details are needed, or there is some sensible workaround that I'm missing, do tell please.
Best regards
Marek
The text was updated successfully, but these errors were encountered: