Effect strings in CSV: SpliceOutcomeSet hides alternatives, REF==ALT records become Silent p.335=, 1-bp deletions use a range

Open
#436 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Reproduce the examples with EffectCollection.to_dataframe(), effects.top_priority_effect_per_variant(), varcode --one-per-variant, load_vcf, and varcode-genes using the commands and VCF records in the issue. Trace how SpliceOutcomeSet, no-op variants, single-nucleotide deletions, and structural variants are represented before export; done means each listed CSV or HGVS behavior matches the stated expected result.

Written by the indexing model from the issue text.

Description

Effect strings in EffectCollection.to_dataframe() / CSV (8.0.0): SpliceOutcomeSet hides its alternatives, REF==ALT records become "Silent", and single-base deletions use a range.

From varcode --vcf tests/data/somatic_hg19_14muts.vcf --output-csv out.csv on main at 50eafde:

  1. SpliceOutcomeSet exports only its first candidate, and top-priority selection drops the rest.

    chr1 g.53513530A>C,...,ENST00000371514,SCP2-001,SpliceOutcomeSet,splice-set:normal-splicing (p.D490A)
    

    The effect has four candidates: normal-splicing (p.D490A), exon-skip ENSE00003489518 (p.D490fs), cryptic-donor (predicted) and intron-retention (donor side, predicted). The CSV shows only the first. effect_type is the container class name, not a consequence. effects.top_priority_effect_per_variant() (and varcode --one-per-variant) turns the same transcript into Substitution p.D490A, so the possible frameshift vanishes. Nine rows in this 14-variant file are SpliceOutcomeSet. Related to #421 and #423.

  2. A REF==ALT record is annotated as Silent with a malformed protein change. The VCF line chr11 118244286 . G G produces:

    chr11 g.118244286,11,118244286,,,False,False,False,ENSG00000110344,UBE4A,ENST00000252108,UBE4A-001,Silent,p.335=
    

    The HGVS strings g.118244286 and p.335= have no alleles and no residue. varcode-genes lists the same record with ref=G, alt=G. Expected: load_vcf drops or warns about no-op records, or the effect is reported as NoChange, not Silent.

  3. Single-nucleotide deletions use a one-base range. --variant 17 36731197 C . gives chr17 g.36731197_36731197delC. HGVS for a one-nucleotide deletion is g.36731197del (or delC), with no _ range.

  4. Structural variants carry placeholder alleles in the dataframe. See #417. to_dataframe() no longer crashes, but SV rows still show alt=A and is_snv=True.

Dominant language
Python
Stars
87
Forks
28
Avg merge
3h 27m
Merged PRs (30d)
27

Contributor guide

Open the contributing guide

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 openvax/varcode

All issues in openvax/varcode

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.