Skip to content

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

@cthoyt

Description

@cthoyt
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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions