ClinVar indexed by protein position for PS1 / PM5 (same residue known pathogenic) in the analysis

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
22/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend, databases

Research direction

Start with annotation/models/models_clinvar.py (ClinVar.variant) and the VariantTranscriptAnnotation fields protein_position and hgvs_p, plus analysis/__analysis_readme.md for the PS1/PM5 audit. The work needs a per-ClinVarVersion index keyed by transcript version and protein position, built after import, and a PS1/PM5 filter that excludes the variant's own record. Done means both criteria filter correctly on a representative transcript, with star thresholds, and the design questions in the thread are settled first.

Written by the indexing model from the issue text.

Description

Analysis enhancement

🤖 Written by Claude

Follows #2600 / PR #2603, whose ACMG evidence audit (analysis/__analysis_readme.md) left one criterion with no node: PS1 / PM5, a known pathogenic variant at the same residue. The ClinVar node matches records by variant (annotation/models/models_clinvar.py:ClinVar.variant), so a different nucleotide change at the same codon never matches.

What is needed

An index of ClinVar records by protein position, so a variant's VariantTranscriptAnnotation.protein_position / hgvs_p can be looked up against the pathogenic records on the same transcript:

  • PS1 - same amino acid change (same residue, same resulting amino acid, different nucleotide change) with a pathogenic ClinVar record.
  • PM5 - same residue, a different missense change, with a pathogenic ClinVar record.

Both need the ClinVar record's transcript, protein position and amino acid change. ClinVar's own records carry HGVS p. for the preferred transcript; otherwise the records are already linked to a Variant and that variant's VariantTranscriptAnnotation row for the matching transcript has protein_position and amino_acids.

Sketch

  • A per-ClinVarVersion table of (transcript version, protein position, reference amino acid, alternate amino acid, highest pathogenicity, stars), built after a ClinVar import from the records joined to their annotation.
  • An Effect node (or ClinVar node) filter: "PS1: pathogenic at same residue, same change" and "PM5: pathogenic at same residue, different change", each with a minimum star rating like the ClinVar node's existing fields.
  • Q: join on the variant's transcript annotation (transcript, protein position) against that table, excluding the variant's own ClinVar record, with the amino acid equality / inequality deciding PS1 vs PM5.

Residue positions depend on the transcript, so the table must be keyed by transcript version and the lookup restricted to the variant's representative transcript, not every overlapping transcript.

Related: #2605 (ACMG presets would want these two once they exist).

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.