starplast.umap_gallery_panel
The "maps" dock: pregenerated maps to pick from, and how well each label maps onto each.
The gallery ships dozens of maps per organism (umap_gallery.recipes), so the list is a TREE grouped
by what the map was built from -- all measurements, all but one kind of evidence, one evidence family,
one individual experiment, and the pairs and triples of families -- with a thumbnail per map colored
by its own clusters. It can be searched, sorted (by the label-free structure score, by how well the
chosen label maps, or by how many genes a map places) and flattened into one best-first list. Each row
states the map's recipe and its structure score, so the list can be read without opening anything.
Clicking a map puts it in the central 3D view through the window's own use_embedding, so it is a map
like any other -- genes click, every color mode applies -- and its HDBSCAN clusters become the
window's cluster coloring. Beside it, a sortable score table read in either direction:
- One label, every map -- pick a label, see which map it separates on best;
- One map, every label -- pick a map, see which labels it organises.
The map on screen is marked in both: with SHOWN_MARK on its row in the label view, and by being the
only map in the map view. Picking a map therefore always changes the table, which is the bug this
panel was rewritten around -- see refresh.
"Color by label" is one click. "Score the map on screen" runs the same scoring on whatever map the window shows (a map built in Analysis, say), and adds it to both tables as "on screen".
The panel holds no window reference: it emits what the user asked for, and install wires those
requests to a window. That keeps it testable without a full application.
RGBA per point: a categorical color per cluster, the theme's unknown gray for noise.
One line naming what a map was built from and how it was settled: the row's second line.
The label-free structure score of a map and the two things it is made of.
Pregenerated maps for one organism, and the label x map score table.
Build the panel over one organism's part of gallery (the shipped one by default).
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal's arguments.
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal's arguments.
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal's arguments.
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal's arguments.
Shipped scores plus the live score of the map on screen, if any.
One map's manifest record, or an empty dict for the map on screen.
map id -> the chosen label's category_skill on it, for sorting and for the rows.
Mark a map as the current one (list, map box, table) without asking the window.
Refill the table for the chosen view, label and map.
Both views depend on the map that is current, which is what the rewrite fixed. The label view lists every map for one label, so its ROWS do not change when another map is picked -- but the marked row does, the selected row does, and the sentence under the table does, and those are what told the user nothing had happened. The map view is filtered to the current map, so picking a second map replaces its contents outright.
One row of the table, in words.
The window's space code.
Put a gallery map in the central view, with its clusters as the window's clusters.
Color the main map by a label: the color-by box and the category color mode, together.
Score every label on the map the window shows; clusters it first when it has none.
Add the maps dock to a window, tabbed beside Analysis. None when no gallery ships for it.