Repository navigation
Group by reads any of the dataset's sets for the plot alone - #168
Merged
Merged
Conversation
Group by listed only sets already loaded in Cells › Clusters, and loading one there replaces the map's set and recolours the cells. It now also lists the dataset's other sets under "In the dataset"; choosing one reads its classes inside the Plots panel, in their stored or palette colours, leaving the map, the legend and Clusters' set as they are. Loading the same set in Clusters moves the panel to the loaded set, which follows the legend. With nothing loaded or drawn, the panel starts with graphclust or the first set of 2 to 60 classes. Select gains optgroups for the headings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #166 (base
claude/plots-selections-set). Review that one first; this diff is only the commit on top.Problem
Group bylisted only sets already in memory: the one loaded in Cells › Clusters, imported files,Save ROIclasses and (from #166) Selections. To plot by another obs column you had to load it in Clusters, which replaces the map's set, drops imported labels and switches the cells to annotation colours.Change
Group byhas three parts, withSelectnow rendering consecutive options of the samegroupas an<optgroup>:plotDatasetSets). A set Clusters has loaded isn't listed twice. When Clusters loaded "All", none are listed.useDatasetSetAnnotations, using the sameloadActiveAnnotationsloader Clusters uses). Colours are the dataset's stored ones, else the palette from its start (colorsForAnnotations(annotations, {})). The map, the legend and Clusters' set don't change. One set is kept at a time, and switching aborts a read in progress.resolvePlotSetIdmaps the read set's ID onto it).donor_idand per-cell ID columns such asobservation_joinid.plotSetOptionsandresolvePlotSetIdnow take onePlotSetSourcesobject, and each option carries akind.Testing
plotsPanelModel.test.ts: dataset set listing and exclusion, default choice (graphclust, skipping 1-class and 4,992-class sets), waiting for and plotting a read set with stored and palette colours, the error state, and following the set into Clusters.useDatasetSetAnnotations.test.tsx: one read per set, colours, aborting on a new choice, errors.App.test.tsx: new test with an H5AD with two sets and nothing loaded. Plots reads the first set, lists both under "In the dataset", switches to the second, and the link gains neithergroups=norcellColor=annotations.src/features/plotsandsrc/components(226 tests) andsrc/App.test.tsx(92 tests) pass, plus lint, typecheck and Prettier.annotation_final(6 classes) in the dataset's colours, while the map stayed on MYH7 expression.annotation_finalin Clusters moved it under "Loaded" and Plots followed it.cell_type(27) in Plots left the map and legend onannotation_final.