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

Add prefix synonyms from the Bioregistry #48

Merged
merged 6 commits into from
Nov 6, 2023

Conversation

cthoyt
Copy link
Collaborator

@cthoyt cthoyt commented Oct 19, 2023

Closes #47 by adding prefix synonyms from the Bioregistry.

There's a slight issue related to Wikidata (see #49) so there's a special case for leaving out the problematic synonyms.

import prefixmaps
import pandas as pd


def main():
    converter = prefixmaps.load_converter("merged")
    curies = ["pmid:1234", "PMID:1234", "pubmed:1234", "PubMed:1234", "PUBMED:1234", "MEDLINE:1234"]
    rows = [(curie, converter.standardize_curie(curie)) for curie in curies]
    df = pd.DataFrame(rows, columns=["raw", "standardized"])
    print(df.to_markdown(index=False))


if __name__ == "__main__":
    main()
raw standardized
pmid:1234
PMID:1234 PUBMED:1234
pubmed:1234
PubMed:1234
PUBMED:1234 PUBMED:1234
MEDLINE:1234 PUBMED:1234

We can deal with the non-uppercase ones in a follow-up

@sierra-moxon sierra-moxon merged commit 71d3db0 into linkml:main Nov 6, 2023
4 checks passed
@cthoyt cthoyt deleted the add-bioregistry-prefixes branch November 6, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for propogating CURIE prefix synonyms
3 participants