-
Notifications
You must be signed in to change notification settings - Fork 10
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
Coloring by features as well as cluster #257
base: main
Are you sure you want to change the base?
Conversation
We still have a few bugs: The axis label text changes color when plotting features.
Implementing the actual visualisation
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## main #257 +/- ##
==========================================
- Coverage 75.82% 73.81% -2.02%
==========================================
Files 14 14
Lines 1663 1726 +63
==========================================
+ Hits 1261 1274 +13
- Misses 402 452 +50
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @Cryaaa , supercool stuff and thanks for working on it! What I am currently a bit worried about (not specifically about this PR, but about the clusters-plotter in general) - creating the cluster visualization (be it of the cluster or the intensity vis.), the code is already all over the place and I am wondering whether or not to put the code for creating the cluster view (of cluster or features) in its own place. There is a pull request to napari-skimage-regionprops that unifies the creation of featuremaps for labels data and a bunch of other not currently supported layers (points, surfaces, vectors). On top of that, PR #229 introduces some functionality to create the cluster maps in a central place to make the code a bit cleaner. I am leaning a bit towards first having this go through and then move the feature vis. forward so we don't have to later on add support for all layer types when moving this forward. Looking forward to hearing your opinion! |
Hey @jo-mueller , |
This PR will address #209. Currently I have implemented it so that the features are also available in the dropdown for cluster ID and the colormap can be selected even when in scatterplot mode.
When features are plotted a feature layer is created. One problem was that this layer can be hidden if a cluster layer is created afterwards and vice versa. My way of solving this problem is to keep the feature layer as the top layer and changing the visibility of the layers for feature or cluster visualization depending on what is plotted. I'm not sure if this is the best solution and would be grateful if anyone tests it.
Furthermore, we would have to add a colorbar so that the colors for the features can be interpreted.
I would be happy if someone would take a look at the code or try it out as it does add quite a few lines, but I could not think of a more elegant solution without rewriting a lot of the other code..
Anyway here is a small video demonstrating how it works at the moment:
https://github.com/BiAPoL/napari-clusters-plotter/assets/65285466/153a0d8d-a21a-450b-9b4e-88fde6926cd7