Deprecated aliases (load_vcf_fast, detect_loh, ensembl=, extended_protein_sequence) survive 11.0 and varcode still calls some of them
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 44/100
Research direction
Start with the listed callers in varcode/variant_collection.py, varcode/effects/effect_collection.py, and varcode/cli/variant_args.py, then inspect the deprecated aliases in varcode/variant.py and varcode/effects/effect_classes.py. The issue also identifies exports and API pages to update, plus varcode/util.py and varcode/effects/common.py. Done means internal callers use current names, deprecated APIs are handled as described, and the release notes and documentation reflect the changes.
Written by the indexing model from the issue text.
Description
Problem
Varcode still exports several names it documents as deprecated, through the 11.0.0 major release, and its own code keeps calling some of them. Deprecated names therefore look current to anyone reading the source, the API reference still renders them, and removing them later will mean touching internal callers as well.
Evidence
Read at d1b4280 (version 11.4.2).
load_vcf_fast(varcode/vcf.py:264-271) only warns and forwards toload_vcf. It is still exported (varcode/__init__.py:119,:283) and rendered as an API entry (docs/api_variants.md:253).detect_loh(varcode/germline.py:745-757) was deprecated in 10.1.0 and now always returnsNone. It is still exported (varcode/__init__.py:51,:261) and documented (docs/api_phasing.md:43).Variant(ensembl=...)and theVariant.ensemblproperty are documented as deprecated (varcode/variant.py:110,:252-260), but the keyword is accepted without a warning (variant.py:157-160). Library code readsvariant.ensemblinstead ofvariant.genomeatvarcode/variant_collection.py:353,varcode/effects/effect_collection.py:320and:684, andvarcode/cli/variant_args.py:166.random_variants(varcode/util.py:30) still takesensembl=as its only genome keyword.StopLoss.extended_protein_sequenceis marked "Deprecated name for aa_alt" (varcode/effects/effect_classes.py:1605), butStopLoss.short_descriptionuses it (effect_classes.py:1614).bio_seq_to_str(varcode/effects/common.py:16-20) converts BiopythonSeqobjects withstr(seq). Biopython was dropped in #293, and the function is juststr(seq).
Suggested fix
- Replace internal uses:
variant.ensemblbecomesvariant.genome,extended_protein_sequencebecomesaa_alt, andbio_seq_to_str(x)becomesstr(x)(then deletebio_seq_to_str). Giverandom_variantsagenome=keyword. - Make
Variant(ensembl=...)andVariant.ensemblemitDeprecationWarning, asload_vcf_fastanddetect_lohalready do. - In the next major release, remove
load_vcf_fast,detect_loh,ensembl=/.ensemblandextended_protein_sequence, with a CHANGELOG entry. Until then, list them in one "Deprecated" section ofdocs/conventions.mdinstead of as API reference entries.
- Dominant language
- Python
- Stars
- 88
- Forks
- 28
- Avg merge
- 3h 17m
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openvax/varcode
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
community enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Hochfrequenz/sapgui.mcp#1039 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
didi/helixharness#18 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
dataforgoodfr/democracy-watch#46 · 1 reaction ·