Overlap.all_hgvs fallback always returns "-" when the selected labs aren't in the overlap

Open Beginner friendly
#2,329 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@davmlaw is already working on this.

Since Oct 17, 2026.

  • #2330 by @davmlaw — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with Overlap.all_hgvs in classification/models/overlaps_model.py and trace the lab_picker branches. Check the download, email, Slack, and page call sites described in the issue, then add or update focused tests for a selected lab with no contributions. Done means the fallback collects preferred HGVS values from all contributions instead of returning the - placeholder, while preserving the expected behavior for contributing labs.

Written by the indexing model from the issue text.

Description

bug classification

🤖 Written by Claude

Overlap.all_hgvs(lab_picker, genome_build) (classification/models/overlaps_model.py) only collects HGVS when lab_picker is set:

if lab_picker:
    for contribution in self.contributions_list:
        ...
            if classification_grouping.lab_id in lab_picker.lab_ids:
                results.add(...)

if not results and lab_picker:
    return self.all_hgvs(genome_build=genome_build, lab_picker=None)

The "none of the picked labs contribute" fallback calls itself with lab_picker=None, which skips the loop, so the fallback always returns the - placeholder instead of the other labs' c.HGVS.

Who hits it

The fallback runs when none of the selected labs has a contributing classification grouping in the overlap:

  • Overlaps download (download_overlaps / OverlapDownloadRow.dna_hgvs, both outstanding and solved modes): the lab filter is only applied to the skew_status annotation, never to the queryset, so the CSV includes overlaps the selected lab isn't part of. Every such row has - in the c.HGVS column.
  • Overlap.hgvs(lab) (overlap email row tag, discordance Slack/lab notifications, contact subjects on the overlap page) when given a lab that isn't contributing.

The overlaps datatable and the notification/email paths normally pass a contributing lab, so they don't hit it.

Confirmed on master

Read-only on a test server: for overlaps with valid contributions, all_hgvs with a lab picker for a lab outside the overlap returned ['-'], while the same call for a contributing lab, and Overlap.hgvses, returned the c.HGVS. Running download_overlaps for a lab with no overlap contributions produced rows (for other labs' overlaps) whose c.HGVS column was -.

Fix

With no lab picker (or after the fallback), collect the preferred HGVS from every contribution.

Dominant language
Python
Stars
31
Forks
4
Avg merge
7h 3m
Merged PRs (30d)
362

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SACGF/variantgrid

All issues in SACGF/variantgrid

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.