Skip to content
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

Override Bed Plot Colors #1068

Closed
Alex-Willenbrink opened this issue Feb 26, 2020 · 9 comments
Closed

Override Bed Plot Colors #1068

Alex-Willenbrink opened this issue Feb 26, 2020 · 9 comments
Assignees

Comments

@Alex-Willenbrink
Copy link

Hello,

Currently, if you load a BED file in to the genome browser, you can only change the color of the plots if you did not specify color of your plots in the BED file. Can this behavior be changed, so we can override an initial specified plot color?

Thanks,

-Alex

@jrobinso
Copy link
Contributor

@Alex-Willenbrink For clarification -- are you saying the menu item (set color) doesn't work if you set an initial color?

@Alex-Willenbrink
Copy link
Author

@jrobinso Yes, the menu is one of the places that the color can't be changed BUT you also can't change the color of your plots even if you specify the color in the track object you pass into the "loadTrack" function.

For example if this is my bed file:
2 21016630 21016650 301012 1000 - 21016630 21016650 0,0,255 1 20, 0,

This plot will always show up as blue even if I add the "color" property in the track object.

@jrobinso
Copy link
Contributor

jrobinso commented Feb 28, 2020 via email

@Alex-Willenbrink
Copy link
Author

Alex-Willenbrink commented Feb 28, 2020

Thanks! Also one last thing I promise, is there an eventHandler for track color changes? If not, how would you recommend we listen for the track color state changes?

@jrobinso
Copy link
Contributor

jrobinso commented Feb 28, 2020 via email

@Alex-Willenbrink
Copy link
Author

I'm trying to capture the state of the genome browser (genome, locus, tracks, track order, plot colors, etc.) in the URL so that users will be able to reproduce the same state of the genome browser if they wanted to copy the URL and revisit the link later or share it with another person.

@jrobinso
Copy link
Contributor

jrobinso commented Feb 28, 2020

Hi, we already have a method that does that, I just looked and realized its not documented. We use it to support links at igv.org/app, like this one: http://tinyurl.com/vrhmrtl

To use this first enable query parameters in your igv config

queryParametersSupported: true

You will construct a url for bookmarking / sharing something like this

urlToYourSite?sessionURL=blob:<igv blob string>

To get <igv blob string> call

browser.compressedSession()

Let me know how it works, AFAIK you might be the first besides ourselves to try it.

There is also a method to get a json representation of the session, but its not useful as a URL parameter.

@jrobinso
Copy link
Contributor

I've updated the doc for this: https://github.com/igvteam/igv.js/wiki/Query-Parameters

@jrobinso jrobinso added this to the 2.7.0 milestone Oct 15, 2020
@jrobinso jrobinso self-assigned this Oct 15, 2020
@jrobinso
Copy link
Contributor

Original issue duplicate of #994

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants