Idea
When displaying the Jaccard index column in the mutations-over-time table (both computed and predefined variant modes), it would be helpful to show the underlying clinical sequence counts as a tooltip on each cell. This would let users judge whether a given Jaccard score is reliable or potentially noisy due to low sequence counts.
The three values we want to surface per mutation are:
- Intersection count — sequences that match both the lineage and the mutation (the Jaccard numerator)
- Total count — all sequences in the clinical data that have the mutation (regardless of lineage)
- Variant count — total sequences for the lineage (the Jaccard denominator component)
All three are already fetched inside getJaccardForMutations and getMutationsForVariant in website/src/lapis/getMutations.ts — they're just thrown away after the ratio is computed.
Problem
The CustomColumn type from @genspectrum/dashboard-components only supports { header: string, values: Record<string, string | number> }. Cell rendering is handled entirely by the gs-mutations-over-time web component, so we have no React layer to attach a tooltip to.
Possible approaches
- Add
tooltips field to CustomColumn in @genspectrum/dashboard-components — cleanest solution, requires a PR to that library.
- Add a second custom column showing the counts inline (e.g.
"45 / 500" for intersection / total) — works today without library changes, but is less ergonomic.
- Gray out low-count Jaccard scores — a related idea: once the counts are exposed, visually de-emphasize Jaccard values backed by few sequences (e.g. dim or style the cell differently). Same blocker as above.
Related context
The data layer changes needed are straightforward and independent of the rendering problem:
- Change
getJaccardForMutations to return counts alongside the Jaccard map
- Change
getMutationsForVariant similarly
- Expose counts in
WasapMutationsData for downstream use
The JaccardFetchInfo box (added in this branch) already surfaces the total variant sequence count as a coarse reliability indicator — per-mutation counts would be a more precise complement to that.
Idea
When displaying the Jaccard index column in the mutations-over-time table (both computed and predefined variant modes), it would be helpful to show the underlying clinical sequence counts as a tooltip on each cell. This would let users judge whether a given Jaccard score is reliable or potentially noisy due to low sequence counts.
The three values we want to surface per mutation are:
All three are already fetched inside
getJaccardForMutationsandgetMutationsForVariantinwebsite/src/lapis/getMutations.ts— they're just thrown away after the ratio is computed.Problem
The
CustomColumntype from@genspectrum/dashboard-componentsonly supports{ header: string, values: Record<string, string | number> }. Cell rendering is handled entirely by thegs-mutations-over-timeweb component, so we have no React layer to attach a tooltip to.Possible approaches
tooltipsfield toCustomColumnin@genspectrum/dashboard-components— cleanest solution, requires a PR to that library."45 / 500"for intersection / total) — works today without library changes, but is less ergonomic.Related context
The data layer changes needed are straightforward and independent of the rendering problem:
getJaccardForMutationsto return counts alongside the Jaccard mapgetMutationsForVariantsimilarlyWasapMutationsDatafor downstream useThe
JaccardFetchInfobox (added in this branch) already surfaces the total variant sequence count as a coarse reliability indicator — per-mutation counts would be a more precise complement to that.