ga4gh / ga4gh/vrs-python

Replace `DataProxy.get_metadata` with `get_length` and `get_aliases`

Open
#624 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
62
Forks
42
Avg merge
1h 2m
Merged PRs (30d)
1

Description

https://github.com/ga4gh/vrs-python/blob/2.3.1/src/ga4gh/vrs/dataproxy.py#L53-L70

The only fields in the return used by `vrs-python` are `length` and `aliases`.

The `vrs` docs (https://github.com/ga4gh/vrs/blob/2.1.0-snapshot.2026-02.2/docs/source/conventions/required_data.rst#suggested-implementation) say

`get_metadata(identifier): Given a sequence identifier, return a dictionary of length, alphabet, and known aliases.`

But also

`To get sequence length, aliases, and other optional information for a given identifier:`

We should really be explicit about what is actually needed by vrs-python, so that the interface contract is explicit and other data providers can implement them and be sure it fulfills what is needed.

If `length` and `aliases` are all that is needed I don't think we need a "metadata" method. `alphabet` is not used anywhere in vrs-python. If we do not have plans to use it, we should drop it from the docs and just go with `get_length` and `get_aliases` methods, not an unneeded wrapper which composes the return values of those into a dict.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.