You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The histogram's "Protein Effect Series" is currently hidden for any score set where at least one variant lacks a determinable protein consequence. This all-or-nothing gate prevents the histogram from being used for score sets with a mix of coding and intronic/unmappable variants (e.g. BAP1 SGE), even when the vast majority of variants have consequence data.
Problem
In ui/src/lib/variants.ts, the function allCodingVariantsHaveProteinConsequence returns true only if every variant in the set satisfies one of:
Has a non-NAvep_functional_consequence
Has a parseable parsedPostMappedHgvsP (protein HGVS)
Has a cDNA HGVS with a non-integer position (known non-coding)
In ScoreSetHistogram.vue, the computed property proteinEffectOptionsAvailable gates both the "Protein Effect Series Options" UI panel and the filterControlVariantByEffect logic entirely on this function. The result: a single unmapped or intronic variant suppresses the entire consequence-based histogram view for all other variants.
Proposed behavior
The histogram should display consequence-based series as long as a meaningful portion of variants have consequence data, with a disclaimer noting how many variants are excluded.
Specific changes:
Relax the gate: Replace the all-or-nothing allCodingVariantsHaveProteinConsequence check with a threshold-based check (e.g. show the histogram if ≥ N% of coding variants have consequence data, or unconditionally show it and handle missing data as an "Unknown/No consequence" series or by exclusion).
Add a disclaimer: When some variants are excluded from the consequence histogram due to missing data, display a note such as: "N variants are not shown in this view because consequence data is unavailable." This should appear near the Protein Effect series controls or in the figure legend.
The "Protein Effect Series" histogram controls are shown for score sets where at least some (but not all) variants have consequence data
Variants without consequence data are excluded from the consequence-based series (not counted in any series bar)
A disclaimer is shown adjacent to the histogram indicating how many variants are excluded from the consequence view
Score sets where no variants have any consequence data continue to hide the consequence series entirely
Existing score sets where all variants have consequence data continue to work identically
Implementation notes
The change is primarily in ui/src/lib/variants.ts (allCodingVariantsHaveProteinConsequence) and ui/src/components/score-set/ScoreSetHistogram.vue (proteinEffectOptionsAvailable computed property and the surrounding UI template)
Consider adding a companion computed property like variantsWithoutConsequenceCount to feed the disclaimer text
The threshold for "enough variants have consequence data" should be discussed — a reasonable starting point is: show the histogram if any variant has consequence data, and always note the exclusion count
This issue is related to the intronic variant marking issue; resolving that first will make the consequence data more complete and reduce the number of excluded variants
Summary
The histogram's "Protein Effect Series" is currently hidden for any score set where at least one variant lacks a determinable protein consequence. This all-or-nothing gate prevents the histogram from being used for score sets with a mix of coding and intronic/unmappable variants (e.g. BAP1 SGE), even when the vast majority of variants have consequence data.
Problem
In
ui/src/lib/variants.ts, the functionallCodingVariantsHaveProteinConsequencereturnstrueonly if every variant in the set satisfies one of:NAvep_functional_consequenceparsedPostMappedHgvsP(protein HGVS)In
ScoreSetHistogram.vue, the computed propertyproteinEffectOptionsAvailablegates both the "Protein Effect Series Options" UI panel and thefilterControlVariantByEffectlogic entirely on this function. The result: a single unmapped or intronic variant suppresses the entire consequence-based histogram view for all other variants.Proposed behavior
The histogram should display consequence-based series as long as a meaningful portion of variants have consequence data, with a disclaimer noting how many variants are excluded.
Specific changes:
allCodingVariantsHaveProteinConsequencecheck with a threshold-based check (e.g. show the histogram if ≥ N% of coding variants have consequence data, or unconditionally show it and handle missing data as an "Unknown/No consequence" series or by exclusion).vep_functional_consequence = "intron_variant"should be treated as a known, displayable category rather than as missing data.Acceptance criteria
Implementation notes
ui/src/lib/variants.ts(allCodingVariantsHaveProteinConsequence) andui/src/components/score-set/ScoreSetHistogram.vue(proteinEffectOptionsAvailablecomputed property and the surrounding UI template)variantsWithoutConsequenceCountto feed the disclaimer text