load_maf does not convert UCSC contig names (GDC chr-prefixed MAFs fail annotation)

Open Beginner friendly
#680 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

Research direction

Start in varcode/maf.py around line 212, where load_maf constructs each Variant, and compare with how load_vcf passes convert_ucsc_contig_names=True. Then check the VariantCollection.from_json path, which the issue says behaves the same way. Done means a test with a GDC-style chr-prefixed MAF produces annotated effects instead of Failure, and the chr-prefixed and unprefixed inputs give matching results.

Written by the indexing model from the issue text.

Description

load_maf builds each Variant without convert_ucsc_contig_names=True (varcode/maf.py ~212, varcode 11.3.1). GDC GRCh38 MAFs write Chromosome as chr7, so their variants keep the UCSC name and fail annotation. load_vcf and the CLI's --variant convert these names.

Seen through isovar on Sid osteosarcoma data (openvax/isovar#661):

  • isovar run --maf sid-three.maf …, with chr7, chr9 and chr14 and NCBI_Build GRCh38, collects and assembles every read, then fails with InvalidContigError: Invalid contig name 'chr14' for reference 'GRCh38'. The same MAF without the chr prefix works.
  • isovar plot --maf exits 0 with an empty figure: no genes or transcripts, although it found 7 ALT reads. The only signal is two WARNINGs.
  • VariantCollection.from_json with chr7 variants (isovar --json-variants) appears to behave the same: effect Failure, with a WARNING. Not root-caused.

Suggested fix: pass convert_ucsc_contig_names=True in load_maf (and check the JSON path), with a test on a GDC-style chr MAF.

Dominant language
Python
Stars
88
Forks
28
Avg merge
2h 40m
Merged PRs (30d)
50

Getting set up

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.