Flag classifications whose sample's VCF was re-sent

Open
#2,931 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by reading seqauto/upload_links.py at link_samples_and_vcfs_to_sequencing, where replaced_by is set, and trace how classifications are linked to samples and how classification flag types are defined. Check tests for VCF replacement and classification flags to find the relevant coverage. Done means classifications for the replaced sample receive a resolvable flag naming the replacement VCF without changing the classification; the issue's questions about repeated sends and notifications still need a decision.

Written by the indexing model from the issue text.

Description

🤖 Written by Claude

Problem

When a pipeline re-sends a single-sample VCF, a new VCF and Sample are imported. Classifications made from the earlier sample (Classification.sample) keep pointing at it, with nothing telling the lab that newer calls exist and they may want to re-check. This has been the case for years. Before #2929 nothing recorded the replacement at all.

#2929 (PR #2930) added VCF.replaced_by / replaced_date, set in seqauto/upload_links.py:link_samples_and_vcfs_to_sequencing. With that in place:

  • Analyses warn about the replacement.
  • The VCF, sample, sequencing run and variant pages show it.
  • Auto-launched analyses that someone has worked in aren't reloaded.

Classifications still get nothing. That holds whether they were made inside an analysis or directly from the sample.

Proposed

  • A new classification flag type, raised on every classification whose sample belongs to a VCF that has just been marked replaced. It would be raised in the same place replaced_by is set, and name the replacement VCF.
  • The lab resolves the flag once they've re-checked, or decided it doesn't matter.
  • The classification itself is not changed.

Open questions

  • Should the flag be raised once per classification, or again each time the VCF is re-sent (a chain of re-sends)?
  • Should classifications on VCFs replaced before replaced_by existed be backfilled? Probably not: that link can't be recovered.
  • Should it be a flag, or a notification to the lab?

Related: #2929, #2923.

Dominant language
Python
Stars
31
Forks
4
Avg merge
4h 52m
Merged PRs (30d)
183

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.