Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconciliation based on synonym doesn't work as expected #87

Open
Tracked by #969
cthoyt opened this issue Nov 2, 2023 · 0 comments · May be fixed by #110
Open
Tracked by #969

Reconciliation based on synonym doesn't work as expected #87

cthoyt opened this issue Nov 2, 2023 · 0 comments · May be fixed by #110
Assignees
Labels
bug Something isn't working

Comments

@cthoyt
Copy link
Member

cthoyt commented Nov 2, 2023

r1 = Record(
    prefix="geo",
    prefix_synonyms=["GEO"],
    uri_prefix="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=",
    pattern="^G(PL|SM|SE|DS)\\d+$",
)
r2 = Record(
    prefix="geogeo", uri_prefix="http://purl.obolibrary.org/obo/GEO_", pattern="^\\d{9}$"
)
c1 = Converter([r1, r2])
remapping = {"GEO": "ncbi.geo", "geogeo": "GEO"}
c2 = remap_curie_prefixes(c1, remapping)

r3 = Record(
    prefix="ncbi.geo",
    uri_prefix="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=",
    pattern="^G(PL|SM|SE|DS)\\d+$",
)
r4 = Record(
    prefix="GEO",
    prefix_synonyms=["geo", "geogeo"],
    uri_prefix="http://purl.obolibrary.org/obo/GEO_",
    pattern="^\\d{9}$",
)
self.assertEqual([r4, r3], c2.records)

does not retain geo as synonym in r4

@cthoyt cthoyt added the bug Something isn't working label Nov 2, 2023
@cthoyt cthoyt self-assigned this Nov 2, 2023
cthoyt added a commit that referenced this issue Apr 22, 2024
@cthoyt cthoyt linked a pull request Apr 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant