GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
211 stars 63 forks source link

Consider adding `refNameColors` to theme #3536

Open garrettjstevens opened 1 year ago

garrettjstevens commented 1 year ago

Currently refNameColors is part of the assembly config, and determines what color a refName is displayed as in things like the linear overview bar or circular arc label. This was done before we had a theming system in place, so it could make sense to remove it from the assembly and into the theme, since that's where other colors are defined.

This would be a bit of a breaking change, since we have a --refNameColors flag in the add-assembly CLI command that wouldn't be relevant anymore, as well as any customized colors people might have in their assembly config.

cmdcolin commented 1 year ago

i will also note that there are some circumstances where showing the color on the e.g. alignments track could be useful. see igv.org, showing inter-chromosomal pairing https://tinyurl.com/2b5cwjlz

this could be accomplished by the help of a theme. but, it is a little interesting that the refNameColors is an array and not e.g. a key-value map. it almost seems better to keep it a part of the assembly, but make it a key value map(?)

garrettjstevens commented 1 year ago

There were a couple reasons it was made as an array:

cmdcolin commented 1 year ago

i think that all the smaller scaffolds/patches could all be a single color. bioinformatically, i think it makes since to group them as 'unplaced' scaffolds essentially