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

Question about values in samplesTsvLocation #4807

Open
dirkjanvw opened this issue Jan 30, 2025 · 3 comments
Open

Question about values in samplesTsvLocation #4807

dirkjanvw opened this issue Jan 30, 2025 · 3 comments

Comments

@dirkjanvw
Copy link

Hi,

Just saw the new version 3 releases of JBrowse2 and everything works great so far! Congrats! I just have one question: I created a samplesTsvLocation with three columns (name, population, species). The name column contains the sample names of the VCF, the population contains 14 distinct values and species contains 2 distinct values. Colouring by species works perfectly fine: it colours one species blue and the other red. However, when I want to colour by population, it only colours 9 distinct values and makes all other 5 values black. Could it perhaps be that there is a maximum in distinct values per column of 9? Is there a way to increase this?

@cmdcolin
Copy link
Collaborator

cmdcolin commented Jan 30, 2025

It actually tries to add other random colors after the 10 but i made a bug during last minute hacking for the release!

this PR #4808 has a possible fix...if using the web, can try

jbrowse create --branch fix_colorizer

I didn't test it but if you want more control you might be able to add a color column to the tsv

@cmdcolin
Copy link
Collaborator

(just for reference regarding the actual colors, it tries to use a d3 "set1" https://observablehq.com/@d3/color-schemes which only has a truly limited number of colors, so that's why it resorts to random after that. definitely there could be other schemes, but that is the one that got hardcoded :))

@dirkjanvw
Copy link
Author

I tested it (I used branch main because you merged it already) and it works as expected! Thank you

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