hgvs to vrs conversion fails with repeat sequence notation
- Dominant language
- Python
- Stars
- 62
- Forks
- 42
- Avg merge
- 1h 2m
- Merged PRs (30d)
- 1
Description
I'm translating the `info_CLNHGVS` field in clinvar 38 build into VRS IDs.
Many hgvs IDs including `[int]` are failing ([repeat sequence notation in hgvs](https://hgvs-nomenclature.org/stable/recommendations/DNA/repeated/#repeated-sequences)). Is there a transformation I should perform on the source hgvs data prior to passing to the allele translator?
```
Error translating NC_000001.11:g.930090TTCCTCTCCTCCTGCCCCACC[2]: NC_000001.11:g.930090TTCCTCTCCTCCTGCCCCACC[2]: char 42: expected the character '='
Error translating NC_000001.11:g.930139CCT[1]: NC_000001.11:g.930139CCT[1]: char 24: expected the character '='
Error translating NC_000001.11:g.930212AAG[1]: NC_000001.11:g.930212AAG[1]: char 24: expected the character '='
```
Using `ga4gh-ver==2.1.3`:
```python
from ga4gh.vrs.dataproxy import create_dataproxy
from ga4gh.vrs.extras.translator import AlleleTranslator
import os
os.environ["UTA_DB_URL"] = "postgresql://anonymous:anonymous@uta.biocommons.org:5432/uta/uta_20241220"
seqrepo_rest_service_url = "seqrepo+https://services.genomicmedlab.org/seqrepo"
dataproxy = create_dataproxy(uri=seqrepo_rest_service_url)
translator = AlleleTranslator(dataproxy)
hgvs = [
"NC_000001.11:g.930090TTCCTCTCCTCCTGCCCCACC[2]",
"NC_000001.11:g.930139CCT[1]",
"NC_000001.11:g.930212AAG[1]",
]
for h in hgvs:
translated = translator.translate_from(h, "hgvs")
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.