├── tests ├── test_core │ ├── __init__.py │ ├── test_curies.py │ ├── test_integrity.py │ └── test_prefixmaps.py ├── test_etl │ ├── __init__.py │ ├── test_prefix_cc.py │ ├── test_obo.py │ ├── test_w3id.py │ ├── test_bioportal.py │ ├── test_go.py │ └── test_bioregistry.py ├── __init__.py └── input │ ├── bioportal.yaml │ └── obo_prefixes.ttl ├── src └── prefixmaps │ ├── ingest │ ├── __init__.py │ ├── ingest_w3id.py │ ├── ingest_go.py │ ├── ingest_linkml.py │ ├── ingest_bioportal.py │ ├── ingest_shacl.py │ ├── ingest_jsonld.py │ ├── ingest_bioregistry.py │ └── etl_runner.py │ ├── io │ ├── __init__.py │ ├── writer.py │ └── parser.py │ ├── datamodel │ ├── __init__.py │ └── context.py │ ├── data │ ├── __init__.py │ ├── linked_data.curated.yaml │ ├── linked_data.csv │ ├── contexts.curated.yaml │ ├── go.csv │ ├── obo.csv │ ├── bioportal.curated.yaml │ └── bioportal.csv │ └── __init__.py ├── docs ├── modules.rst ├── prefixmaps.data.rst ├── prefixmaps.rst ├── prefixmaps.datamodel.rst ├── index.rst ├── prefixmaps.io.rst ├── Makefile ├── make.bat ├── prefixmaps.ingest.rst ├── conf.py └── intro.md ├── Makefile ├── .gitignore ├── .github ├── workflows │ ├── pypi-publish.yaml │ ├── doc_pages.yaml │ ├── refresh.yml │ └── main.yaml ├── CONTRIBUTING.md └── CODE_OF_CONDUCT.md ├── pyproject.toml ├── tox.ini ├── README.md └── LICENSE /tests/test_core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test_etl/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/prefixmaps/io/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/prefixmaps/datamodel/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/modules.rst: -------------------------------------------------------------------------------- 1 | Modules 2 | ========== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | prefixmaps 8 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | from pathlib import Path 3 | 4 | ROOT = os.path.abspath(os.path.dirname(__file__)) 5 | INPUT_DIR = Path(ROOT) / "input" 6 | OUTPUT_DIR = Path(ROOT) / "output" 7 | -------------------------------------------------------------------------------- /docs/prefixmaps.data.rst: -------------------------------------------------------------------------------- 1 | prefixmaps.data package 2 | ======================= 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: prefixmaps.data 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | RUN = poetry run 2 | DATA = src/prefixmaps/data 3 | 4 | test: 5 | $(RUN) python -m unittest 6 | 7 | 8 | etl: 9 | $(RUN) slurp-prefixmaps -d $(DATA) 10 | 11 | lint-fix: 12 | $(RUN) tox -e lint-fix 13 | $(RUN) tox -e flake8 14 | 15 | 16 | format: lint-fix -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | __pycache__ 4 | .pyc 5 | .ipynb_checkpoints/ 6 | docs/_build/ 7 | tests/output/ 8 | 9 | dist/ 10 | db/ 11 | 12 | notebooks/output/*json 13 | notebooks/output/*tsv 14 | notebooks/input/go.db 15 | notebooks/api-key.txt 16 | 17 | .template.db 18 | .venv 19 | .tox/ 20 | .coverage 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /src/prefixmaps/data/__init__.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from typing import Mapping 3 | 4 | __all__ = [ 5 | "data_path", 6 | "context_paths", 7 | ] 8 | 9 | data_path = Path(__file__).parent 10 | 11 | #: A mapping from contexts to their paths 12 | context_paths: Mapping[str, Path] = {path.stem: path for path in data_path.glob("*.csv")} 13 | -------------------------------------------------------------------------------- /docs/prefixmaps.rst: -------------------------------------------------------------------------------- 1 | prefixmaps package 2 | ================== 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | prefixmaps.data 11 | prefixmaps.datamodel 12 | prefixmaps.ingest 13 | prefixmaps.io 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: prefixmaps 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/prefixmaps.datamodel.rst: -------------------------------------------------------------------------------- 1 | prefixmaps.datamodel package 2 | ============================ 3 | 4 | Submodules 5 | ---------- 6 | 7 | prefixmaps.datamodel.context module 8 | ----------------------------------- 9 | 10 | .. automodule:: prefixmaps.datamodel.context 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: prefixmaps.datamodel 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /src/prefixmaps/__init__.py: -------------------------------------------------------------------------------- 1 | from .datamodel.context import Context, PrefixExpansion, StatusType 2 | from .io.parser import load_context, load_converter, load_multi_context 3 | 4 | try: 5 | from importlib.metadata import version 6 | except ImportError: # for Python<3.8 7 | from importlib_metadata import version 8 | 9 | __all__ = [ 10 | "load_converter", 11 | "load_context", 12 | "load_multi_context", 13 | "Context", 14 | "StatusType", 15 | "PrefixExpansion", 16 | ] 17 | __version__ = version(__name__) 18 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. prefixmaps documentation master file, created by 2 | sphinx-quickstart on Wed Oct 26 09:59:20 2022. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to prefixmaps's documentation! 7 | ====================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | :caption: Contents: 12 | 13 | intro.md 14 | modules 15 | 16 | 17 | 18 | Indices and tables 19 | ================== 20 | 21 | * :ref:`genindex` 22 | * :ref:`modindex` 23 | * :ref:`search` 24 | -------------------------------------------------------------------------------- /docs/prefixmaps.io.rst: -------------------------------------------------------------------------------- 1 | prefixmaps.io package 2 | ===================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | prefixmaps.io.parser module 8 | --------------------------- 9 | 10 | .. automodule:: prefixmaps.io.parser 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | prefixmaps.io.writer module 16 | --------------------------- 17 | 18 | .. automodule:: prefixmaps.io.writer 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: prefixmaps.io 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /tests/test_etl/test_prefix_cc.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from prefixmaps.ingest.ingest_jsonld import from_prefixcc 4 | 5 | EXPECTED = [ 6 | ("owl", "http://www.w3.org/2002/07/owl#"), 7 | ("foaf", "http://xmlns.com/foaf/0.1/"), 8 | ] 9 | 10 | 11 | class TextETLForPrefixCC(unittest.TestCase): 12 | def test_prefix_cc(self): 13 | ctxt = from_prefixcc() 14 | for pe in ctxt.prefix_expansions: 15 | print(pe) 16 | pm = ctxt.as_dict() 17 | pmi = ctxt.as_inverted_dict() 18 | for pfx, ns in EXPECTED: 19 | self.assertEqual(pm[pfx], ns) 20 | self.assertEqual(pmi[ns], pfx) 21 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /tests/test_etl/test_obo.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from prefixmaps.ingest.ingest_shacl import from_obo 4 | 5 | EXPECTED = [ 6 | ("GEO", "http://purl.obolibrary.org/obo/GEO_"), 7 | ("CL", "http://purl.obolibrary.org/obo/CL_"), 8 | ("UBERON", "http://purl.obolibrary.org/obo/UBERON_"), 9 | ("GO", "http://purl.obolibrary.org/obo/GO_"), 10 | ("WBPhenotype", "http://purl.obolibrary.org/obo/WBPhenotype_"), 11 | ] 12 | 13 | 14 | class TextETLForOBO(unittest.TestCase): 15 | def test_prefix_cc(self): 16 | ctxt = from_obo() 17 | pm = ctxt.as_dict() 18 | pmi = ctxt.as_inverted_dict() 19 | for pfx, ns in EXPECTED: 20 | self.assertEqual(pm[pfx], ns) 21 | self.assertEqual(pmi[ns], pfx) 22 | -------------------------------------------------------------------------------- /tests/test_etl/test_w3id.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from prefixmaps.ingest.ingest_w3id import from_w3id 4 | 5 | # use test cases that are likely to be stable 6 | EXPECTED = [ 7 | ("kgcl", "https://w3id.org/kgcl/"), 8 | ("linkml", "https://w3id.org/linkml/"), 9 | ("biolink", "https://w3id.org/biolink/"), 10 | ("chemrof", "https://w3id.org/chemrof/"), 11 | ("nfdi4cat", "https://w3id.org/nfdi4cat/"), 12 | ("yago", "https://w3id.org/yago/"), 13 | ] 14 | 15 | 16 | class TestW3id(unittest.TestCase): 17 | def test_w3id(self): 18 | ctxt = from_w3id() 19 | pm = ctxt.as_dict() 20 | pmi = ctxt.as_inverted_dict() 21 | for pfx, ns in EXPECTED: 22 | self.assertEqual(pm[pfx], ns) 23 | self.assertEqual(pmi[ns], pfx) 24 | -------------------------------------------------------------------------------- /.github/workflows/pypi-publish.yaml: -------------------------------------------------------------------------------- 1 | name: Publish Python Package 2 | 3 | on: 4 | release: 5 | types: [ created ] 6 | 7 | jobs: 8 | build-n-publish: 9 | name: Build and publish Python 🐍 distributions 📦 to PyPI 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: Set up Python 16 | uses: actions/setup-python@v3 17 | 18 | - name: Install Poetry 19 | run: | 20 | pip install poetry 21 | poetry self add "poetry-dynamic-versioning[plugin]" 22 | 23 | - name: Build source and wheel archives 24 | run: poetry build 25 | 26 | - name: Publish distribution 📦 to PyPI 27 | uses: pypa/gh-action-pypi-publish@v1.2.2 28 | with: 29 | user: __token__ 30 | password: ${{ secrets.pypi_password }} 31 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/ingest_w3id.py: -------------------------------------------------------------------------------- 1 | """ETL from w3id to prefixmaps.""" 2 | 3 | from prefixmaps.datamodel.context import Context 4 | 5 | API_LIST_CALL = "https://api.github.com/repos/perma-id/w3id.org/git/trees/master" 6 | 7 | 8 | def from_w3id() -> Context: 9 | """ 10 | Creates a Context from the https://github.com/perma-id/w3id.org/. 11 | 12 | :return: 13 | """ 14 | import requests 15 | 16 | r = requests.get(API_LIST_CALL) 17 | results = r.json() 18 | if r.status_code != 200: 19 | raise ValueError(results.message) 20 | if results["truncated"]: 21 | raise ValueError("truncated results") 22 | ctxt = Context("w3id") 23 | for entry in r.json()["tree"]: 24 | if entry["type"] != "tree": 25 | continue 26 | path = entry["path"] 27 | if "." in path: 28 | # skip hidden files like .htaccess 29 | continue 30 | ctxt.add_prefix(path, f"https://w3id.org/{path}/") 31 | return ctxt 32 | -------------------------------------------------------------------------------- /.github/workflows/doc_pages.yaml: -------------------------------------------------------------------------------- 1 | name: Sphinx Documentation 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: [ main ] 6 | 7 | jobs: 8 | build-docs: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@main 13 | with: 14 | fetch-depth: 0 # otherwise, you will failed to push refs to dest repo 15 | 16 | - name: Set up Python 3. 17 | uses: actions/setup-python@v3 18 | with: 19 | python-version: 3.9 20 | 21 | - name: Install Poetry. 22 | uses: snok/install-poetry@v1.3 23 | 24 | - name: install 25 | run: poetry install --only main,docs 26 | 27 | - name: Build documentation. 28 | run: | 29 | mkdir gh-pages 30 | touch gh-pages/.nojekyll 31 | cd docs/ 32 | poetry run sphinx-build -b html . _build 33 | cp -r _build/* ../gh-pages/ 34 | 35 | - name: Deploy documentation. 36 | if: ${{ github.event_name == 'push' }} 37 | uses: JamesIves/github-pages-deploy-action@v4.4.1 38 | with: 39 | branch: gh-pages 40 | force: true 41 | folder: gh-pages -------------------------------------------------------------------------------- /src/prefixmaps/data/linked_data.curated.yaml: -------------------------------------------------------------------------------- 1 | name: linkml 2 | prefixes: 3 | rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# 4 | rdfs: http://www.w3.org/2000/01/rdf-schema# 5 | linkml: https://w3id.org/linkml/ 6 | dcterms: http://purl.org/dc/terms/ 7 | skos: http://www.w3.org/2004/02/skos/core# 8 | skosxl: http://www.w3.org/2008/05/skos-xl# 9 | oboInOwl: http://www.geneontology.org/formats/oboInOwl# 10 | NCIThesaurus: http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl# 11 | pav: http://purl.org/pav/ 12 | oslc: http://open-services.net/ns/core# 13 | schema: http://schema.org/ 14 | bibo: http://purl.org/ontology/bibo/ 15 | swrl: http://www.w3.org/2003/11/swrl# 16 | sh: http://www.w3.org/ns/shacl# 17 | owl: http://www.w3.org/2002/07/owl# 18 | qb: http://purl.org/linked-data/cube# 19 | prov: http://www.w3.org/ns/prov# 20 | vann: https://vocab.org/vann/ 21 | qudt: http://qudt.org/schema/qudt/ 22 | xsd: http://www.w3.org/2001/XMLSchema# 23 | shex: http://www.w3.org/ns/shex# 24 | biolink: https://w3id.org/biolink/vocab/ 25 | foaf: http://xmlns.com/foaf/0.1/ 26 | NANDO: "http://identifiers.org/NANDO:" 27 | 28 | 29 | -------------------------------------------------------------------------------- /.github/workflows/refresh.yml: -------------------------------------------------------------------------------- 1 | name: Refresh Data 2 | on: 3 | workflow_dispatch: 4 | # schedule: 5 | # - cron: "0 0 * * *" 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@master 12 | with: 13 | persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token 14 | fetch-depth: 0 # otherwise, you will failed to push refs to dest repo 15 | - uses: actions/setup-python@v3 16 | with: 17 | python-version: "3.10" 18 | 19 | - name: Install dependencies 20 | run: pip install tox tox-poetry 21 | 22 | - name: Create local changes 23 | run: tox -e refresh 24 | 25 | - name: Commit local changes 26 | run: | 27 | git config --local user.email "action@github.com" 28 | git config --local user.name "GitHub Action" 29 | git commit --all -m "Automatically update" 30 | 31 | - name: Push changes 32 | uses: ad-m/github-push-action@master 33 | with: 34 | github_token: ${{ secrets.GITHUB_TOKEN }} 35 | branch: ${{ github.ref }} 36 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ### Code Style 4 | 5 | This project uses [`black`](https://github.com/psf/black) to automatically 6 | enforce a consistent code style. You can apply `black` and other pre-configured 7 | linters with `tox -e lint`. 8 | 9 | This project uses [`flake8`](https://flake8.pycqa.org) and several plugins for 10 | additional checks of documentation style, security issues, good variable 11 | nomenclature, and more ( 12 | see [`tox.ini`](tox.ini) for a list of flake8 plugins). You can check if your 13 | code passes `flake8` with `tox -e flake8`. 14 | 15 | Each of these checks are run on each commit using GitHub Actions as a continuous 16 | integration service. Passing all of them is required for accepting a 17 | contribution. If you're unsure how to address the feedback from one of these 18 | tools, please say so either in the description of your pull request or in a 19 | comment, and we will help you. 20 | 21 | These code style contribution guidelines have been adapted from the 22 | [cthoyt/cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack/blob/main/%7B%7Bcookiecutter.package_name%7D%7D/.github/CODE_OF_CONDUCT.md) 23 | Python package template. 24 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/ingest_go.py: -------------------------------------------------------------------------------- 1 | """Ingests the GO prefix registry.""" 2 | 3 | from typing import TextIO, Union 4 | 5 | import requests 6 | import yaml 7 | 8 | from prefixmaps.datamodel.context import Context 9 | 10 | URL = "https://raw.githubusercontent.com/geneontology/go-site/master/metadata/db-xrefs.yaml" # noqa: E501 11 | 12 | 13 | def parse_go_xrefs_from_remote() -> Context: 14 | r = requests.get(URL) 15 | return parse_go_xrefs(r.text) 16 | 17 | 18 | def parse_go_xrefs(input: Union[str, TextIO]) -> Context: 19 | """ 20 | Parse GO db-xrefs.yaml file. 21 | 22 | Note that most entries in the file are ignored. We only extract the 23 | "embedded JSON-LD context" which are those marked rdf_uri_prefix, 24 | which indicates the *semantic* expansions used in the triplestore. 25 | 26 | :param file: 27 | :return: 28 | """ 29 | prefixes = yaml.safe_load(input) 30 | context = Context("go") 31 | for p in prefixes: 32 | if "rdf_uri_prefix" in p: 33 | ns = p["rdf_uri_prefix"] 34 | if ns[-1] not in ["/", "#", "_"]: 35 | ns += "/" 36 | context.add_prefix(p["database"], ns) 37 | return context 38 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/ingest_linkml.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict, TextIO, Union 2 | 3 | import requests 4 | 5 | from prefixmaps.data import data_path 6 | from prefixmaps.datamodel.context import Context 7 | 8 | 9 | def from_linkml_url(url: str, name: str = None) -> Context: 10 | response = requests.get(url=url) 11 | if name is None: 12 | name = url 13 | return from_linkml_file(response.text, name) 14 | 15 | 16 | def from_linkml_file(file: Union[TextIO, str], name: str = None) -> Context: 17 | import yaml 18 | 19 | if isinstance(file, str): 20 | with open(file) as stream: 21 | return from_linkml_file(stream, name) 22 | else: 23 | return from_linkml(yaml.safe_load(file), name) 24 | 25 | 26 | def from_linkml(obj: Dict[str, Any], name: str = None) -> Context: 27 | if name is None: 28 | name = obj["name"] 29 | ctxt = Context(name) 30 | for k, v in obj["prefixes"].items(): 31 | ctxt.add_prefix(k, v) 32 | return ctxt 33 | 34 | 35 | def from_semweb_curated() -> Context: 36 | """ 37 | Ingests the curated SemWeb context. 38 | 39 | In future this may migrate upstream. 40 | :return: 41 | """ 42 | return from_linkml_file(str(data_path / "linked_data.curated.yaml")) 43 | -------------------------------------------------------------------------------- /tests/test_etl/test_bioportal.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | import yaml 4 | 5 | from prefixmaps.ingest.ingest_bioportal import from_bioportal 6 | from tests import INPUT_DIR 7 | 8 | EXPECTED_CANONICAL = [ 9 | ("OA", "http://www.w3.org/ns/oa#"), 10 | ("SCHEMA", "http://schema.org/"), 11 | ] 12 | 13 | EXPECTED_NONCANONICAL = [ 14 | "http://identifiers.org/omim/", 15 | "http://meta.schema.org/", 16 | ] 17 | 18 | 19 | class TextETLForBioportal(unittest.TestCase): 20 | def test_bioportal(self): 21 | with open(str(INPUT_DIR / "bioportal.yaml")) as file: 22 | ctxt = from_bioportal(yaml.safe_load(file), "bioportal") 23 | for prefix_expansion in ctxt.prefix_expansions: 24 | print(prefix_expansion) 25 | prefixmap = ctxt.as_dict() 26 | prefixmap_invert = ctxt.as_inverted_dict() 27 | for prefix, namespace in EXPECTED_CANONICAL: 28 | self.assertEqual(prefixmap[prefix], namespace) 29 | self.assertEqual(prefixmap_invert[namespace], prefix) 30 | # These maps are not included in the prefixmaps 31 | # but may be present in other objects 32 | for namespace in EXPECTED_NONCANONICAL: 33 | with self.assertRaises(KeyError): 34 | prefixmap_invert[namespace] 35 | -------------------------------------------------------------------------------- /tests/test_etl/test_go.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from prefixmaps.ingest.ingest_go import parse_go_xrefs, parse_go_xrefs_from_remote 4 | from prefixmaps.io.writer import context_to_file 5 | from tests import INPUT_DIR, OUTPUT_DIR 6 | 7 | 8 | class TextETLForGO(unittest.TestCase): 9 | def test_go(self): 10 | with open(str(INPUT_DIR / "go-db-xrefs.yaml")) as file: 11 | ctxt = parse_go_xrefs(file) 12 | # for pe in ctxt.prefix_expansions: 13 | # print(vars(pe)) 14 | pm = ctxt.as_dict() 15 | self.assertEqual( 16 | pm["WBPhenotype"], 17 | "http://purl.obolibrary.org/obo/WBPhenotype_", 18 | ) 19 | outpath = OUTPUT_DIR / "foo.csv" 20 | OUTPUT_DIR.mkdir(parents=True, exist_ok=True) 21 | with open(str(outpath), "w", encoding="UTF-8") as outfile: 22 | context_to_file(ctxt, outfile) 23 | 24 | def test_go_from_remote(self): 25 | ctxt = parse_go_xrefs_from_remote() 26 | # for pe in ctxt.prefix_expansions: 27 | # print(vars(pe)) 28 | pm = ctxt.as_dict() 29 | self.assertEqual(pm["WBPhenotype"], "http://purl.obolibrary.org/obo/WBPhenotype_") 30 | outpath = OUTPUT_DIR / "bar.csv" 31 | OUTPUT_DIR.mkdir(parents=True, exist_ok=True) 32 | with open(str(outpath), "w", encoding="UTF-8") as outfile: 33 | context_to_file(ctxt, outfile) 34 | -------------------------------------------------------------------------------- /src/prefixmaps/data/linked_data.csv: -------------------------------------------------------------------------------- 1 | context,prefix,namespace,status 2 | linkml,bibo,http://purl.org/ontology/bibo/,canonical 3 | linkml,biolink,https://w3id.org/biolink/vocab/,canonical 4 | linkml,dcterms,http://purl.org/dc/terms/,canonical 5 | linkml,foaf,http://xmlns.com/foaf/0.1/,canonical 6 | linkml,linkml,https://w3id.org/linkml/,canonical 7 | linkml,NANDO,http://identifiers.org/NANDO:,canonical 8 | linkml,NCIThesaurus,http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#,canonical 9 | linkml,oboInOwl,http://www.geneontology.org/formats/oboInOwl#,canonical 10 | linkml,oslc,http://open-services.net/ns/core#,canonical 11 | linkml,owl,http://www.w3.org/2002/07/owl#,canonical 12 | linkml,pav,http://purl.org/pav/,canonical 13 | linkml,prov,http://www.w3.org/ns/prov#,canonical 14 | linkml,qb,http://purl.org/linked-data/cube#,canonical 15 | linkml,qudt,http://qudt.org/schema/qudt/,canonical 16 | linkml,rdf,http://www.w3.org/1999/02/22-rdf-syntax-ns#,canonical 17 | linkml,rdfs,http://www.w3.org/2000/01/rdf-schema#,canonical 18 | linkml,schema,http://schema.org/,canonical 19 | linkml,sh,http://www.w3.org/ns/shacl#,canonical 20 | linkml,shex,http://www.w3.org/ns/shex#,canonical 21 | linkml,skos,http://www.w3.org/2004/02/skos/core#,canonical 22 | linkml,skosxl,http://www.w3.org/2008/05/skos-xl#,canonical 23 | linkml,swrl,http://www.w3.org/2003/11/swrl#,canonical 24 | linkml,vann,https://vocab.org/vann/,canonical 25 | linkml,xsd,http://www.w3.org/2001/XMLSchema#,canonical 26 | -------------------------------------------------------------------------------- /src/prefixmaps/io/writer.py: -------------------------------------------------------------------------------- 1 | from csv import DictWriter 2 | from typing import TextIO 3 | 4 | from prefixmaps.datamodel.context import Context, PrefixExpansion, StatusType 5 | 6 | STATUS_TYPE_ORDER = { 7 | StatusType.canonical: 0, 8 | StatusType.prefix_alias: 1, 9 | StatusType.namespace_alias: 2, 10 | StatusType.multi_alias: 3, 11 | } 12 | 13 | 14 | def _key(pe: PrefixExpansion): 15 | return pe.prefix.casefold(), STATUS_TYPE_ORDER[pe.status] 16 | 17 | 18 | def context_to_file( 19 | context: Context, file: TextIO, *, include_expansion_source: bool = False 20 | ) -> None: 21 | """ 22 | Writes a context to a file 23 | 24 | :param context: 25 | :param file: 26 | :param include_expansion_source: If true, include a "source" column. This is useful for 27 | writing merged contexts since it says the highest priority simple context 28 | from which the row corresponding to a :class:`PrefixExpansion` came. 29 | :return: 30 | """ 31 | field_names = ["context", "prefix", "namespace", "status"] 32 | if include_expansion_source: 33 | field_names.append("expansion_source") 34 | writer = DictWriter(file, fieldnames=field_names) 35 | writer.writeheader() 36 | for pe in sorted(context.prefix_expansions, key=_key): 37 | row = vars(pe) 38 | row["status"] = pe.status.value 39 | if not include_expansion_source: 40 | row.pop("expansion_source", None) 41 | writer.writerow(row) 42 | -------------------------------------------------------------------------------- /tests/test_core/test_curies.py: -------------------------------------------------------------------------------- 1 | """Test loading data into CURIEs converters.""" 2 | 3 | import unittest 4 | 5 | from curies import Converter 6 | 7 | import prefixmaps 8 | 9 | 10 | class TestCuries(unittest.TestCase): 11 | """Test loading data into CURIEs converters.""" 12 | 13 | def test_load(self): 14 | """Test loading bioportal content.""" 15 | prefix = "WIKIPATHWAYS" 16 | uri_prefix_1 = "http://vocabularies.wikipathways.org/wp#" 17 | uri_prefix_2 = "http://vocabularies.wikipathways.org/wpTypes#" 18 | 19 | context = prefixmaps.load_context("bioportal") 20 | context_namespaces = {expansion.namespace for expansion in context.prefix_expansions} 21 | self.assertIn(uri_prefix_1, context_namespaces) 22 | self.assertIn(uri_prefix_2, context_namespaces) 23 | 24 | converter = context.as_converter() 25 | self.assertIsInstance(converter, Converter) 26 | 27 | self.assertEqual(converter.prefix_map, prefixmaps.load_converter("bioportal").prefix_map) 28 | self.assertEqual(converter.prefix_map, prefixmaps.load_converter(["bioportal"]).prefix_map) 29 | 30 | # prefix map checks 31 | self.assertIn(prefix, converter.prefix_map) 32 | self.assertEqual(uri_prefix_1, converter.prefix_map[prefix]) 33 | self.assertNotIn(uri_prefix_2, converter.prefix_map.values()) 34 | 35 | # Reverse prefix map checks 36 | self.assertIn(uri_prefix_1, converter.reverse_prefix_map) 37 | self.assertIn(uri_prefix_2, converter.reverse_prefix_map) 38 | self.assertEqual(prefix, converter.reverse_prefix_map[uri_prefix_1]) 39 | self.assertEqual(prefix, converter.reverse_prefix_map[uri_prefix_2]) 40 | -------------------------------------------------------------------------------- /docs/prefixmaps.ingest.rst: -------------------------------------------------------------------------------- 1 | prefixmaps.ingest package 2 | ========================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | prefixmaps.ingest.etl\_runner module 8 | ------------------------------------ 9 | 10 | .. automodule:: prefixmaps.ingest.etl_runner 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | prefixmaps.ingest.ingest module 16 | ------------------------------- 17 | 18 | .. automodule:: prefixmaps.ingest.ingest 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | prefixmaps.ingest.ingest\_bioregistry module 24 | -------------------------------------------- 25 | 26 | .. automodule:: prefixmaps.ingest.ingest_bioregistry 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | prefixmaps.ingest.ingest\_go module 32 | ----------------------------------- 33 | 34 | .. automodule:: prefixmaps.ingest.ingest_go 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | prefixmaps.ingest.ingest\_jsonld module 40 | --------------------------------------- 41 | 42 | .. automodule:: prefixmaps.ingest.ingest_jsonld 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | 47 | prefixmaps.ingest.ingest\_linkml module 48 | --------------------------------------- 49 | 50 | .. automodule:: prefixmaps.ingest.ingest_linkml 51 | :members: 52 | :undoc-members: 53 | :show-inheritance: 54 | 55 | prefixmaps.ingest.ingest\_shacl module 56 | -------------------------------------- 57 | 58 | .. automodule:: prefixmaps.ingest.ingest_shacl 59 | :members: 60 | :undoc-members: 61 | :show-inheritance: 62 | 63 | Module contents 64 | --------------- 65 | 66 | .. automodule:: prefixmaps.ingest 67 | :members: 68 | :undoc-members: 69 | :show-inheritance: 70 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/ingest_bioportal.py: -------------------------------------------------------------------------------- 1 | """Simple ETL from bioportal to prefixmaps.""" 2 | 3 | from typing import Any, Dict, TextIO, Union 4 | 5 | from prefixmaps.data import data_path 6 | from prefixmaps.datamodel.context import Context, StatusType 7 | 8 | CURATED_PATH = str(data_path / "bioportal.curated.yaml") 9 | 10 | 11 | def from_bioportal_file(file: Union[TextIO, str] = CURATED_PATH, name: str = None) -> Context: 12 | """ 13 | Parse curated Bioportal prefixes. 14 | 15 | In the future, Bioportal prefixes should be 16 | retrieved from their API 17 | (https://data.bioontology.org/documentation) 18 | but are presently parsed from a curated set. 19 | 20 | :param file: text stream or str, name of file containing curated prefixes 21 | :param name: str, name of context 22 | :return: Context object. 23 | """ 24 | import yaml 25 | 26 | if isinstance(file, str): 27 | with open(file) as stream: 28 | return from_bioportal_file(stream, name) 29 | else: 30 | return from_bioportal(yaml.safe_load(file), name) 31 | 32 | 33 | def from_bioportal(obj: Dict[str, Any], name: str = None) -> Context: 34 | if name is None: 35 | name = obj["name"] 36 | ctxt = Context(name) 37 | for prefix, uri_prefix in obj["prefixes"].items(): 38 | if isinstance(uri_prefix, list): 39 | for i, item in enumerate(uri_prefix): 40 | if i == 0: 41 | statustype = StatusType.canonical 42 | else: 43 | statustype = StatusType.prefix_alias 44 | ctxt.add_prefix(prefix=prefix, namespace=item, status=statustype, preferred=True) 45 | else: 46 | ctxt.add_prefix(prefix=prefix, namespace=uri_prefix, preferred=True) 47 | return ctxt 48 | -------------------------------------------------------------------------------- /src/prefixmaps/data/contexts.curated.yaml: -------------------------------------------------------------------------------- 1 | - name: obo 2 | description: OBO prefix registry 3 | format: shacl.ttl 4 | location: http://purl.obolibrary.org/meta/obo_prefixes.ttl 5 | 6 | - name: linked_data 7 | description: Curated Linked Data Prefixes 8 | comments: 9 | - note that only a small subset are curated, to serve as tie-breakers for prefixes.cc 10 | format: linkml.yaml 11 | location: linked_data.curated.yaml 12 | 13 | - name: go 14 | description: GO Semantic Prefixes 15 | format: go-dbxrefs.yaml 16 | location: https://raw.githubusercontent.com/geneontology/go-site/master/metadata/db-xrefs.yaml 17 | 18 | - name: prefixcc 19 | description: prefix.cc registry 20 | format: context.jsonld 21 | location: http://prefix.cc/context.jsonld 22 | comments: 23 | - prefix.cc is quite a messy source, it has many outdated expansions for OBO ontologies, lots of strange duplicates etc 24 | - we recommend this is not used in isolation but is instead combined, lower in the priority order 25 | 26 | - name: bioportal 27 | description: bioportal 28 | comments: 29 | - prefixes are specific to bioportal and may conflict with other contexts 30 | - canonical, prefix_alias, and namespace_alias entries are present 31 | format: linkml.yaml 32 | location: bioportal.curated.yaml 33 | 34 | - name: bioregistry 35 | description: bioregistry 36 | format: bioregistry_api 37 | 38 | - name: bioregistry.upper 39 | description: bioregistry normalized to upper-case for MIRIAM entries 40 | upper: true 41 | format: bioregistry_api 42 | comments: 43 | - The correct form for most databases such as MGI, ZFIN, GO, CGD, COG, EC, ENSEMBL, etc is upper-case 44 | - the need for this will disappear if we can curated a preferred form in bioregistry 45 | 46 | - name: merged 47 | description: merged entries 48 | merged_from: ["obo", "go", "linked_data", "bioregistry.upper", "prefixcc"] 49 | -------------------------------------------------------------------------------- /tests/input/bioportal.yaml: -------------------------------------------------------------------------------- 1 | name: bioportal 2 | prefixes: 3 | OA: http://www.w3.org/ns/oa# 4 | OBOE: http://ecoinformatics.org/oboe/oboe.1.2/ 5 | OBOREL: 6 | - http://www.obofoundry.org/ro/ro.owl# 7 | - OBO:OBO_REL#_ 8 | OBS: http://www.semanticweb.org/bito2/ontologies/2021/3/untitled-ontology-11# 9 | OCIMIDO: https://github.com/sap218/ocimido/blob/master/ontology/ocimido.owl# 10 | OCRE: http://purl.org/net/OCRe/ 11 | OGR: http://www.owl-ontologies.com/GeographicalRegion.owl# 12 | OGROUP: http://protozoadb.biowebdb.org/22/ogroup# 13 | OM: http://www.ontology-of-units-of-measure.org/resource/ 14 | OMIM: 15 | - http://purl.bioontology.org/ontology/OMIM/ 16 | - http://identifiers.org/omim/ 17 | PROVO: 18 | - http://www.w3.org/ns/prov-o# 19 | - http://www.w3.org/ns/prov-o-20130312# 20 | RCTONT: http://www.owl-ontologies.com/RCTOntology.owl# 21 | RCTV2: http://purl.bioontology.org/ontology/RCTV2/ 22 | RDA-CONTENT: http://rdaregistry.info/termList/RDAContentType# 23 | REPO: http://purl.bioontology.org/ontology/REPO.owl# 24 | RH-MESH: http://phenomebrowser.net/ontologies/mesh/mesh.owl# 25 | RO: http://www.radiomics.org/RO/ 26 | ROLEO: OBO:RoleO_ 27 | ROO: http://www.cancerdata.org/roo/ 28 | RPO: http://www.semanticweb.org/ontologies/2012/5/Ontology1338526551855.owl# 29 | RSA: http://rdf.biosemantics.org/ontologies/rsa# 30 | RVO: http://w3id.org/rv-ontology# 31 | SAO: http://ccdb.ucsd.edu/SAO/1.2# 32 | SBO: 33 | - http://purl.bioontology.org/ontology/SBO/SBO_ 34 | - http://biomodels.net/SBO/SBO_ 35 | SBOL: OBO:SBOL_ 36 | SCHEMA: 37 | - http://schema.org/ 38 | - http://meta.schema.org/ 39 | - http://www.w3.org/wiki/WebSchemas/ 40 | - https://www.w3.org/wiki/WebSchemas/ 41 | SCIO: http://psink.de/scio/ 42 | SD3: http://www.wiser.pitt.edu/ontologies/SimulationScenarioDeviations.owl# 43 | SDO: http://mimi.case.edu/ontologies/2009/1/SDO.owl# 44 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "prefixmaps" 3 | version = "0.0.0" 4 | description = "A python library for retrieving semantic prefix maps" 5 | readme = "README.md" 6 | authors = ["cmungall "] 7 | keywords = ["semantic web", "bioinformatics"] 8 | license = "Apache-2.0" 9 | classifiers = [ 10 | "Development Status :: 1 - Planning", 11 | "Topic :: Scientific/Engineering :: Bio-Informatics", 12 | "Programming Language :: Python :: 3.12", 13 | "Programming Language :: Python :: 3.11", 14 | "Programming Language :: Python :: 3.10", 15 | "Programming Language :: Python :: 3.9", 16 | "Programming Language :: Python :: 3.8", 17 | ] 18 | 19 | [tool.poetry.urls] 20 | repository = "https://github.com/linkml/prefixmaps" 21 | homepage = "https://github.com/linkml/prefixmaps" 22 | "Bug Tracker" = "https://github.com/linkml/prefixmaps/issues" 23 | 24 | 25 | [tool.poetry.dependencies] 26 | python = "^3.8" 27 | pyyaml = ">=5.3.1" 28 | curies = ">=0.5.3" 29 | 30 | [tool.poetry.group.test.dependencies] 31 | pytest = ">=6.2" 32 | coverage = ">=6.4.4" 33 | tox = "^4.11.3" 34 | 35 | [tool.poetry.group.docs.dependencies] 36 | myst-parser = "*" 37 | sphinx = ">=7.0.0" 38 | sphinx-autodoc-typehints = "*" 39 | sphinx-click = "*" 40 | sphinx-rtd-theme = "*" 41 | 42 | [tool.poetry.group.refresh.dependencies] 43 | click = ">=8.1.3" 44 | requests = "^2.28.1" 45 | bioregistry = "^0.11.10" 46 | rdflib = "^6.2.0" 47 | 48 | [tool.poetry-dynamic-versioning] 49 | enable = true 50 | vcs = "git" 51 | style = "pep440" 52 | 53 | [tool.black] 54 | line-length = 100 55 | target-version = ["py39", "py310"] 56 | 57 | [build-system] 58 | requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] 59 | build-backend = "poetry_dynamic_versioning.backend" 60 | 61 | [tool.poetry.scripts] 62 | slurp-prefixmaps = "prefixmaps.ingest.etl_runner:cli" 63 | 64 | [tool.isort] 65 | profile = "black" 66 | multi_line_output = 3 67 | include_trailing_comma = true 68 | reverse_relative = true 69 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/ingest_shacl.py: -------------------------------------------------------------------------------- 1 | """Ingests from triples using the SHACL PrefixDeclarations data model.""" 2 | 3 | from typing import Any, TextIO, Union 4 | 5 | import rdflib 6 | from rdflib import Graph, Literal 7 | 8 | from prefixmaps.datamodel.context import Context 9 | 10 | 11 | def _literal_value(v: Any) -> str: 12 | if isinstance(v, Literal): 13 | return v.value 14 | else: 15 | raise ValueError(f"Expected literal: {v}") 16 | 17 | 18 | def from_shacl_url(url: str, name: str) -> Context: 19 | """ 20 | Creates a context from a remote URL with turtle using SHACL vocabulary 21 | 22 | :param url: 23 | :param name: 24 | :return: 25 | """ 26 | g = Graph() 27 | g.parse(url) 28 | return from_shacl_graph(g, name) 29 | 30 | 31 | def from_shacl_file(file: Union[TextIO, str], name: str, format=None) -> Context: 32 | """ 33 | Creates a context from a local turtle using SHACL vocabulary 34 | 35 | :param file: 36 | :param name: 37 | :param format: 38 | :return: 39 | """ 40 | g = Graph() 41 | g.parse(file, format=format) 42 | return from_shacl_graph(g, name) 43 | 44 | 45 | def from_shacl_graph(g: Graph, name: str) -> Context: 46 | """ 47 | Creates a context from a graph using SHACL vocabulary 48 | 49 | :param g: 50 | :param name: 51 | :return: 52 | """ 53 | shacl = rdflib.Namespace("http://www.w3.org/ns/shacl#") 54 | if name is None: 55 | raise ValueError("Must pass name") 56 | ctxt = Context(name) 57 | for subject, _, prefix in g.triples((None, shacl.prefix, None)): 58 | namespaces = list(g.objects(subject, shacl.namespace)) 59 | if len(namespaces) != 1: 60 | raise ValueError(f"Expected exactly one ns for {prefix}, got: {namespaces}") 61 | ns = namespaces[0] 62 | ctxt.add_prefix(_literal_value(prefix), _literal_value(ns)) 63 | return ctxt 64 | 65 | 66 | def from_obo() -> Context: 67 | """ 68 | Creates a context from official OBO SHACL namespace PURL. 69 | 70 | :return: 71 | """ 72 | return from_shacl_url("http://obofoundry.org/registry/obo_prefixes.ttl", "obo") 73 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # Tox (http://tox.testrun.org/) is a tool for running tests 2 | # in multiple virtualenvs. This configuration file will run the 3 | # test suite on all supported python versions. To use it, "pip install tox" 4 | # and then run "tox" from this directory. 5 | 6 | [tox] 7 | isolated_build = true 8 | envlist = 9 | lint 10 | flake8 11 | 12 | [testenv:lint] 13 | deps = 14 | black 15 | isort 16 | skip_install = true 17 | commands = 18 | black . 19 | isort . 20 | description = Run linters. 21 | 22 | [testenv:lint-fix] 23 | deps = 24 | black 25 | ruff 26 | skip_install = true 27 | commands = 28 | black src/ tests/ 29 | ruff --fix src/ tests/ 30 | description = Run linters. 31 | 32 | [testenv:flake8] 33 | skip_install = true 34 | deps = 35 | flake8<5.0.0 36 | flake8-bandit 37 | flake8-black 38 | flake8-bugbear 39 | flake8-colors 40 | flake8-isort 41 | pep8-naming 42 | commands = 43 | flake8 src/ tests/ 44 | description = Run the flake8 tool with several plugins (bandit, docstrings, import order, pep8 naming). 45 | 46 | [testenv:refresh] 47 | description = Refresh the data in the prefixmaps package 48 | skip_install = true 49 | allowlist_externals = poetry 50 | commands_pre = 51 | poetry install --only main,refresh 52 | commands = 53 | python -m prefixmaps.ingest.etl_runner 54 | 55 | ######################### 56 | # Flake8 Configuration # 57 | # (.flake8) # 58 | ######################### 59 | [flake8] 60 | ignore = 61 | E203 62 | W503 63 | C901 # needs code change so ignoring for now. 64 | E731 # needs code change so ignoring for now. 65 | S101 # asserts are fine 66 | S106 # flags false positives with test_table_filler 67 | N801 # mixed case is bad but there's a lot of auto-generated code 68 | N815 # same ^ 69 | S404 # Consider possible security implications associated with the subprocess module. 70 | S108 # Probable insecure usage of temp file/directory. 71 | S307 # Use of possibly insecure function - consider using safer ast.literal_eval. 72 | S603 # subprocess call - check for execution of untrusted input. 73 | S607 # Starting a process with a partial executable path ["open" in both cases] 74 | S608 # Possible SQL injection vector through string-based query construction. 75 | S113 # Requests timeout 76 | max-line-length = 120 77 | max-complexity = 13 78 | import-order-style = pycharm 79 | application-import-names = 80 | oaklib 81 | tests 82 | exclude = 83 | datamodels ## datamodels are auto-generated 84 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # For the full list of built-in configuration values, see the documentation: 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 5 | import os 6 | import re 7 | import sys 8 | from datetime import date 9 | 10 | from prefixmaps import __version__ 11 | 12 | # -- Project information ----------------------------------------------------- 13 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information 14 | 15 | project = "prefixmaps" 16 | copyright = f"{date.today().year}, Chris Mungall" 17 | author = "Chris Mungall" 18 | release = __version__ 19 | 20 | # -- General configuration --------------------------------------------------- 21 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration 22 | 23 | extensions = [ 24 | "sphinx.ext.autodoc", 25 | "sphinx.ext.githubpages", 26 | "sphinx_rtd_theme", 27 | "sphinx_click", 28 | "sphinx_autodoc_typehints", 29 | "myst_parser", 30 | ] 31 | 32 | # generate autosummary pages 33 | autosummary_generate = True 34 | 35 | # The master toctree document. 36 | master_doc = "index" 37 | 38 | # The language for content autogenerated by Sphinx. Refer to documentation 39 | # for a list of supported languages. 40 | # 41 | # This is also used if you do content translation via gettext catalogs. 42 | # Usually you set "language" from the command line for these cases. 43 | language = "en" 44 | 45 | # List of patterns, relative to source directory, that match files and 46 | # directories to ignore when looking for source files. 47 | # This pattern also affects html_static_path and html_extra_path. 48 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] 49 | 50 | templates_path = ["_templates"] 51 | 52 | source_suffix = { 53 | ".rst": "restructuredtext", 54 | ".txt": "markdown", 55 | ".md": "markdown", 56 | } 57 | 58 | # -- Options for HTML output ------------------------------------------------- 59 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output 60 | 61 | html_theme = "sphinx_rtd_theme" 62 | html_static_path = ["_static"] 63 | 64 | # The name of an image file (relative to this directory) to place at the top 65 | # of the sidebar. 66 | # 67 | if os.path.exists("logo.png"): 68 | html_logo = "logo.png" 69 | 70 | 71 | intersphinx_mapping = { 72 | "https://docs.python.org/3/": None, 73 | "bioregistry": ("https://bioregistry.readthedocs.io/en/stable/", None), 74 | "curies": ("https://curies.readthedocs.io/en/stable/", None), 75 | "rdflib": ("https://rdflib.readthedocs.io/en/stable/", None), 76 | } 77 | -------------------------------------------------------------------------------- /tests/test_etl/test_bioregistry.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | 3 | from bioregistry import curie_from_iri, get_iri 4 | 5 | from prefixmaps.ingest.ingest_bioregistry import from_bioregistry 6 | 7 | OBO = "obo" 8 | SEMWEB = "semweb" 9 | OTHER = "other" 10 | priority = [ 11 | "obofoundry", 12 | "semweb", 13 | "default", 14 | "bioportal", 15 | "miriam", 16 | "ols", 17 | "n2t", 18 | ] 19 | 20 | # expected expansions for different priorities 21 | EXPECTED_CURIE_TO_URI = [ 22 | ("GO:0008150", "http://purl.obolibrary.org/obo/GO_0008150", OBO), 23 | # ("GEO:000000396", "http://purl.obolibrary.org/obo/GEO_000000396", OBO), 24 | ("owl:Thing", "http://www.w3.org/2002/07/owl#Thing", SEMWEB), 25 | ( 26 | "oio:inSubset", 27 | "http://www.geneontology.org/formats/oboInOwl#inSubset", 28 | OTHER, 29 | ), 30 | ] 31 | 32 | EXPECTED = [ 33 | ("GEOGEO", "http://purl.obolibrary.org/obo/GEO_"), 34 | ("GO", "http://purl.obolibrary.org/obo/GO_"), 35 | ("FBbt", "http://purl.obolibrary.org/obo/FBbt_"), 36 | ] 37 | 38 | EXPECTED_UPPER = [ 39 | ("GEOGEO", "http://purl.obolibrary.org/obo/GEO_"), 40 | ("FlyBase", "http://identifiers.org/fb/"), 41 | ("HGNC", "http://identifiers.org/hgnc/"), 42 | ("FBbt", "http://purl.obolibrary.org/obo/FBbt_"), 43 | ] 44 | 45 | 46 | class TestBioregistry(unittest.TestCase): 47 | def test_from_bioregistry(self): 48 | ctxt = from_bioregistry() 49 | # for pe in ctxt.prefix_expansions: 50 | # print(pe) 51 | pm = ctxt.as_dict() 52 | pmi = ctxt.as_inverted_dict() 53 | for pfx, ns in EXPECTED: 54 | self.assertEqual(pm[pfx], ns) 55 | self.assertEqual(pmi[ns], pfx) 56 | 57 | def test_from_bioregistry_as_upper(self): 58 | ctxt = from_bioregistry(upper=True) 59 | # for pe in ctxt.prefix_expansions: 60 | # print(pe) 61 | pm = ctxt.as_dict() 62 | pmi = ctxt.as_inverted_dict() 63 | for pfx, ns in EXPECTED_UPPER: 64 | self.assertEqual(pm[pfx], ns) 65 | self.assertEqual(pmi[ns], pfx) 66 | 67 | def test_curie_to_iri(self): 68 | for curie, iri, _ in EXPECTED_CURIE_TO_URI: 69 | self.assertEqual(get_iri(curie, priority=priority), iri) 70 | 71 | @unittest.skip("TODO: GEO should not be GEOGEO in bioregistry prefixmap") 72 | def test_iri_to_curie(self): 73 | for curie, iri, _ in EXPECTED_CURIE_TO_URI: 74 | self.assertEqual(curie_from_iri(iri), curie) 75 | 76 | def test_semweb_iri_to_curie(self): 77 | for curie, iri, categ in EXPECTED_CURIE_TO_URI: 78 | if categ == SEMWEB: 79 | self.assertEqual(curie_from_iri(iri), curie) 80 | -------------------------------------------------------------------------------- /src/prefixmaps/io/parser.py: -------------------------------------------------------------------------------- 1 | from csv import DictReader 2 | from pathlib import Path 3 | from typing import List, TextIO, Union 4 | 5 | import yaml 6 | from curies import Converter 7 | 8 | from prefixmaps.data import data_path 9 | from prefixmaps.datamodel.context import CONTEXT, Context, PrefixExpansion, StatusType 10 | 11 | __all__ = [ 12 | "load_multi_context", 13 | "load_context", 14 | "load_converter", 15 | ] 16 | 17 | 18 | def context_path(name: CONTEXT) -> Path: 19 | """ 20 | Get the path in which the context datafile lives 21 | 22 | :param name: 23 | :return: 24 | """ 25 | return data_path / f"{name}.csv" 26 | 27 | 28 | def load_converter(names: Union[CONTEXT, List[CONTEXT]], refresh: bool = False) -> Converter: 29 | """Get a converter.""" 30 | if isinstance(names, str): 31 | return load_context(names, refresh=refresh).as_converter() 32 | return load_multi_context(names, refresh=refresh).as_converter() 33 | 34 | 35 | def load_multi_context(names: List[CONTEXT], refresh=False) -> Context: 36 | """ 37 | Merges multiple contexts 38 | 39 | :param names: 40 | :param refresh: if True, fetch from upstream 41 | :return: 42 | """ 43 | if len(names) == 1: 44 | return load_context(names[0], refresh=refresh) 45 | name = "+".join(names) 46 | ctxt = Context(name) 47 | for n in names: 48 | ctxt.combine(load_context(n, refresh=refresh)) 49 | return ctxt 50 | 51 | 52 | def load_context(name: CONTEXT, refresh=False) -> Context: 53 | """ 54 | Loads a context by name from standard location 55 | 56 | :param name: 57 | :param refresh: if True, fetch from upstream 58 | :return: 59 | """ 60 | if refresh: 61 | from prefixmaps.ingest.etl_runner import load_context_from_source 62 | 63 | return load_context_from_source(name) 64 | else: 65 | with open(data_path / f"{name}.csv", encoding="utf-8") as file: 66 | return context_from_file(name, file) 67 | 68 | 69 | def context_from_file(name: CONTEXT, file: TextIO) -> Context: 70 | """ 71 | Loads a context from a file 72 | 73 | :param name: 74 | :param file: 75 | :return: 76 | """ 77 | reader = DictReader(file) 78 | context = Context(name=name) 79 | for row in reader: 80 | row["status"] = StatusType[row["status"]] 81 | pe = PrefixExpansion(**row) 82 | context.prefix_expansions.append(pe) 83 | return context 84 | 85 | 86 | def load_contexts_meta() -> List[Context]: 87 | """ 88 | Returns metadata for all contexts 89 | 90 | :param name: 91 | :return: 92 | """ 93 | objs = yaml.safe_load(open(data_path / "contexts.curated.yaml")) 94 | ctxts = [] 95 | for obj in objs: 96 | ctxt = Context(**obj) 97 | ctxts.append(ctxt) 98 | return ctxts 99 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/ingest_jsonld.py: -------------------------------------------------------------------------------- 1 | """Generic JSON-LD ingests.""" 2 | 3 | import json 4 | from typing import Any, Dict, List, Optional, TextIO, Union 5 | 6 | import requests 7 | 8 | from prefixmaps.datamodel.context import Context 9 | 10 | AT_CONTEXT = "@context" 11 | 12 | PREFIXCC_EXCLUDE = [ 13 | "bp", 14 | "terms", 15 | "dc", 16 | "ma", 17 | "ont", 18 | "fb", 19 | "obo", 20 | "http", 21 | "dcterm", 22 | "dc11", 23 | "uniprot", 24 | "go", 25 | "gold", 26 | "chebi", 27 | ] 28 | 29 | 30 | def from_jsonld_context_url(url: str, name: str, excludes: Optional[List[str]] = None) -> Context: 31 | """ 32 | Ingests from a remote JSON-LD context. 33 | 34 | :param url: 35 | :param name: 36 | :param excludes: 37 | :return: 38 | """ 39 | response = requests.get(url=url) 40 | if name is None: 41 | name = url 42 | return from_jsonld_context(response.json(), name, excludes) 43 | 44 | 45 | def from_jsonld_context_file( 46 | file: Union[TextIO, str], name: str, excludes: Optional[List[str]] = None 47 | ) -> Context: 48 | """ 49 | Ingests from a local JSON-LD context. 50 | 51 | :param file: 52 | :param name: 53 | :param excludes: 54 | :return: 55 | """ 56 | if isinstance(file, str): 57 | if name is None: 58 | name = file 59 | with open(file) as stream: 60 | return from_jsonld_context_file(stream, name, excludes) 61 | else: 62 | return from_jsonld_context(json.load(file), name, excludes) 63 | 64 | 65 | def from_jsonld_context( 66 | jsonld_context: Dict[str, Any], 67 | name: str, 68 | excludes: Optional[List[str]] = None, 69 | ) -> Context: 70 | """ 71 | Ingests from a JSON-LD context stored as a dictionary. 72 | 73 | .. note:: 74 | 75 | Does not support JSON-LD 1.1 contexts. 76 | 77 | :param jsonld_context: 78 | :param name: 79 | :param excludes: 80 | :return: 81 | """ 82 | if name is None: 83 | raise ValueError("Must pass name") 84 | ctxt = Context(name) 85 | if AT_CONTEXT in jsonld_context: 86 | for k, v in jsonld_context[AT_CONTEXT].items(): 87 | if k in excludes: 88 | continue 89 | if isinstance(v, str): 90 | ctxt.add_prefix(k, v) 91 | else: 92 | raise NotImplementedError("JSONLD 1.1 contexts not implemented") 93 | return ctxt 94 | else: 95 | raise ValueError(f"Expected {AT_CONTEXT}") 96 | 97 | 98 | def from_prefixcc() -> Context: 99 | """ 100 | Ingests from prefix.cc. 101 | 102 | Note that prefix.cc is an extremely messy source, but it can be useful 103 | for semweb namespaces. 104 | 105 | In order to prioritize "better" prefixes we have an exclusion list, that attempts to 106 | exclude the most egregious entries, and prioritize more official sources. However, 107 | there are still no guarantees as to quality. 108 | 109 | Longer term we should focus on the curated linked_data.yaml file, and 110 | moving this to bioregistry. 111 | 112 | :return: 113 | """ 114 | return from_jsonld_context_url("http://prefix.cc/context.jsonld", "prefixcc", PREFIXCC_EXCLUDE) 115 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | # Built from: 2 | # https://docs.github.com/en/actions/guides/building-and-testing-python 3 | # https://github.com/snok/install-poetry#workflows-and-tips 4 | 5 | name: Build and test 6 | 7 | on: 8 | push: 9 | branches: [ main ] 10 | pull_request: 11 | branches: [ main ] 12 | 13 | jobs: 14 | lint: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: Set up Python 19 | uses: actions/setup-python@v3 20 | with: 21 | python-version: 3.11 22 | - name: Install dependencies 23 | run: | 24 | pip install tox 25 | - name: Check code quality with flake8 26 | run: tox -e flake8 27 | 28 | test: 29 | runs-on: ubuntu-latest 30 | strategy: 31 | matrix: 32 | python-version: [ "3.12", "3.11", "3.8" ] 33 | 34 | steps: 35 | 36 | #---------------------------------------------- 37 | # check-out repo and set-up python 38 | #---------------------------------------------- 39 | - name: Check out repository 40 | uses: actions/checkout@v3 41 | 42 | - name: Set up Python ${{ matrix.python-version }} 43 | uses: actions/setup-python@v3 44 | with: 45 | python-version: ${{ matrix.python-version }} 46 | 47 | #---------------------------------------------- 48 | # install & configure poetry 49 | #---------------------------------------------- 50 | - name: Install Poetry 51 | uses: snok/install-poetry@v1 52 | with: 53 | version: 1.3.2 54 | virtualenvs-create: true 55 | virtualenvs-in-project: true 56 | 57 | #---------------------------------------------- 58 | # load cached venv if cache exists 59 | #---------------------------------------------- 60 | - name: Load cached venv 61 | id: cached-poetry-dependencies 62 | uses: actions/cache@v3 63 | with: 64 | path: .venv 65 | key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }} 66 | 67 | #---------------------------------------------- 68 | # install dependencies if cache does not exist 69 | #---------------------------------------------- 70 | - name: Install dependencies 71 | if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' 72 | run: poetry install --no-interaction --no-root 73 | 74 | #---------------------------------------------- 75 | # install your root project, if required 76 | #---------------------------------------------- 77 | - name: Install library 78 | run: poetry install --no-interaction 79 | 80 | #---------------------------------------------- 81 | # coverage report 82 | #---------------------------------------------- 83 | - name: Generate coverage results 84 | run: | 85 | poetry run coverage run -m pytest 86 | poetry run coverage xml 87 | poetry run coverage report -m 88 | 89 | #---------------------------------------------- 90 | # upload coverage results 91 | #---------------------------------------------- 92 | - name: Upload coverage report 93 | uses: codecov/codecov-action@v1.0.5 94 | with: 95 | name: codecov-results-${{ matrix.python-version }} 96 | token: ${{ secrets.CODECOV_TOKEN }} 97 | file: ./coverage.xml 98 | fail_ci_if_error: true 99 | -------------------------------------------------------------------------------- /src/prefixmaps/data/go.csv: -------------------------------------------------------------------------------- 1 | context,prefix,namespace,status 2 | go,AspGD_LOCUS,http://identifiers.org/aspgd.locus/,canonical 3 | go,BFO,http://purl.obolibrary.org/obo/BFO_,canonical 4 | go,BTO,http://purl.obolibrary.org/obo/BTO_,canonical 5 | go,CARO,http://purl.obolibrary.org/obo/CARO_,canonical 6 | go,CAS,http://identifiers.org/cas/,canonical 7 | go,CGD,http://identifiers.org/cgd/,canonical 8 | go,CHEBI,http://purl.obolibrary.org/obo/CHEBI_,canonical 9 | go,CL,http://purl.obolibrary.org/obo/CL_,canonical 10 | go,dbSNP,http://identifiers.org/dbsnp/,canonical 11 | go,DDANAT,http://purl.obolibrary.org/obo/DDANAT_,canonical 12 | go,dictyBase,http://identifiers.org/dictybase.gene/,canonical 13 | go,ECO,http://purl.obolibrary.org/obo/ECO_,canonical 14 | go,EMAPA,http://purl.obolibrary.org/obo/EMAPA_,canonical 15 | go,ENSEMBL,http://identifiers.org/ensembl/,canonical 16 | go,FB,http://identifiers.org/flybase/,canonical 17 | go,FBbt,http://purl.obolibrary.org/obo/FBbt_,canonical 18 | go,FBdv,http://purl.obolibrary.org/obo/FBdv_,canonical 19 | go,FMA,http://purl.obolibrary.org/obo/FMA_,canonical 20 | go,FYPO,http://purl.obolibrary.org/obo/FYPO_,canonical 21 | go,GeneDB,http://identifiers.org/genedb/,canonical 22 | go,GO,http://purl.obolibrary.org/obo/GO_,canonical 23 | go,GO_REF,http://purl.obolibrary.org/obo/go/references/,canonical 24 | go,gomodel,http://model.geneontology.org/,canonical 25 | go,GR_GENE,http://identifiers.org/gramene.gene/,canonical 26 | go,GR_PROTEIN,http://identifiers.org/gramene.protein/,canonical 27 | go,GR_QTL,http://identifiers.org/gramene.qtl/,canonical 28 | go,HGNC,http://identifiers.org/hgnc/,canonical 29 | go,IAO,http://purl.obolibrary.org/obo/IAO_,canonical 30 | go,IntAct,http://identifiers.org/intact/,canonical 31 | go,InterPro,http://identifiers.org/interpro/,canonical 32 | go,KEGG_ENZYME,http://identifiers.org/kegg.enzyme/,canonical 33 | go,KEGG_PATHWAY,http://identifiers.org/kegg.pathway/,canonical 34 | go,MA,http://purl.obolibrary.org/obo/MA_,canonical 35 | go,MaizeGDB_Locus,http://identifiers.org/maizegdb.locus/,canonical 36 | go,MetaCyc,http://identifiers.org/metacyc.reaction/,canonical 37 | go,MGI,http://identifiers.org/MGI/,canonical 38 | go,NCBIGene,http://identifiers.org/ncbigene/,canonical 39 | go,NCBITaxon,http://purl.obolibrary.org/obo/NCBITaxon_,canonical 40 | go,PANTHER,http://identifiers.org/panther.family/,canonical 41 | go,PATO,http://purl.obolibrary.org/obo/PATO_,canonical 42 | go,PlasmoDB,http://identifiers.org/plasmodb/,canonical 43 | go,PMID,http://identifiers.org/pubmed/,canonical 44 | go,PO,http://purl.obolibrary.org/obo/PO_,canonical 45 | go,PomBase,http://identifiers.org/pombase/,canonical 46 | go,PR,http://purl.obolibrary.org/obo/PR_,canonical 47 | go,Reactome,http://identifiers.org/reactome/,canonical 48 | go,RGD,http://identifiers.org/rgd/,canonical 49 | go,RO,http://purl.obolibrary.org/obo/RO_,canonical 50 | go,SGD,http://identifiers.org/sgd/,canonical 51 | go,SGN,http://identifiers.org/sgn/,canonical 52 | go,SO,http://purl.obolibrary.org/obo/SO_,canonical 53 | go,TAIR,http://identifiers.org/tair.locus/,canonical 54 | go,TGD,http://identifiers.org/tgd/,canonical 55 | go,TreeGrafter,http://identifiers.org/panther.family/,namespace_alias 56 | go,TriTrypDB,http://identifiers.org/tritrypdb/,canonical 57 | go,UBERON,http://purl.obolibrary.org/obo/UBERON_,canonical 58 | go,UniProtKB,http://identifiers.org/uniprot/,canonical 59 | go,WB,http://identifiers.org/wormbase/,canonical 60 | go,WBls,http://purl.obolibrary.org/obo/WBls_,canonical 61 | go,WBPhenotype,http://purl.obolibrary.org/obo/WBPhenotype_,canonical 62 | go,Xenbase,http://identifiers.org/xenbase/,canonical 63 | go,ZFIN,http://identifiers.org/zfin/,canonical 64 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/ingest_bioregistry.py: -------------------------------------------------------------------------------- 1 | """ETL from bioregistry to prefixmaps.""" 2 | 3 | import logging 4 | 5 | from tqdm import tqdm 6 | 7 | from prefixmaps.datamodel.context import NAMESPACE_RE, Context 8 | 9 | # Problematic records, look into later 10 | SKIP = {"gro"} 11 | 12 | #: Problematic synonym records cause the issue in https://github.com/linkml/prefixmaps/issues/50 13 | PROBLEMATIC_CURIE_PREFIX_SYNONYMS_RECORDS = {"wikidata"} 14 | 15 | 16 | def from_bioregistry_upper(**kwargs) -> Context: 17 | """ 18 | As :ref:`from_bioregistry`, with default uppercase normalization on 19 | 20 | :param kwargs: pass-through to :ref:`from_bioregistry` 21 | :return: 22 | """ 23 | return from_bioregistry(upper=True, **kwargs) 24 | 25 | 26 | def from_bioregistry(upper=False, canonical_idorg=True, filter_dubious=True) -> Context: 27 | """ 28 | Creates a Context from the bioregistry. 29 | 30 | This will transform bioregistry entries into semantic prefix expansions. 31 | 32 | Note: in future some of the logic from this can migrate up to the main 33 | bioregistries repository. For now, we deal with additional corner cases: 34 | 35 | URLs that look like they are not intended to be used as semantic URIs are 36 | filtered by default. This can be disabled with ``filter_dubious=False``. 37 | 38 | This method also has special handling for the identifiers.org registry 39 | (aka "miriam"). This is because a number of triplestores have historically 40 | used URIs of the form "http://identifiers.org/Prefix/LocalId" as the 41 | subject of their triples. While this is bad practice for "born semantic" 42 | IDs such as those in OBO, a lot of the bio-semantic web community have 43 | adopted this practice to provide semantic URIs non-born-semantic databases. 44 | In order to support this use case, we have an option to preserve these 45 | original namespaces. This can be disabled with ``canonical_idorg=False``. 46 | 47 | :param upper: if True, normalize prefix to uppercase 48 | unless a preferred form is stated, or it's in the SemWeb collection 49 | :param canonical_idorg: use the original/canonical identifiers.org PURLs 50 | :param filter_dubious: skip namespaces that do not match 51 | strict namespace regular expression 52 | :return: 53 | """ 54 | import bioregistry 55 | 56 | context = Context("bioregistry", upper=upper) 57 | prefix_priority = [ 58 | # "obofoundry.preferred", 59 | "preferred", 60 | # "obofoundry", 61 | "default", 62 | ] 63 | priority = [ 64 | "obofoundry", 65 | "miriam.legacy" if canonical_idorg else "miriam", 66 | "default", 67 | "ols", 68 | "n2t", 69 | ] 70 | converter = bioregistry.get_converter( 71 | uri_prefix_priority=priority, prefix_priority=prefix_priority 72 | ) 73 | for record in tqdm(converter.records): 74 | # TODO: auto-set preferred to lowercase for SemWeb collection 75 | # See https://github.com/linkml/prefixmaps/issues/70 76 | if record.prefix in SKIP: 77 | continue 78 | if filter_dubious and not NAMESPACE_RE.match(record.uri_prefix): 79 | logging.debug(f"Skipping dubious ns {record.prefix} => {record.uri_prefix}") 80 | continue 81 | preferred = record.prefix == bioregistry.get_preferred_prefix(record.prefix) 82 | context.add_prefix(record.prefix, record.uri_prefix, preferred=preferred) 83 | if record.prefix not in PROBLEMATIC_CURIE_PREFIX_SYNONYMS_RECORDS: 84 | for s in record.prefix_synonyms: 85 | context.add_prefix(s, record.uri_prefix, preferred=preferred) 86 | for s in record.uri_prefix_synonyms: 87 | context.add_prefix(record.prefix, s, preferred=preferred) 88 | return context 89 | -------------------------------------------------------------------------------- /src/prefixmaps/ingest/etl_runner.py: -------------------------------------------------------------------------------- 1 | """ETL logic for retrieving and normalizing upstream contexts.""" 2 | 3 | from pathlib import Path 4 | from typing import Callable, Dict, Mapping, Union 5 | 6 | import click 7 | 8 | from prefixmaps.data import data_path 9 | from prefixmaps.datamodel.context import CONTEXT, Context 10 | from prefixmaps.ingest.ingest_bioportal import from_bioportal_file 11 | from prefixmaps.ingest.ingest_bioregistry import ( 12 | from_bioregistry, 13 | from_bioregistry_upper, 14 | ) 15 | from prefixmaps.ingest.ingest_go import parse_go_xrefs_from_remote 16 | from prefixmaps.ingest.ingest_jsonld import from_prefixcc 17 | from prefixmaps.ingest.ingest_linkml import from_semweb_curated 18 | from prefixmaps.ingest.ingest_shacl import from_obo 19 | from prefixmaps.ingest.ingest_w3id import from_w3id 20 | from prefixmaps.io.writer import context_to_file 21 | 22 | # TODO: replace this with introspection from metadata file 23 | CONTEXTS: Mapping[str, Callable[[], Context]] = { 24 | "obo": from_obo, 25 | "go": parse_go_xrefs_from_remote, 26 | "linked_data": from_semweb_curated, 27 | "bioportal": from_bioportal_file, 28 | "bioregistry.upper": from_bioregistry_upper, 29 | "bioregistry": from_bioregistry, 30 | "prefixcc": from_prefixcc, 31 | "w3id": from_w3id, 32 | } 33 | """Maps the name of a context to the python function that can generate it""" 34 | 35 | COMBINED = { 36 | "merged": ["obo", "go", "linked_data", "bioregistry.upper", "prefixcc"], 37 | "merged.monarch": ["obo", "go", "linked_data", "bioregistry.upper", "prefixcc"], 38 | "merged.oak": ["obo", "go", "linked_data", "bioregistry.upper", "prefixcc"], 39 | } 40 | """Contexts that remix other contexts. Order is significant, with the first listed having highest precedence.""" 41 | 42 | 43 | def load_context_from_source(context: CONTEXT) -> Context: 44 | """ 45 | Loads a context from upstream source. 46 | 47 | The context name should be a handle for either: 48 | 49 | - An atomic context (e.g. obo, linked_data) 50 | - A conbined context (which remixes existing contexts) 51 | 52 | :param context: unique handle of the context 53 | :return: 54 | """ 55 | if context in CONTEXTS: 56 | return CONTEXTS[context]() 57 | elif context in COMBINED: 58 | ctxt = Context(context) 59 | for v in COMBINED[context]: 60 | ctxt.combine(load_context_from_source(v)) 61 | return ctxt 62 | else: 63 | raise ValueError(f"No such context: {context}") 64 | 65 | 66 | def run_etl(output_directory: Union[str, Path]) -> None: 67 | """ 68 | Runs the complete ETL pipeline. 69 | 70 | All contexts are refreshed from upstream sources, and written to the output directory, 71 | as CSV. 72 | 73 | :param output_directory: 74 | :return: 75 | """ 76 | # contexts = load_contexts_meta() 77 | output_directory = Path(output_directory).resolve() 78 | output_directory.mkdir(exist_ok=True, parents=True) 79 | 80 | # Load all individual contexts 81 | contexts: Dict[str, Context] = { 82 | name: context_getter() for name, context_getter in CONTEXTS.items() 83 | } 84 | 85 | # Create merged contexts 86 | for merged_name, names in COMBINED.items(): 87 | context = Context(name=merged_name) 88 | contexts[merged_name] = context 89 | for name in names: 90 | context.combine(contexts[name]) 91 | 92 | # Write all contexts 93 | for name, context in contexts.items(): 94 | with output_directory.joinpath(f"{name}.csv").open("w", encoding="UTF-8") as file: 95 | context_to_file(context, file, include_expansion_source=context.name in COMBINED) 96 | 97 | 98 | @click.command 99 | @click.option( 100 | "-d", 101 | "--output-directory", 102 | default=data_path, 103 | type=Path, 104 | help="Path to directory where CSVs are stored", 105 | ) 106 | def cli(output_directory): 107 | run_etl(output_directory) 108 | 109 | 110 | if __name__ == "__main__": 111 | cli() 112 | -------------------------------------------------------------------------------- /tests/test_core/test_integrity.py: -------------------------------------------------------------------------------- 1 | """This module contains tests for data integrity.""" 2 | 3 | import unittest 4 | from collections import Counter, defaultdict 5 | from typing import Mapping 6 | 7 | from prefixmaps import load_context 8 | from prefixmaps.data import context_paths 9 | from prefixmaps.datamodel.context import Context, StatusType 10 | 11 | 12 | class TestIntegrity(unittest.TestCase): 13 | """A test case that checks data integrity.""" 14 | 15 | def setUp(self) -> None: 16 | """Set up the test case with all contexts.""" 17 | # We don't expect some merged contexts to pass all tests, see: 18 | # See: https://github.com/linkml/prefixmaps/issues/26 19 | skip = {"merged", "merged.oak", "merged.monarch"} 20 | self.contexts: Mapping[str, Context] = { 21 | key: load_context(key) for key, path in context_paths.items() if key not in skip 22 | } 23 | 24 | def test_unique_canonical_prefix(self): 25 | """Test that no contexts have duplicate canonical prefixes.""" 26 | for key, context in self.contexts.items(): 27 | with self.subTest(key=key): 28 | counter = Counter( 29 | expansion.prefix 30 | for expansion in context.prefix_expansions 31 | if expansion.canonical() 32 | ) 33 | duplicates = {prefix for prefix, count in counter.items() if count > 1} 34 | self.assertEqual( 35 | set(), duplicates, msg=f"[{key} multiple canonical records with the same prefix" 36 | ) 37 | 38 | def test_unique_canonical_namespace(self): 39 | """Test that no contexts have duplicate canonical namespaces.""" 40 | for key, context in self.contexts.items(): 41 | with self.subTest(key=key): 42 | dd = defaultdict(list) 43 | for expansion in context.prefix_expansions: 44 | if expansion.canonical(): 45 | dd[expansion.namespace].append(expansion) 46 | duplicates = { 47 | namespace: expansions 48 | for namespace, expansions in dd.items() 49 | if len(expansions) > 1 50 | } 51 | self.assertEqual( 52 | {}, 53 | duplicates, 54 | msg=f"[{key} multiple canonical records with the same namespace", 55 | ) 56 | 57 | def test_prefix_aliases(self): 58 | """Test that namespace aliases have a valid prefix.""" 59 | for key, context in self.contexts.items(): 60 | with self.subTest(key=key): 61 | canonical_prefixes = { 62 | expansion.prefix 63 | for expansion in context.prefix_expansions 64 | if expansion.canonical() 65 | } 66 | # A namespace alias means that the prefix should be the same as a canonical prefix somewhere 67 | missing_canonical_prefixes = { 68 | expansion.prefix: expansion 69 | for expansion in context.prefix_expansions 70 | if expansion.status == StatusType.prefix_alias 71 | and expansion.prefix not in canonical_prefixes 72 | } 73 | self.assertEqual( 74 | {}, 75 | missing_canonical_prefixes, 76 | msg=f"[{key}] prefix aliases were missing corresponding canonical prefixes", 77 | ) 78 | 79 | def test_namespace_aliases(self): 80 | """Test that prefix aliases have a valid namespace.""" 81 | for key, context in self.contexts.items(): 82 | with self.subTest(key=key): 83 | canonical_namespaces = { 84 | expansion.namespace: expansion.prefix 85 | for expansion in context.prefix_expansions 86 | if expansion.canonical() 87 | } 88 | # A prefix alias means that the namespace should appear in a canonical record as well 89 | missing_canonical_namespace = { 90 | expansion.namespace: expansion.prefix 91 | for expansion in context.prefix_expansions 92 | if expansion.status == StatusType.namespace_alias 93 | and expansion.namespace not in canonical_namespaces 94 | } 95 | self.assertEqual( 96 | {}, 97 | missing_canonical_namespace, 98 | msg=f"[{key}] prefix aliases were missing corresponding canonical prefixes", 99 | ) 100 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, caste, color, religion, or sexual 10 | identity and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the overall 26 | community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or advances of 31 | any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email address, 35 | without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | cjm@berkeleybop.org (Christopher J Mungall). 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series of 86 | actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or permanent 93 | ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within the 113 | community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.1, available at 119 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 120 | 121 | Community Impact Guidelines were inspired by 122 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. 123 | 124 | For answers to common questions about this code of conduct, see the FAQ at 125 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at 126 | [https://www.contributor-covenant.org/translations][translations]. 127 | 128 | [homepage]: https://www.contributor-covenant.org 129 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html 130 | [Mozilla CoC]: https://github.com/mozilla/diversity 131 | [FAQ]: https://www.contributor-covenant.org/faq 132 | [translations]: https://www.contributor-covenant.org/translations 133 | -------------------------------------------------------------------------------- /docs/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | A python library for retrieving semantic prefix maps 4 | 5 | A semantic prefix map will map a a prefix (e.g. `skos`) to a namespace (e.g `http://www.w3.org/2004/02/skos/core#`) 6 | 7 | This library is designed to satisfy the following requirements 8 | 9 | - coverage of prefixes from multiple different domains 10 | - no single authoritative source of either prefixes or prefix-namespace mappings (clash-resilient) 11 | - preferred semantic namespace is prioritized over web URLs 12 | - authority preferred prefix is prioritized where possible 13 | - each individual prefixmap is case-insensitive bijective 14 | - prefixmap composition and custom ordering of prefixmaps 15 | - lightweight / low footprint 16 | - fast (TODO) 17 | - network-independence / versioned prefix maps 18 | - optional ability to retrieve latest from external authority on network 19 | 20 | ## Installation 21 | 22 | ``` 23 | pip install prefixmaps 24 | ``` 25 | 26 | ## Usage 27 | 28 | to use in combination with [curies](https://github.com/cthoyt/curies) library: 29 | 30 | ```python 31 | from prefixmaps.io.parser import load_multi_context 32 | from curies import Converter 33 | 34 | context = load_multi_context(["obo", "bioregistry.upper", "linked_data", "prefixcc"]) 35 | extended_prefix_map = context.as_extended_prefix_map() 36 | converter = Converter.from_extended_prefix_map(extended_prefix_map) 37 | 38 | >>> converter.expand("CHEBI:1") 39 | 'http://purl.obolibrary.org/obo/CHEBI_1' 40 | >>> converter.expand("GEO:1") 41 | 'http://purl.obolibrary.org/obo/GEO_1' 42 | >>> converter.expand("owl:Class") 43 | 'http://www.w3.org/2002/07/owl#Class' 44 | >>> converter.expand("FlyBase:FBgn123") 45 | 'http://identifiers.org/fb/FBgn123' 46 | ``` 47 | 48 | ### Alternate orderings / clash resilience 49 | 50 | - prefix.cc uses the prefix `geo` for geosparql `http://www.opengis.net/ont/geosparql#` 51 | - OBO uses prefix `GEO` for the [Geographical Entity Ontology](https://obofoundry.org/ontology/geo), expanding to `http://purl.obolibrary.org/obo/GEO_` 52 | - the Bioregistry uses the prefix [`geo`](https://bioregistry.io/registry/geo) for NCBI GEO, and "re-mints" a [`geogeo`](https://bioregistry.io/registry/geogeo) prefix for the OBO ontology 53 | 54 | If we prioritize prefix.cc the OBO prefix is ignored: 55 | 56 | ```python 57 | >>> ctxt = load_multi_context(["prefixcc", "obo"]) 58 | >>> extended_prefix_map = context.as_extended_prefix_map() 59 | >>> converter = Converter.from_extended_prefix_map(extended_prefix_map) 60 | >>> converter.expand("GEO:1") 61 | >>> converter.expand("geo:1") 62 | 'http://www.opengis.net/ont/geosparql#1' 63 | ``` 64 | 65 | Even though prefix expansion is case sensitive, we intentionally block conflicts that differ only in case. 66 | 67 | If we push bioregistry at the start of the list then GEOGEO can be used as the prefix for the OBO ontology 68 | 69 | ```python 70 | >>> ctxt = load_multi_context(["bioregistry", "prefixcc", "obo"]) 71 | >>> extended_prefix_map = context.as_extended_prefix_map() 72 | >>> converter = Converter.from_extended_prefix_map(extended_prefix_map) 73 | >>> converter.expand("geo:1") 74 | 'http://identifiers.org/geo/1' 75 | >>> converter.expand("GEO:1") 76 | >>> converter.expand("GEOGEO:1") 77 | 'http://purl.obolibrary.org/obo/GEO_1' 78 | ``` 79 | 80 | Note that from the OBO perspective, GEOGEO is non-canonical 81 | 82 | We get similar results using the upper-normalized variant of bioregistry: 83 | 84 | ```python 85 | >>> ctxt = load_multi_context(["bioregistry.upper", "prefixcc", "obo"]) 86 | >>> extended_prefix_map = context.as_extended_prefix_map() 87 | >>> converter = Converter.from_extended_prefix_map(extended_prefix_map) 88 | >>> converter = Converter.from_extended_prefix_map(extended_prefix_map) 89 | >>> converter = Converter.from_extended_prefix_map(extended_prefix_map) 90 | >>> converter.expand("GEO:1") 91 | 'http://identifiers.org/geo/1' 92 | >>> converter.expand("geo:1") 93 | >>> converter.expand("GEOGEO:1") 94 | 'http://purl.obolibrary.org/obo/GEO_1' 95 | ``` 96 | 97 | Users of OBO ontologies will want to place OBO at the start of the list: 98 | 99 | ```python 100 | >>> ctxt = load_multi_context(["obo", "bioregistry.upper", "prefixcc"]) 101 | >>> extended_prefix_map = context.as_extended_prefix_map() 102 | >>> converter = Converter.from_extended_prefix_map(extended_prefix_map) 103 | >>> converter.expand("geo:1") 104 | >>> converter.expand("GEO:1") 105 | 'http://purl.obolibrary.org/obo/GEO_1' 106 | >>> converter.expand("GEOGEO:1") 107 | ``` 108 | 109 | Note under this ordering there is no prefix for NCBI GEO. This is not 110 | a major limitation as there is no canonical semantic rendering of NCBI 111 | GEO. This could be added in future with a unique OBO prefix. 112 | 113 | You can use the ready-made "merged" prefix set, which prioritizes OBO: 114 | 115 | ```python 116 | >>> ctxt = load_context("merged") 117 | >>> extended_prefix_map = context.as_extended_prefix_map() 118 | >>> converter = Converter.from_extended_prefix_map(extended_prefix_map) 119 | >>> converter.expand("GEOGEO:1") 120 | >>> converter.expand("GEO:1") 121 | 'http://purl.obolibrary.org/obo/GEO_1' 122 | >>> converter.expand("geo:1") 123 | ``` 124 | 125 | ### Network independence and requesting latest versions 126 | 127 | By default this will make use of metadata distributed alongside the package. This has certain advantages in terms 128 | of reproducibility, but it means if a new ontology or prefix is added to an upstream source you won't see this. 129 | 130 | To refresh and use the latest upstream: 131 | 132 | ```python 133 | ctxt = load_context("obo", refresh=True) 134 | ``` 135 | 136 | This will perform a fetch from http://obofoundry.org/registry/obo_prefixes.ttl 137 | 138 | ## Context Metadata 139 | 140 | See [contexts.curated.yaml](src/prefixmaps/data/contexts.curated.yaml) 141 | 142 | See the description fields 143 | 144 | ## Code organization 145 | 146 | Data files containing pre-build prefix maps using sources like OBO and Bioregistry are distributed alongside the python 147 | 148 | Location: 149 | 150 | * [src/prefixmaps/data](src/prefixmaps/data/) 151 | 152 | These can be regenerated using: 153 | 154 | ``` 155 | make etl 156 | ``` 157 | 158 | TODO: make a github action that auto-released new versions 159 | 160 | ## Requesting new prefixes 161 | 162 | This repo is NOT a prefix registry. Its job is simply to aggregate 163 | different prefix maps. Request changes upstream. 164 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # prefixmaps 2 | 3 | A Python library for retrieving semantic prefix maps. 4 | 5 | A semantic prefix map will map a a prefix (e.g. `skos`) to a namespace (e.g `http://www.w3.org/2004/02/skos/core#`). 6 | 7 | This repository and the corresponding library is designed to satisfy the following requirements: 8 | 9 | - generation of prefix maps in headers of RDF documents 10 | - use in tools that expand CURIEs and short-form identifiers to URIs that can be used as subjects of RDF triples 11 | - coverage of prefixes from multiple different domains 12 | - no single authoritative source of either prefixes or prefix-namespace mappings (clash-resilient) 13 | - preferred semantic namespace is prioritized over web URLs 14 | - authority preferred prefix is prioritized where possible 15 | - each individual prefix map is case-insensitive bijective 16 | - prefix map composition and custom ordering of prefixmaps 17 | - lightweight / low footprint 18 | - fast (TODO) 19 | - network-independence / versioned prefix maps 20 | - optional ability to retrieve latest from external authority on network 21 | 22 | What this is NOT intended for: 23 | 24 | - a general source of metadata about either prefixes or namespaces 25 | - a mechanism for resolving identifiers to web URLs for humans to find information 26 | 27 | ## Installation 28 | 29 | ```shell 30 | pip install prefixmaps 31 | ``` 32 | 33 | ## Usage 34 | 35 | To use in combination with [curies](https://github.com/cthoyt/curies) library: 36 | 37 | ```python 38 | from prefixmaps import load_converter 39 | from curies import Converter 40 | 41 | converter: Converter = load_converter(["obo", "bioregistry.upper", "linked_data", "prefixcc"]) 42 | 43 | >>> converter.expand("CHEBI:1") 44 | 'http://purl.obolibrary.org/obo/CHEBI_1' 45 | >>> converter.expand("GEO:1") 46 | 'http://purl.obolibrary.org/obo/GEO_1' 47 | >>> converter.expand("owl:Class") 48 | 'http://www.w3.org/2002/07/owl#Class' 49 | >>> converter.expand("FlyBase:FBgn123") 50 | 'http://identifiers.org/fb/FBgn123' 51 | ``` 52 | 53 | ### Alternate orderings / clash resilience 54 | 55 | - prefix.cc uses the prefix `geo` for geosparql `http://www.opengis.net/ont/geosparql#` 56 | - OBO uses prefix `GEO` for the [Geographical Entity Ontology](https://obofoundry.org/ontology/geo), expanding to `http://purl.obolibrary.org/obo/GEO_` 57 | - the Bioregistry uses the prefix [`geo`](https://bioregistry.io/registry/geo) for NCBI GEO, and "re-mints" a [`geogeo`](https://bioregistry.io/registry/geogeo) prefix for the OBO ontology 58 | 59 | If we prioritize prefix.cc the OBO prefix is ignored: 60 | 61 | ```python 62 | converter = load_converter(["prefixcc", "obo"]) 63 | 64 | >>> converter.expand("GEO:1") 65 | >>> converter.expand("geo:1") 66 | 'http://www.opengis.net/ont/geosparql#1' 67 | ``` 68 | 69 | Even though prefix expansion is case-sensitive, we intentionally block conflicts that differ only in case. 70 | 71 | If we push `bioregistry` at the start of the list then GEOGEO can be used as the prefix for the OBO ontology: 72 | 73 | ```python 74 | converter = load_converter(["bioregistry", "prefixcc", "obo"]) 75 | 76 | >>> converter.expand("geo:1") 77 | 'http://identifiers.org/geo/1' 78 | >>> converter.expand("GEO:1") 79 | >>> converter.expand("GEOGEO:1") 80 | 'http://purl.obolibrary.org/obo/GEO_1' 81 | ``` 82 | 83 | Note that from the OBO perspective, GEOGEO is non-canonical. 84 | 85 | We get similar results using the upper-normalized variant of `bioregistry`: 86 | 87 | ```python 88 | converter = load_converter(["bioregistry.upper", "prefixcc", "obo"]) 89 | 90 | >>> converter.expand("GEO:1") 91 | 'http://identifiers.org/geo/1' 92 | >>> converter.expand("geo:1") 93 | >>> converter.expand("GEOGEO:1") 94 | 'http://purl.obolibrary.org/obo/GEO_1' 95 | ``` 96 | 97 | Users of OBO ontologies will want to place OBO at the start of the list: 98 | 99 | ```python 100 | converter = load_converter(["obo", "bioregistry.upper", "prefixcc"]) 101 | 102 | >>> converter.expand("geo:1") 103 | >>> converter.expand("GEO:1") 104 | 'http://purl.obolibrary.org/obo/GEO_1' 105 | >>> converter.expand("GEOGEO:1") 106 | ``` 107 | 108 | Note under this ordering there is no prefix for NCBI GEO. This is not 109 | a major limitation as there is no canonical semantic rendering of NCBI 110 | GEO. This could be added in future with a unique OBO prefix. 111 | 112 | You can use the ready-made "merged" prefix set, which prioritizes OBO: 113 | 114 | ```python 115 | converter = load_converter("merged") 116 | 117 | >>> converter.expand("GEOGEO:1") 118 | >>> converter.expand("GEO:1") 119 | 'http://purl.obolibrary.org/obo/GEO_1' 120 | >>> converter.expand("geo:1") 121 | ``` 122 | 123 | ### Network independence and requesting latest versions 124 | 125 | By default, this will make use of metadata distributed alongside the package. This has certain advantages in terms 126 | of reproducibility, but it means if a new ontology or prefix is added to an upstream source you won't see this. 127 | 128 | To refresh and use the latest upstream: 129 | 130 | ```python 131 | converter = load_converter("obo", refresh=True) 132 | ``` 133 | 134 | This will perform a fetch from http://obofoundry.org/registry/obo_prefixes.ttl 135 | 136 | ## Context Metadata 137 | 138 | See [contexts.curated.yaml](src/prefixmaps/data/contexts.curated.yaml) 139 | 140 | See the description fields 141 | 142 | ## Repository organization 143 | 144 | Data files containing pre-build prefix maps using sources like OBO and Bioregistry are distributed alongside the python 145 | 146 | Location: 147 | 148 | * [src/prefixmaps/data](src/prefixmaps/data/) 149 | 150 | ### CSV field descriptions 151 | 152 | 1. context: a unique handle for this context. This MUST be the same as the basename of the file 153 | 2. prefix: corresponds to http://www.w3.org/ns/shacl#prefix 154 | 3. namespace: corresponds to http://www.w3.org/ns/shacl#namespace 155 | 4. canonical: true if this satisfies bijectivity 156 | 157 | 158 | ### Refreshing the Data 159 | 160 | The data can be refreshed in several ways: 161 | 162 | 1. Locally, you can use `tox` with: 163 | 164 | ```shell 165 | pip install tox tox-poetry 166 | tox -e refresh 167 | ``` 168 | 2. Manually running and automatically committing via [this GitHub Actions workflow](https://github.com/linkml/prefixmaps/blob/main/.github/workflows/refresh.yaml). 169 | 3. Running makefile (warning, this requires some pre-configuration 170 | 171 | ```shell 172 | make etl 173 | ``` 174 | 175 | TODO: make a github action that auto-releases new versions 176 | 177 | Note that PRs should *not* be made against the individual CSV files. These are generated from upstream sources. 178 | 179 | We temporarily house a small number of curated prefixmaps such as [linked_data.yaml](https://github.com/linkml/prefixmaps/blob/main/src/prefixmaps/data/linked_data.curated.yaml), with the CSV generated from the YAML. 180 | 181 | Our goal is to ultimately cede these to upstream sources. 182 | 183 | 184 | 185 | ## Requesting new prefixes 186 | 187 | This repo is NOT a prefix registry. Its job is simply to aggregate 188 | different prefix maps. Request changes upstream. 189 | -------------------------------------------------------------------------------- /tests/test_core/test_prefixmaps.py: -------------------------------------------------------------------------------- 1 | """Tests core expansion logic and data. 2 | This serves as "checksums" on the underlying ingested data. 3 | """ 4 | 5 | import unittest 6 | 7 | import prefixmaps 8 | from prefixmaps.datamodel.context import StatusType 9 | from prefixmaps.io.parser import context_from_file, load_context, load_multi_context 10 | from prefixmaps.io.writer import context_to_file 11 | from tests import OUTPUT_DIR 12 | 13 | EXPECTED_OBO = [ 14 | # GEO conflicts in other contexts 15 | ("GEO", "http://purl.obolibrary.org/obo/GEO_"), 16 | ("CL", "http://purl.obolibrary.org/obo/CL_"), 17 | ("UBERON", "http://purl.obolibrary.org/obo/UBERON_"), 18 | ("GO", "http://purl.obolibrary.org/obo/GO_"), 19 | ("RO", "http://purl.obolibrary.org/obo/RO_"), 20 | ("IAO", "http://purl.obolibrary.org/obo/IAO_"), 21 | # test preferred mixed case is preserved 22 | ("WBPhenotype", "http://purl.obolibrary.org/obo/WBPhenotype_"), 23 | ] 24 | """Expected OBO prefixes, including those that conflict with other sources.""" 25 | 26 | EXPECTED_LINKED_DATA = [ 27 | ("owl", "http://www.w3.org/2002/07/owl#"), 28 | ("skos", "http://www.w3.org/2004/02/skos/core#"), 29 | ("dcterms", "http://purl.org/dc/terms/"), 30 | ] 31 | """Expected LinkedData namespaces. These are highly stable and it is vital that this library gives 32 | correct results since these are frequently used in application logic""" 33 | 34 | EXPECTED_PREFIX_CC = [ 35 | ("owl", "http://www.w3.org/2002/07/owl#"), 36 | ("foaf", "http://xmlns.com/foaf/0.1/"), 37 | ("skos", "http://www.w3.org/2004/02/skos/core#"), 38 | # ("dcterms", "http://purl.org/dc/terms/"), 39 | ] 40 | """Expected LinkedData namespaces. These are highly stable and it is vital that this library gives 41 | correct results since these are frequently used in application logic""" 42 | 43 | EXPECTED_OTHER = [ 44 | ("biopax", "http://www.biopax.org/release/biopax-level3.owl#"), 45 | ("wd", "http://www.wikidata.org/entity/"), 46 | ] 47 | 48 | 49 | class TextPrefixMaps(unittest.TestCase): 50 | """Tests the core canonical PrefixExpansions logic of prefixmaps""" 51 | 52 | def setUp(self) -> None: 53 | self.obo_context = load_context("obo") 54 | self.prefixcc_context = load_context("prefixcc") 55 | self.bioregistry_context = load_context("bioregistry") 56 | self.merged_context = load_context("merged") 57 | self.linked_data_context = load_context("linked_data") 58 | self.dyn_merged_context = load_multi_context( 59 | ["obo", "go", "linked_data", "bioregistry.upper", "prefixcc"] 60 | ) 61 | 62 | def test_obo_expansions(self): 63 | """Tests OBO prefix expansions""" 64 | ctxt = self.obo_context 65 | pm = ctxt.as_dict() 66 | # test prefix->ns 67 | for pfx, exp in EXPECTED_OBO: 68 | self.assertEqual(pm[pfx], exp) 69 | pmi = ctxt.as_inverted_dict() 70 | # test ns->prefix 71 | for pfx, exp in EXPECTED_OBO: 72 | self.assertEqual(pmi[exp], pfx) 73 | 74 | def test_linked_data_expansions(self): 75 | """Tests LinkedData prefix expansions""" 76 | ctxt = self.linked_data_context 77 | pm = ctxt.as_dict() 78 | pmi = ctxt.as_inverted_dict() 79 | for pfx, exp in EXPECTED_LINKED_DATA: 80 | self.assertEqual(pm[pfx], exp) 81 | self.assertEqual(pmi[exp], pfx) 82 | 83 | def test_load_and_roundtrip(self): 84 | """ 85 | Tests basic I/O 86 | """ 87 | ctxt = self.obo_context 88 | pm = ctxt.as_dict() 89 | outpath = OUTPUT_DIR / "tmp.csv" 90 | OUTPUT_DIR.mkdir(parents=True, exist_ok=True) 91 | with open(str(outpath), "w", encoding="UTF-8") as outfile: 92 | context_to_file(ctxt, outfile) 93 | with open(str(outpath)) as roundtrip_file: 94 | ctxt2 = context_from_file("obo2", roundtrip_file) 95 | # self.assertEqual(ctxt, ctxt2) 96 | pm = ctxt2.as_dict() 97 | for pfx, exp in EXPECTED_OBO: 98 | self.assertEqual(pm[pfx], exp) 99 | pmi = ctxt2.as_inverted_dict() 100 | for pfx, exp in EXPECTED_OBO: 101 | self.assertEqual(pmi[exp], pfx) 102 | 103 | def test_combine(self): 104 | """ 105 | tests composition between prefix maps 106 | 107 | - ensure priority order 108 | - ensure either prefix or namespace duplicates are not marked canonical 109 | """ 110 | ctxt = self.obo_context 111 | pm = ctxt.as_dict() 112 | for pfx, exp in EXPECTED_OBO: 113 | self.assertEqual(pm[pfx], exp) 114 | # test adding a lowercase alias, case-insensitive 115 | ctxt.add_prefix("go", "http://example.org/go/") 116 | [pe] = ctxt.filter(prefix="go") 117 | # check ordering is preserved 118 | self.assertEqual(pe, ctxt.prefix_expansions[-1]) 119 | self.assertEqual(pe.status, StatusType.prefix_alias) 120 | # test namespace alias 121 | ctxt.add_prefix("xyzxyz", "http://purl.obolibrary.org/obo/WBPhenotype_") 122 | [pe] = ctxt.filter(prefix="xyzxyz") 123 | self.assertEqual(pe.status, StatusType.namespace_alias) 124 | # test namespace alias, case-insensitive 125 | ctxt.add_prefix("notcl", "http://purl.obolibrary.org/obo/cl_") 126 | [pe] = ctxt.filter(prefix="notcl") 127 | self.assertEqual(pe.status, StatusType.namespace_alias) 128 | self.assertFalse(pe.canonical()) 129 | # test the GEOGEO case 130 | ctxt.add_prefix("GEOGEO", "http://purl.obolibrary.org/obo/GEO_") 131 | [pe] = ctxt.filter(prefix="GEOGEO") 132 | self.assertEqual(pe.status, StatusType.namespace_alias) 133 | self.assertEqual(pe.namespace, "http://purl.obolibrary.org/obo/GEO_") 134 | self.assertFalse(pe.canonical()) 135 | # test adding canonical 136 | ctxt.add_prefix("x", "http://example.org/x/") 137 | [pe] = ctxt.filter(prefix="x") 138 | self.assertEqual(pe.status, StatusType.canonical) 139 | self.assertTrue(pe.canonical()) 140 | # test multi-alias 141 | # ctxt.add_prefix("CL", "http://purl.obolibrary.org/obo/UBERON_") 142 | # pe = ctxt.prefix_expansions[-1] 143 | # self.assertEqual(pe.status, StatusType.multi_alias) 144 | # self.assertFalse(pe.canonical()) 145 | # test all as expected 146 | pm = ctxt.as_dict() 147 | for pfx, exp in EXPECTED_OBO: 148 | self.assertEqual(pm[pfx], exp) 149 | 150 | def test_merged(self): 151 | ctxt = self.merged_context 152 | pm = ctxt.as_dict() 153 | pmi = ctxt.as_inverted_dict() 154 | for pfx, exp in EXPECTED_OBO + EXPECTED_PREFIX_CC + EXPECTED_OTHER: 155 | self.assertEqual(pm[pfx], exp) 156 | self.assertEqual(pmi[exp], pfx) 157 | issues = ctxt.validate() 158 | for issue in issues: 159 | print(issue) 160 | 161 | def test_dyn_merged(self): 162 | ctxt = self.dyn_merged_context 163 | pm = ctxt.as_dict() 164 | pmi = ctxt.as_inverted_dict() 165 | for pfx, exp in EXPECTED_OBO + EXPECTED_PREFIX_CC + EXPECTED_OTHER: 166 | self.assertEqual(pm[pfx], exp) 167 | self.assertEqual(pmi[exp], pfx) 168 | 169 | def test_prefixcc(self): 170 | ctxt = self.prefixcc_context 171 | pm = ctxt.as_dict() 172 | pmi = ctxt.as_inverted_dict() 173 | for pfx, exp in EXPECTED_PREFIX_CC: 174 | self.assertEqual(pm[pfx], exp) 175 | self.assertEqual(pmi[exp], pfx) 176 | 177 | def test_from_upstream(self): 178 | ctxt = load_context("obo", refresh=True) 179 | pm = ctxt.as_dict() 180 | pmi = ctxt.as_inverted_dict() 181 | for pfx, exp in EXPECTED_OBO: 182 | self.assertEqual(pm[pfx], exp) 183 | self.assertEqual(pmi[exp], pfx) 184 | 185 | def test_synonyms(self): 186 | # prefixmaps prioritizes GO prefix resolution over bioregistry in terms of adding canonical tags. 187 | canonical = "PMID:1234" 188 | converter = prefixmaps.load_converter("merged") 189 | # TODO "pmid:1234", "pubmed:1234" 190 | others = ["PMID:1234", "MEDLINE:1234", canonical] 191 | for curie in others: 192 | with self.subTest(curie=curie): 193 | self.assertEqual(canonical, converter.standardize_curie(curie)) 194 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [2022] [Christopher J. Mungall] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /src/prefixmaps/data/obo.csv: -------------------------------------------------------------------------------- 1 | context,prefix,namespace,status 2 | obo,AAO,http://purl.obolibrary.org/obo/AAO_,canonical 3 | obo,ADO,http://purl.obolibrary.org/obo/ADO_,canonical 4 | obo,ADW,http://purl.obolibrary.org/obo/ADW_,canonical 5 | obo,AEO,http://purl.obolibrary.org/obo/AEO_,canonical 6 | obo,AERO,http://purl.obolibrary.org/obo/AERO_,canonical 7 | obo,AfPO,http://purl.obolibrary.org/obo/AfPO_,canonical 8 | obo,AGRO,http://purl.obolibrary.org/obo/AGRO_,canonical 9 | obo,AISM,http://purl.obolibrary.org/obo/AISM_,canonical 10 | obo,AMPHX,http://purl.obolibrary.org/obo/AMPHX_,canonical 11 | obo,APO,http://purl.obolibrary.org/obo/APO_,canonical 12 | obo,APOLLO_SV,http://purl.obolibrary.org/obo/APOLLO_SV_,canonical 13 | obo,ARO,http://purl.obolibrary.org/obo/ARO_,canonical 14 | obo,ATO,http://purl.obolibrary.org/obo/ATO_,canonical 15 | obo,BCGO,http://purl.obolibrary.org/obo/BCGO_,canonical 16 | obo,BCO,http://purl.obolibrary.org/obo/BCO_,canonical 17 | obo,BFO,http://purl.obolibrary.org/obo/BFO_,canonical 18 | obo,BILA,http://purl.obolibrary.org/obo/BILA_,canonical 19 | obo,BMONT,http://purl.obolibrary.org/obo/BMONT_,canonical 20 | obo,BOOTSTREP,http://purl.obolibrary.org/obo/BOOTSTREP_,canonical 21 | obo,BSPO,http://purl.obolibrary.org/obo/BSPO_,canonical 22 | obo,BTO,http://purl.obolibrary.org/obo/BTO_,canonical 23 | obo,CARO,http://purl.obolibrary.org/obo/CARO_,canonical 24 | obo,CDAO,http://purl.obolibrary.org/obo/CDAO_,canonical 25 | obo,CDNO,http://purl.obolibrary.org/obo/CDNO_,canonical 26 | obo,CEPH,http://purl.obolibrary.org/obo/CEPH_,canonical 27 | obo,CHEBI,http://purl.obolibrary.org/obo/CHEBI_,canonical 28 | obo,CHEMINF,http://purl.obolibrary.org/obo/CHEMINF_,canonical 29 | obo,CHIRO,http://purl.obolibrary.org/obo/CHIRO_,canonical 30 | obo,CHMO,http://purl.obolibrary.org/obo/CHMO_,canonical 31 | obo,CIDO,http://purl.obolibrary.org/obo/CIDO_,canonical 32 | obo,CIO,http://purl.obolibrary.org/obo/CIO_,canonical 33 | obo,CL,http://purl.obolibrary.org/obo/CL_,canonical 34 | obo,CLAO,http://purl.obolibrary.org/obo/CLAO_,canonical 35 | obo,CLO,http://purl.obolibrary.org/obo/CLO_,canonical 36 | obo,CLYH,http://purl.obolibrary.org/obo/CLYH_,canonical 37 | obo,CMF,http://purl.obolibrary.org/obo/CMF_,canonical 38 | obo,CMO,http://purl.obolibrary.org/obo/CMO_,canonical 39 | obo,COB,http://purl.obolibrary.org/obo/COB_,canonical 40 | obo,COLAO,http://purl.obolibrary.org/obo/COLAO_,canonical 41 | obo,CRO,http://purl.obolibrary.org/obo/CRO_,canonical 42 | obo,CTENO,http://purl.obolibrary.org/obo/CTENO_,canonical 43 | obo,CTO,http://purl.obolibrary.org/obo/CTO_,canonical 44 | obo,CVDO,http://purl.obolibrary.org/obo/CVDO_,canonical 45 | obo,DC_CL,http://purl.obolibrary.org/obo/DC_CL_,canonical 46 | obo,DDANAT,http://purl.obolibrary.org/obo/DDANAT_,canonical 47 | obo,DDPHENO,http://purl.obolibrary.org/obo/DDPHENO_,canonical 48 | obo,DIDEO,http://purl.obolibrary.org/obo/DIDEO_,canonical 49 | obo,DINTO,http://purl.obolibrary.org/obo/DINTO_,canonical 50 | obo,DISDRIV,http://purl.obolibrary.org/obo/DISDRIV_,canonical 51 | obo,DOID,http://purl.obolibrary.org/obo/DOID_,canonical 52 | obo,DRON,http://purl.obolibrary.org/obo/DRON_,canonical 53 | obo,DUO,http://purl.obolibrary.org/obo/DUO_,canonical 54 | obo,ECAO,http://purl.obolibrary.org/obo/ECAO_,canonical 55 | obo,ECO,http://purl.obolibrary.org/obo/ECO_,canonical 56 | obo,ECOCORE,http://purl.obolibrary.org/obo/ECOCORE_,canonical 57 | obo,ECTO,http://purl.obolibrary.org/obo/ECTO_,canonical 58 | obo,EHDA,http://purl.obolibrary.org/obo/EHDA_,canonical 59 | obo,EHDAA,http://purl.obolibrary.org/obo/EHDAA_,canonical 60 | obo,EHDAA2,http://purl.obolibrary.org/obo/EHDAA2_,canonical 61 | obo,EMAP,http://purl.obolibrary.org/obo/EMAP_,canonical 62 | obo,EMAPA,http://purl.obolibrary.org/obo/EMAPA_,canonical 63 | obo,ENVO,http://purl.obolibrary.org/obo/ENVO_,canonical 64 | obo,EO,http://purl.obolibrary.org/obo/EO_,canonical 65 | obo,EPIO,http://purl.obolibrary.org/obo/EPIO_,canonical 66 | obo,EPO,http://purl.obolibrary.org/obo/EPO_,canonical 67 | obo,ERO,http://purl.obolibrary.org/obo/ERO_,canonical 68 | obo,EUPATH,http://purl.obolibrary.org/obo/EUPATH_,canonical 69 | obo,EV,http://purl.obolibrary.org/obo/EV_,canonical 70 | obo,EXMO,http://purl.obolibrary.org/obo/EXMO_,canonical 71 | obo,ExO,http://purl.obolibrary.org/obo/ExO_,canonical 72 | obo,FAO,http://purl.obolibrary.org/obo/FAO_,canonical 73 | obo,FBbi,http://purl.obolibrary.org/obo/FBbi_,canonical 74 | obo,FBbt,http://purl.obolibrary.org/obo/FBbt_,canonical 75 | obo,FBcv,http://purl.obolibrary.org/obo/FBcv_,canonical 76 | obo,FBdv,http://purl.obolibrary.org/obo/FBdv_,canonical 77 | obo,FBSP,http://purl.obolibrary.org/obo/FBSP_,canonical 78 | obo,FIDEO,http://purl.obolibrary.org/obo/FIDEO_,canonical 79 | obo,FIX,http://purl.obolibrary.org/obo/FIX_,canonical 80 | obo,FLOPO,http://purl.obolibrary.org/obo/FLOPO_,canonical 81 | obo,FLU,http://purl.obolibrary.org/obo/FLU_,canonical 82 | obo,FMA,http://purl.obolibrary.org/obo/FMA_,canonical 83 | obo,FOBI,http://purl.obolibrary.org/obo/FOBI_,canonical 84 | obo,FOODON,http://purl.obolibrary.org/obo/FOODON_,canonical 85 | obo,FOVT,http://purl.obolibrary.org/obo/FOVT_,canonical 86 | obo,FYPO,http://purl.obolibrary.org/obo/FYPO_,canonical 87 | obo,GALLONT,http://purl.obolibrary.org/obo/GALLONT_,canonical 88 | obo,GAZ,http://purl.obolibrary.org/obo/GAZ_,canonical 89 | obo,GECKO,http://purl.obolibrary.org/obo/GECKO_,canonical 90 | obo,GENEPIO,http://purl.obolibrary.org/obo/GENEPIO_,canonical 91 | obo,GENO,http://purl.obolibrary.org/obo/GENO_,canonical 92 | obo,GEO,http://purl.obolibrary.org/obo/GEO_,canonical 93 | obo,GNO,http://purl.obolibrary.org/obo/GNO_,canonical 94 | obo,GO,http://purl.obolibrary.org/obo/GO_,canonical 95 | obo,GRO,http://purl.obolibrary.org/obo/GRO_,canonical 96 | obo,GSSO,http://purl.obolibrary.org/obo/GSSO_,canonical 97 | obo,HABRONATTUS,http://purl.obolibrary.org/obo/HABRONATTUS_,canonical 98 | obo,HANCESTRO,http://purl.obolibrary.org/obo/HANCESTRO_,canonical 99 | obo,HAO,http://purl.obolibrary.org/obo/HAO_,canonical 100 | obo,HOM,http://purl.obolibrary.org/obo/HOM_,canonical 101 | obo,HP,http://purl.obolibrary.org/obo/HP_,canonical 102 | obo,HsapDv,http://purl.obolibrary.org/obo/HsapDv_,canonical 103 | obo,HSO,http://purl.obolibrary.org/obo/HSO_,canonical 104 | obo,HTN,http://purl.obolibrary.org/obo/HTN_,canonical 105 | obo,IAO,http://purl.obolibrary.org/obo/IAO_,canonical 106 | obo,ICEO,http://purl.obolibrary.org/obo/ICEO_,canonical 107 | obo,ICO,http://purl.obolibrary.org/obo/ICO_,canonical 108 | obo,IDO,http://purl.obolibrary.org/obo/IDO_,canonical 109 | obo,IDOMAL,http://purl.obolibrary.org/obo/IDOMAL_,canonical 110 | obo,IEV,http://purl.obolibrary.org/obo/IEV_,canonical 111 | obo,IMR,http://purl.obolibrary.org/obo/IMR_,canonical 112 | obo,INO,http://purl.obolibrary.org/obo/INO_,canonical 113 | obo,IPR,http://purl.obolibrary.org/obo/IPR_,canonical 114 | obo,KISAO,http://purl.obolibrary.org/obo/KISAO_,canonical 115 | obo,LABO,http://purl.obolibrary.org/obo/LABO_,canonical 116 | obo,LEPAO,http://purl.obolibrary.org/obo/LEPAO_,canonical 117 | obo,LIPRO,http://purl.obolibrary.org/obo/LIPRO_,canonical 118 | obo,LOGGERHEAD,http://purl.obolibrary.org/obo/LOGGERHEAD_,canonical 119 | obo,MA,http://purl.obolibrary.org/obo/MA_,canonical 120 | obo,MAMO,http://purl.obolibrary.org/obo/MAMO_,canonical 121 | obo,MAO,http://purl.obolibrary.org/obo/MAO_,canonical 122 | obo,MAT,http://purl.obolibrary.org/obo/MAT_,canonical 123 | obo,MAXO,http://purl.obolibrary.org/obo/MAXO_,canonical 124 | obo,MCO,http://purl.obolibrary.org/obo/MCO_,canonical 125 | obo,MCRO,http://purl.obolibrary.org/obo/MCRO_,canonical 126 | obo,MF,http://purl.obolibrary.org/obo/MF_,canonical 127 | obo,MFMO,http://purl.obolibrary.org/obo/MFMO_,canonical 128 | obo,MFO,http://purl.obolibrary.org/obo/MFO_,canonical 129 | obo,MFOEM,http://purl.obolibrary.org/obo/MFOEM_,canonical 130 | obo,MFOMD,http://purl.obolibrary.org/obo/MFOMD_,canonical 131 | obo,MI,http://purl.obolibrary.org/obo/MI_,canonical 132 | obo,MIAPA,http://purl.obolibrary.org/obo/MIAPA_,canonical 133 | obo,MICRO,http://purl.obolibrary.org/obo/MICRO_,canonical 134 | obo,MIRNAO,http://purl.obolibrary.org/obo/MIRNAO_,canonical 135 | obo,MIRO,http://purl.obolibrary.org/obo/MIRO_,canonical 136 | obo,MMO,http://purl.obolibrary.org/obo/MMO_,canonical 137 | obo,MmusDv,http://purl.obolibrary.org/obo/MmusDv_,canonical 138 | obo,MO,http://purl.obolibrary.org/obo/MO_,canonical 139 | obo,MOD,http://purl.obolibrary.org/obo/MOD_,canonical 140 | obo,MONDO,http://purl.obolibrary.org/obo/MONDO_,canonical 141 | obo,MOP,http://purl.obolibrary.org/obo/MOP_,canonical 142 | obo,MP,http://purl.obolibrary.org/obo/MP_,canonical 143 | obo,MPATH,http://purl.obolibrary.org/obo/MPATH_,canonical 144 | obo,MPIO,http://purl.obolibrary.org/obo/MPIO_,canonical 145 | obo,MRO,http://purl.obolibrary.org/obo/MRO_,canonical 146 | obo,MS,http://purl.obolibrary.org/obo/MS_,canonical 147 | obo,NBO,http://purl.obolibrary.org/obo/NBO_,canonical 148 | obo,NCBITaxon,http://purl.obolibrary.org/obo/NCBITaxon_,canonical 149 | obo,NCIT,http://purl.obolibrary.org/obo/NCIT_,canonical 150 | obo,NCRO,http://purl.obolibrary.org/obo/NCRO_,canonical 151 | obo,NGBO,http://purl.obolibrary.org/obo/NGBO_,canonical 152 | obo,NIF_CELL,http://purl.obolibrary.org/obo/NIF_CELL_,canonical 153 | obo,NIF_DYSFUNCTION,http://purl.obolibrary.org/obo/NIF_DYSFUNCTION_,canonical 154 | obo,NIF_GROSSANATOMY,http://purl.obolibrary.org/obo/NIF_GROSSANATOMY_,canonical 155 | obo,NMR,http://purl.obolibrary.org/obo/NMR_,canonical 156 | obo,NOMEN,http://purl.obolibrary.org/obo/NOMEN_,canonical 157 | obo,OAE,http://purl.obolibrary.org/obo/OAE_,canonical 158 | obo,OARCS,http://purl.obolibrary.org/obo/OARCS_,canonical 159 | obo,OBA,http://purl.obolibrary.org/obo/OBA_,canonical 160 | obo,OBCS,http://purl.obolibrary.org/obo/OBCS_,canonical 161 | obo,OBI,http://purl.obolibrary.org/obo/OBI_,canonical 162 | obo,OBIB,http://purl.obolibrary.org/obo/OBIB_,canonical 163 | obo,OBO_REL,http://purl.obolibrary.org/obo/OBO_REL_,canonical 164 | obo,OCCO,http://purl.obolibrary.org/obo/OCCO_,canonical 165 | obo,OGG,http://purl.obolibrary.org/obo/OGG_,canonical 166 | obo,OGI,http://purl.obolibrary.org/obo/OGI_,canonical 167 | obo,OGMS,http://purl.obolibrary.org/obo/OGMS_,canonical 168 | obo,OGSF,http://purl.obolibrary.org/obo/OGSF_,canonical 169 | obo,OHD,http://purl.obolibrary.org/obo/OHD_,canonical 170 | obo,OHMI,http://purl.obolibrary.org/obo/OHMI_,canonical 171 | obo,OHPI,http://purl.obolibrary.org/obo/OHPI_,canonical 172 | obo,OlatDv,http://purl.obolibrary.org/obo/OlatDv_,canonical 173 | obo,OMIABIS,http://purl.obolibrary.org/obo/OMIABIS_,canonical 174 | obo,OMIT,http://purl.obolibrary.org/obo/OMIT_,canonical 175 | obo,OMO,http://purl.obolibrary.org/obo/OMO_,canonical 176 | obo,OMP,http://purl.obolibrary.org/obo/OMP_,canonical 177 | obo,OMRSE,http://purl.obolibrary.org/obo/OMRSE_,canonical 178 | obo,ONE,http://purl.obolibrary.org/obo/ONE_,canonical 179 | obo,ONS,http://purl.obolibrary.org/obo/ONS_,canonical 180 | obo,ONTOAVIDA,http://purl.obolibrary.org/obo/ONTOAVIDA_,canonical 181 | obo,ONTONEO,http://purl.obolibrary.org/obo/ONTONEO_,canonical 182 | obo,OOSTT,http://purl.obolibrary.org/obo/OOSTT_,canonical 183 | obo,OPL,http://purl.obolibrary.org/obo/OPL_,canonical 184 | obo,OPMI,http://purl.obolibrary.org/obo/OPMI_,canonical 185 | obo,ORNASEQ,http://purl.obolibrary.org/obo/ORNASEQ_,canonical 186 | obo,OVAE,http://purl.obolibrary.org/obo/OVAE_,canonical 187 | obo,PAO,http://purl.obolibrary.org/obo/PAO_,canonical 188 | obo,PATO,http://purl.obolibrary.org/obo/PATO_,canonical 189 | obo,PCL,http://purl.obolibrary.org/obo/PCL_,canonical 190 | obo,PCO,http://purl.obolibrary.org/obo/PCO_,canonical 191 | obo,PD_ST,http://purl.obolibrary.org/obo/PD_ST_,canonical 192 | obo,PDRO,http://purl.obolibrary.org/obo/PDRO_,canonical 193 | obo,PdumDv,http://purl.obolibrary.org/obo/PdumDv_,canonical 194 | obo,PECO,http://purl.obolibrary.org/obo/PECO_,canonical 195 | obo,PGDSO,http://purl.obolibrary.org/obo/PGDSO_,canonical 196 | obo,PHIPO,http://purl.obolibrary.org/obo/PHIPO_,canonical 197 | obo,PLANA,http://purl.obolibrary.org/obo/PLANA_,canonical 198 | obo,PLANP,http://purl.obolibrary.org/obo/PLANP_,canonical 199 | obo,PLO,http://purl.obolibrary.org/obo/PLO_,canonical 200 | obo,PO,http://purl.obolibrary.org/obo/PO_,canonical 201 | obo,PORO,http://purl.obolibrary.org/obo/PORO_,canonical 202 | obo,PPO,http://purl.obolibrary.org/obo/PPO_,canonical 203 | obo,PR,http://purl.obolibrary.org/obo/PR_,canonical 204 | obo,PROCO,http://purl.obolibrary.org/obo/PROCO_,canonical 205 | obo,PROPREO,http://purl.obolibrary.org/obo/PROPREO_,canonical 206 | obo,PSDO,http://purl.obolibrary.org/obo/PSDO_,canonical 207 | obo,PSO,http://purl.obolibrary.org/obo/PSO_,canonical 208 | obo,PW,http://purl.obolibrary.org/obo/PW_,canonical 209 | obo,RBO,http://purl.obolibrary.org/obo/RBO_,canonical 210 | obo,RESID,http://purl.obolibrary.org/obo/RESID_,canonical 211 | obo,REX,http://purl.obolibrary.org/obo/REX_,canonical 212 | obo,RNAO,http://purl.obolibrary.org/obo/RNAO_,canonical 213 | obo,RO,http://purl.obolibrary.org/obo/RO_,canonical 214 | obo,RS,http://purl.obolibrary.org/obo/RS_,canonical 215 | obo,RXNO,http://purl.obolibrary.org/obo/RXNO_,canonical 216 | obo,SAO,http://purl.obolibrary.org/obo/SAO_,canonical 217 | obo,SBO,http://purl.obolibrary.org/obo/SBO_,canonical 218 | obo,SCDO,http://purl.obolibrary.org/obo/SCDO_,canonical 219 | obo,SEP,http://purl.obolibrary.org/obo/SEP_,canonical 220 | obo,SEPIO,http://purl.obolibrary.org/obo/SEPIO_,canonical 221 | obo,SIBO,http://purl.obolibrary.org/obo/SIBO_,canonical 222 | obo,SLSO,http://purl.obolibrary.org/obo/SLSO_,canonical 223 | obo,SO,http://purl.obolibrary.org/obo/SO_,canonical 224 | obo,SOPHARM,http://purl.obolibrary.org/obo/SOPHARM_,canonical 225 | obo,SPD,http://purl.obolibrary.org/obo/SPD_,canonical 226 | obo,STATO,http://purl.obolibrary.org/obo/STATO_,canonical 227 | obo,SWO,http://purl.obolibrary.org/obo/SWO_,canonical 228 | obo,SYMP,http://purl.obolibrary.org/obo/SYMP_,canonical 229 | obo,T4FS,http://purl.obolibrary.org/obo/T4FS_,canonical 230 | obo,TADS,http://purl.obolibrary.org/obo/TADS_,canonical 231 | obo,TAHE,http://purl.obolibrary.org/obo/TAHE_,canonical 232 | obo,TAHH,http://purl.obolibrary.org/obo/TAHH_,canonical 233 | obo,TAO,http://purl.obolibrary.org/obo/TAO_,canonical 234 | obo,TAXRANK,http://purl.obolibrary.org/obo/TAXRANK_,canonical 235 | obo,TGMA,http://purl.obolibrary.org/obo/TGMA_,canonical 236 | obo,TO,http://purl.obolibrary.org/obo/TO_,canonical 237 | obo,TRANS,http://purl.obolibrary.org/obo/TRANS_,canonical 238 | obo,TTO,http://purl.obolibrary.org/obo/TTO_,canonical 239 | obo,TXPO,http://purl.obolibrary.org/obo/TXPO_,canonical 240 | obo,UBERON,http://purl.obolibrary.org/obo/UBERON_,canonical 241 | obo,UO,http://purl.obolibrary.org/obo/UO_,canonical 242 | obo,UPA,http://purl.obolibrary.org/obo/UPA_,canonical 243 | obo,UPHENO,http://purl.obolibrary.org/obo/UPHENO_,canonical 244 | obo,VariO,http://purl.obolibrary.org/obo/VariO_,canonical 245 | obo,VBO,http://purl.obolibrary.org/obo/VBO_,canonical 246 | obo,VHOG,http://purl.obolibrary.org/obo/VHOG_,canonical 247 | obo,VO,http://purl.obolibrary.org/obo/VO_,canonical 248 | obo,VSAO,http://purl.obolibrary.org/obo/VSAO_,canonical 249 | obo,VT,http://purl.obolibrary.org/obo/VT_,canonical 250 | obo,VTO,http://purl.obolibrary.org/obo/VTO_,canonical 251 | obo,WBbt,http://purl.obolibrary.org/obo/WBbt_,canonical 252 | obo,WBls,http://purl.obolibrary.org/obo/WBls_,canonical 253 | obo,WBPhenotype,http://purl.obolibrary.org/obo/WBPhenotype_,canonical 254 | obo,XAO,http://purl.obolibrary.org/obo/XAO_,canonical 255 | obo,XCO,http://purl.obolibrary.org/obo/XCO_,canonical 256 | obo,XLMOD,http://purl.obolibrary.org/obo/XLMOD_,canonical 257 | obo,XPO,http://purl.obolibrary.org/obo/XPO_,canonical 258 | obo,YPO,http://purl.obolibrary.org/obo/YPO_,canonical 259 | obo,ZEA,http://purl.obolibrary.org/obo/ZEA_,canonical 260 | obo,ZECO,http://purl.obolibrary.org/obo/ZECO_,canonical 261 | obo,ZFA,http://purl.obolibrary.org/obo/ZFA_,canonical 262 | obo,ZFS,http://purl.obolibrary.org/obo/ZFS_,canonical 263 | obo,ZP,http://purl.obolibrary.org/obo/ZP_,canonical 264 | -------------------------------------------------------------------------------- /src/prefixmaps/datamodel/context.py: -------------------------------------------------------------------------------- 1 | """Classes for managing individual Contexts.""" 2 | 3 | import logging 4 | import re 5 | from collections import defaultdict 6 | from dataclasses import dataclass, field 7 | from enum import Enum 8 | from typing import List, Mapping, Optional, Set, Union 9 | 10 | import curies 11 | 12 | __all__ = [ 13 | "StatusType", 14 | "PrefixExpansion", 15 | "Context", 16 | ] 17 | 18 | CONTEXT = str 19 | PREFIX = str 20 | NAMESPACE = str 21 | PREFIX_EXPANSION_DICT = Mapping[PREFIX, NAMESPACE] 22 | INVERSE_PREFIX_EXPANSION_DICT = Mapping[NAMESPACE, PREFIX] 23 | 24 | 25 | PREFIX_RE = re.compile(r"^[\w\.]+$") 26 | NAMESPACE_RE = re.compile(r"http[s]?://[\w\.\-\/]+[#/_:]$") 27 | 28 | logger = logging.getLogger(__name__) 29 | 30 | 31 | class StatusType(Enum): 32 | """ 33 | Classification of prefix expansions. 34 | 35 | Note that only canonical mappings are exposed to the users of the library. However, 36 | it can be useful for prefixmap ETL pipelines to include non-canonical mappings for 37 | purposes of debugging. 38 | """ 39 | 40 | canonical = "canonical" 41 | """The canonical prefix expansion for a prefix. The set of all canonical mappings must be bijective.""" 42 | 43 | prefix_alias = "prefix_alias" 44 | """The prefix is an alias for an existing canonical prefix.""" 45 | 46 | namespace_alias = "namespace_alias" 47 | """The prefix is an alias for an existing canonical namespace.""" 48 | 49 | multi_alias = "multi_alias" 50 | """Both the prefix and the namespace are aliases for existing canonical namespaces.""" 51 | 52 | 53 | @dataclass 54 | class PrefixExpansion: 55 | """ 56 | An individual mapping between a prefix and a namespace. 57 | 58 | A PrefixExpansion corresponds to a SHACL PrefixDeclaration (https://www.w3.org/TR/shacl/#dfn-prefix-declarations) 59 | """ 60 | 61 | context: CONTEXT 62 | """Each PrefixExpansion is grouped into a context.""" 63 | 64 | prefix: PREFIX 65 | """Corresponds to http://www.w3.org/ns/shacl#prefix""" 66 | 67 | namespace: NAMESPACE 68 | """Corresponds to http://www.w3.org/ns/shacl#namespace""" 69 | 70 | status: StatusType 71 | """Indicates whether the expansion is canonical, a prefix alias, a namespace alias, or both.""" 72 | 73 | expansion_source: Optional[str] = None 74 | """Indicates the source of the prefix expansion.""" 75 | 76 | def canonical(self) -> bool: 77 | """ 78 | True if this is the canonical mapping in both directions. 79 | 80 | Note that canonicality is always relative to a context: 81 | 82 | - ("GEO", "http://purl.obolibrary.org/obo/geo/") is canonical in the OBO Foundry context 83 | 84 | :return: True if the status is canonical 85 | """ 86 | return self.status == StatusType.canonical 87 | 88 | def validate(self) -> List[str]: 89 | """ 90 | Validate the prefix expansion. 91 | 92 | - Ensures that prefixes conform to W3C CURIE syntax 93 | - Ensures that namespaces conform to a restricted subset of W3C URI syntax 94 | 95 | Note that we use a highly restricted syntax in order to filter out pseudo-semantic 96 | URIs. These include URLs for websites intended for humans that have http parameters 97 | with `?`s, `=`s, etc. 98 | 99 | These URLs are almost NEVER intended to be used as semantic URIs, i.e as subjects of 100 | RDF triples. It is almost always bad practice to use them as such. 101 | 102 | In future, if we discover exceptions to this rule, we will add them here. 103 | 104 | :return: list of validation errors 105 | """ 106 | messages = [] 107 | if not PREFIX_RE.match(self.prefix): 108 | messages.append(f"prefix {self.prefix} does not match {PREFIX_RE}") 109 | if not NAMESPACE_RE.match(self.namespace): 110 | messages.append( 111 | f"namespace {self.namespace} does not match {NAMESPACE_RE}\ 112 | (prefix: {self.prefix})" 113 | ) 114 | return messages 115 | 116 | 117 | @dataclass 118 | class Context: 119 | """ 120 | A context is a localized collection of prefix expansions. 121 | 122 | A context should be internally consistent: 123 | 124 | - the set of canonical PrefixExpansions should be bijective 125 | 126 | However, there is no guarantee that a context is consistent with other contexts. 127 | """ 128 | 129 | name: CONTEXT 130 | """A unique stable handle for the context.""" 131 | 132 | description: Optional[str] = None 133 | """A human readable concise description of the context.""" 134 | 135 | prefix_expansions: List[PrefixExpansion] = field(default_factory=lambda: []) 136 | """All prefix expansions within that context. Corresponds to http://www.w3.org/ns/shacl#prefixes""" 137 | 138 | comments: List[str] = None 139 | """Optional comments on the context.""" 140 | 141 | location: Optional[str] = None 142 | format: Optional[str] = None 143 | merged_from: Optional[List[str]] = None 144 | upper: bool = None 145 | lower: bool = None 146 | _prefixes: Set[str] = field(default_factory=set) 147 | """Private attr to speed up duplicate lookups""" 148 | _prefixes_lower: Set[str] = field(default_factory=set) 149 | """Private attr to speed up duplicate lookups""" 150 | _namespaces: Set[str] = field(default_factory=set) 151 | """Private attr to speed up duplicate lookups""" 152 | _namespaces_lower: Set[str] = field(default_factory=set) 153 | """Private attr to speed up duplicate lookups""" 154 | 155 | def combine(self, context: "Context"): 156 | """ 157 | Merge a context into this one. 158 | 159 | If there are conflicts, the current context takes precedence, 160 | and the merged expansions are marked as non-canonical 161 | 162 | :param context: 163 | :return: 164 | """ 165 | for pe in context.prefix_expansions: 166 | self.add_prefix(pe.prefix, pe.namespace, pe.status, expansion_source=context.name) 167 | 168 | def add_prefix( 169 | self, 170 | prefix: PREFIX, 171 | namespace: NAMESPACE, 172 | status: StatusType = StatusType.canonical, 173 | preferred: bool = False, 174 | expansion_source: Optional[str] = None, 175 | force: bool = False, 176 | ): 177 | """ 178 | Adds a prefix expansion to this context. 179 | 180 | The current context stays canonical. Additional prefixes 181 | added may be classified as non-canonical. 182 | 183 | If upper or lower is set for this context, the 184 | prefix will be auto-case normalized, 185 | UNLESS preferred=True 186 | 187 | :param prefix: prefix to be added 188 | :param namespace: namespace to be added 189 | :param status: the status of the prefix being added 190 | :param preferred: 191 | :param expansion_source: An optional annotation to be used when merging contexts together. 192 | The source will keep track of the original context that a given prefix 193 | expansion came from. This is used in :meth:`Context.combine`. 194 | :param force: if True, recompute namespaces and prefixes. default False. 195 | :return: 196 | """ 197 | # TODO: check status 198 | _prefix = prefix 199 | if not preferred: 200 | if self.upper: 201 | prefix = prefix.upper() 202 | if self.lower: 203 | raise ValueError("Cannot set both upper AND lower") 204 | if self.lower: 205 | prefix = prefix.lower() 206 | prefixes = self.prefixes(lower=True, force=force, as_list=False) 207 | namespaces = self.namespaces(lower=True, force=force, as_list=False) 208 | if prefix.lower() in prefixes: 209 | if namespace.lower() in namespaces: 210 | return 211 | # status = StatusType.multi_alias 212 | else: 213 | status = StatusType.prefix_alias 214 | else: 215 | if namespace.lower() in namespaces: 216 | status = StatusType.namespace_alias 217 | 218 | self.prefix_expansions.append( 219 | PrefixExpansion( 220 | context=self.name, 221 | prefix=prefix, 222 | namespace=namespace, 223 | status=status, 224 | expansion_source=expansion_source, 225 | ) 226 | ) 227 | self._prefixes.add(_prefix) 228 | self._prefixes_lower.add(prefix.lower()) 229 | self._namespaces.add(namespace) 230 | self._namespaces_lower.add(namespace.lower()) 231 | 232 | def filter(self, prefix: PREFIX = None, namespace: NAMESPACE = None): 233 | """ 234 | Returns namespaces matching query. 235 | 236 | :param prefix: 237 | :param namespace: 238 | :return: 239 | """ 240 | filtered_pes = [] 241 | for pe in self.prefix_expansions: 242 | if prefix is not None and prefix != pe.prefix: 243 | continue 244 | if namespace is not None and namespace != pe.namespace: 245 | continue 246 | filtered_pes.append(pe) 247 | return filtered_pes 248 | 249 | def prefixes( 250 | self, lower=False, force: bool = True, as_list: bool = True 251 | ) -> Union[List[str], Set[str]]: 252 | """ 253 | All unique prefixes in all prefix expansions. 254 | 255 | :param lower: if True, the prefix is normalized to lowercase. 256 | :param force: if True, recompute. if False, return cached 257 | :param as_list: if True (default), return as a list. Otherwise a set 258 | :return: 259 | """ 260 | if lower: 261 | if force or len(self._prefixes_lower) == 0: 262 | self._prefixes_lower = {pe.prefix.lower() for pe in self.prefix_expansions} 263 | res = self._prefixes_lower 264 | 265 | else: 266 | if force or len(self._prefixes) == 0: 267 | self._prefixes = {pe.prefix for pe in self.prefix_expansions} 268 | res = self._prefixes 269 | 270 | if as_list: 271 | return list(res) 272 | else: 273 | return res 274 | 275 | def namespaces( 276 | self, lower=False, force: bool = True, as_list: bool = True 277 | ) -> Union[List[str], Set[str]]: 278 | """ 279 | All unique namespaces in all prefix expansions 280 | 281 | :param lower: if True, the namespace is normalized to lowercase. 282 | :param force: if True, recompute. if False, return cached 283 | :param as_list: if True (default), return as a list. Otherwise a set 284 | :return: 285 | """ 286 | if lower: 287 | if force or len(self._namespaces_lower) == 0: 288 | self._namespaces_lower = {pe.namespace.lower() for pe in self.prefix_expansions} 289 | res = self._namespaces_lower 290 | 291 | else: 292 | if force or len(self._namespaces) == 0: 293 | self._namespaces = {pe.namespace for pe in self.prefix_expansions} 294 | res = self._namespaces 295 | 296 | if as_list: 297 | return list(res) 298 | else: 299 | return res 300 | 301 | def as_dict(self) -> PREFIX_EXPANSION_DICT: 302 | """ 303 | Returns a mapping between canonical prefixes and expansions. 304 | 305 | This only includes canonical expansions. The results can be safely used 306 | in the header of RDF syntax documents. 307 | 308 | :return: Mappings between prefixes and namespaces 309 | """ 310 | return {pe.prefix: pe.namespace for pe in self.prefix_expansions if pe.canonical()} 311 | 312 | def as_inverted_dict(self) -> INVERSE_PREFIX_EXPANSION_DICT: 313 | """ 314 | Returns a mapping between canonical expansions and prefixes. 315 | 316 | :return: Mapping between namespaces and prefixes 317 | """ 318 | return {pe.namespace: pe.prefix for pe in self.prefix_expansions if pe.canonical()} 319 | 320 | def as_extended_prefix_map(self) -> List[curies.Record]: 321 | """Return an extended prefix, appropriate for generating a :class:`curies.Converter`. 322 | 323 | An extended prefix map is a collection of dictionaries, each of which has the following 324 | fields: 325 | 326 | - ``prefix`` - the canonical prefix 327 | - ``uri_prefix`` - the canonical URI prefix (i.e. namespace) 328 | - ``prefix_synonyms`` - optional extra prefixes such as capitialization variants. No prefix 329 | synonyms are allowed to be duplicate across any canonical prefixes or synonyms in other 330 | records in the extended prefix 331 | - ``uri_prefix_synonyms`` - optional extra URI prefixes such as variants of Identifiers.org 332 | URLs, PURLs, etc. No URI prefix synyonms are allowed to be duplicates of either canonical 333 | or other URI prefix synonyms. 334 | 335 | Extended prefix maps have the benefit over regular prefix maps in that they keep extra 336 | information. An extended prefix map can be readily collapsed into a normal prefix map 337 | by getting the ``prefix`` and ``uri_prefix`` fields. 338 | """ 339 | prefix_map, reverse_prefix_map = {}, {} 340 | for expansion in self.prefix_expansions: 341 | if expansion.canonical(): 342 | reverse_prefix_map[expansion.namespace] = expansion.prefix 343 | prefix_map[expansion.prefix] = expansion.namespace 344 | 345 | uri_prefix_synonyms = defaultdict(set) 346 | for expansion in self.prefix_expansions: 347 | if expansion.status == StatusType.prefix_alias: 348 | uri_prefix_synonyms[expansion.prefix].add(expansion.namespace) 349 | 350 | prefix_synonyms = defaultdict(set) 351 | for expansion in self.prefix_expansions: 352 | if ( 353 | expansion.status == StatusType.namespace_alias 354 | and expansion.namespace in reverse_prefix_map 355 | ): 356 | prefix_synonyms[reverse_prefix_map[expansion.namespace]].add(expansion.prefix) 357 | elif ( 358 | expansion.status == StatusType.namespace_alias 359 | and expansion.namespace not in reverse_prefix_map 360 | ): 361 | # this is too noisy, we need a logger here instead 362 | # warnings.warn( 363 | # f"namespace alias {expansion.namespace} => {expansion.prefix} is not a canonical namespace" 364 | # ) 365 | logger.info( 366 | f"namespace alias {expansion.namespace} => {expansion.prefix} is not a canonical expansion" 367 | ) 368 | 369 | return [ 370 | curies.Record( 371 | prefix=prefix, 372 | prefix_synonyms=sorted(prefix_synonyms[prefix]), 373 | uri_prefix=uri_prefix, 374 | uri_prefix_synonyms=sorted(uri_prefix_synonyms[prefix]), 375 | ) 376 | for prefix, uri_prefix in sorted(prefix_map.items()) 377 | ] 378 | 379 | def as_converter(self) -> curies.Converter: 380 | """ 381 | Get a converter from this prefix map. 382 | 383 | :return: 384 | """ 385 | extended_prefix_map = self.as_extended_prefix_map() 386 | return curies.Converter.from_extended_prefix_map(extended_prefix_map) 387 | 388 | def validate(self, canonical_only=True) -> List[str]: 389 | """ 390 | Validates each prefix expansion in the context. 391 | 392 | :param canonical_only: 393 | :return: 394 | """ 395 | messages = [] 396 | for pe in self.prefix_expansions: 397 | if canonical_only and not pe.canonical(): 398 | continue 399 | messages += pe.validate() 400 | # namespaces = self.namespaces(lower=True) 401 | # prefixes = self.namespaces(lower=True) 402 | return messages 403 | -------------------------------------------------------------------------------- /tests/input/obo_prefixes.ttl: -------------------------------------------------------------------------------- 1 | @prefix sh: . 2 | @prefix xsd: . 3 | [ 4 | sh:declare 5 | [ sh:prefix "BFO" ; sh:namespace "http://purl.obolibrary.org/obo/BFO_"] 6 | ,[ sh:prefix "CHEBI" ; sh:namespace "http://purl.obolibrary.org/obo/CHEBI_"] 7 | ,[ sh:prefix "DOID" ; sh:namespace "http://purl.obolibrary.org/obo/DOID_"] 8 | ,[ sh:prefix "GO" ; sh:namespace "http://purl.obolibrary.org/obo/GO_"] 9 | ,[ sh:prefix "OBI" ; sh:namespace "http://purl.obolibrary.org/obo/OBI_"] 10 | ,[ sh:prefix "PATO" ; sh:namespace "http://purl.obolibrary.org/obo/PATO_"] 11 | ,[ sh:prefix "PO" ; sh:namespace "http://purl.obolibrary.org/obo/PO_"] 12 | ,[ sh:prefix "PR" ; sh:namespace "http://purl.obolibrary.org/obo/PR_"] 13 | ,[ sh:prefix "XAO" ; sh:namespace "http://purl.obolibrary.org/obo/XAO_"] 14 | ,[ sh:prefix "ZFA" ; sh:namespace "http://purl.obolibrary.org/obo/ZFA_"] 15 | ,[ sh:prefix "ADO" ; sh:namespace "http://purl.obolibrary.org/obo/ADO_"] 16 | ,[ sh:prefix "AGRO" ; sh:namespace "http://purl.obolibrary.org/obo/AGRO_"] 17 | ,[ sh:prefix "AISM" ; sh:namespace "http://purl.obolibrary.org/obo/AISM_"] 18 | ,[ sh:prefix "AMPHX" ; sh:namespace "http://purl.obolibrary.org/obo/AMPHX_"] 19 | ,[ sh:prefix "APO" ; sh:namespace "http://purl.obolibrary.org/obo/APO_"] 20 | ,[ sh:prefix "APOLLO_SV" ; sh:namespace "http://purl.obolibrary.org/obo/APOLLO_SV_"] 21 | ,[ sh:prefix "ARO" ; sh:namespace "http://purl.obolibrary.org/obo/ARO_"] 22 | ,[ sh:prefix "BCO" ; sh:namespace "http://purl.obolibrary.org/obo/BCO_"] 23 | ,[ sh:prefix "BSPO" ; sh:namespace "http://purl.obolibrary.org/obo/BSPO_"] 24 | ,[ sh:prefix "BTO" ; sh:namespace "http://purl.obolibrary.org/obo/BTO_"] 25 | ,[ sh:prefix "CARO" ; sh:namespace "http://purl.obolibrary.org/obo/CARO_"] 26 | ,[ sh:prefix "CDAO" ; sh:namespace "http://purl.obolibrary.org/obo/CDAO_"] 27 | ,[ sh:prefix "CDNO" ; sh:namespace "http://purl.obolibrary.org/obo/CDNO_"] 28 | ,[ sh:prefix "CHEMINF" ; sh:namespace "http://purl.obolibrary.org/obo/CHEMINF_"] 29 | ,[ sh:prefix "CHIRO" ; sh:namespace "http://purl.obolibrary.org/obo/CHIRO_"] 30 | ,[ sh:prefix "CHMO" ; sh:namespace "http://purl.obolibrary.org/obo/CHMO_"] 31 | ,[ sh:prefix "CIDO" ; sh:namespace "http://purl.obolibrary.org/obo/CIDO_"] 32 | ,[ sh:prefix "CIO" ; sh:namespace "http://purl.obolibrary.org/obo/CIO_"] 33 | ,[ sh:prefix "CL" ; sh:namespace "http://purl.obolibrary.org/obo/CL_"] 34 | ,[ sh:prefix "CLAO" ; sh:namespace "http://purl.obolibrary.org/obo/CLAO_"] 35 | ,[ sh:prefix "CLO" ; sh:namespace "http://purl.obolibrary.org/obo/CLO_"] 36 | ,[ sh:prefix "CLYH" ; sh:namespace "http://purl.obolibrary.org/obo/CLYH_"] 37 | ,[ sh:prefix "CMO" ; sh:namespace "http://purl.obolibrary.org/obo/CMO_"] 38 | ,[ sh:prefix "COB" ; sh:namespace "http://purl.obolibrary.org/obo/COB_"] 39 | ,[ sh:prefix "COLAO" ; sh:namespace "http://purl.obolibrary.org/obo/COLAO_"] 40 | ,[ sh:prefix "CRO" ; sh:namespace "http://purl.obolibrary.org/obo/CRO_"] 41 | ,[ sh:prefix "CTENO" ; sh:namespace "http://purl.obolibrary.org/obo/CTENO_"] 42 | ,[ sh:prefix "CTO" ; sh:namespace "http://purl.obolibrary.org/obo/CTO_"] 43 | ,[ sh:prefix "CVDO" ; sh:namespace "http://purl.obolibrary.org/obo/CVDO_"] 44 | ,[ sh:prefix "DDANAT" ; sh:namespace "http://purl.obolibrary.org/obo/DDANAT_"] 45 | ,[ sh:prefix "DDPHENO" ; sh:namespace "http://purl.obolibrary.org/obo/DDPHENO_"] 46 | ,[ sh:prefix "DIDEO" ; sh:namespace "http://purl.obolibrary.org/obo/DIDEO_"] 47 | ,[ sh:prefix "DISDRIV" ; sh:namespace "http://purl.obolibrary.org/obo/DISDRIV_"] 48 | ,[ sh:prefix "FBcv" ; sh:namespace "http://purl.obolibrary.org/obo/FBcv_"] 49 | ,[ sh:prefix "DRON" ; sh:namespace "http://purl.obolibrary.org/obo/DRON_"] 50 | ,[ sh:prefix "DUO" ; sh:namespace "http://purl.obolibrary.org/obo/DUO_"] 51 | ,[ sh:prefix "ECAO" ; sh:namespace "http://purl.obolibrary.org/obo/ECAO_"] 52 | ,[ sh:prefix "ECO" ; sh:namespace "http://purl.obolibrary.org/obo/ECO_"] 53 | ,[ sh:prefix "ECOCORE" ; sh:namespace "http://purl.obolibrary.org/obo/ECOCORE_"] 54 | ,[ sh:prefix "ECTO" ; sh:namespace "http://purl.obolibrary.org/obo/ECTO_"] 55 | ,[ sh:prefix "EMAPA" ; sh:namespace "http://purl.obolibrary.org/obo/EMAPA_"] 56 | ,[ sh:prefix "ENVO" ; sh:namespace "http://purl.obolibrary.org/obo/ENVO_"] 57 | ,[ sh:prefix "EPIO" ; sh:namespace "http://purl.obolibrary.org/obo/EPIO_"] 58 | ,[ sh:prefix "EUPATH" ; sh:namespace "http://purl.obolibrary.org/obo/EUPATH_"] 59 | ,[ sh:prefix "ExO" ; sh:namespace "http://purl.obolibrary.org/obo/ExO_"] 60 | ,[ sh:prefix "FAO" ; sh:namespace "http://purl.obolibrary.org/obo/FAO_"] 61 | ,[ sh:prefix "FBbi" ; sh:namespace "http://purl.obolibrary.org/obo/FBbi_"] 62 | ,[ sh:prefix "FBbt" ; sh:namespace "http://purl.obolibrary.org/obo/FBbt_"] 63 | ,[ sh:prefix "FBcv" ; sh:namespace "http://purl.obolibrary.org/obo/FBcv_"] 64 | ,[ sh:prefix "FBdv" ; sh:namespace "http://purl.obolibrary.org/obo/FBdv_"] 65 | ,[ sh:prefix "FIDEO" ; sh:namespace "http://purl.obolibrary.org/obo/FIDEO_"] 66 | ,[ sh:prefix "FLOPO" ; sh:namespace "http://purl.obolibrary.org/obo/FLOPO_"] 67 | ,[ sh:prefix "FOBI" ; sh:namespace "http://purl.obolibrary.org/obo/FOBI_"] 68 | ,[ sh:prefix "FOODON" ; sh:namespace "http://purl.obolibrary.org/obo/FOODON_"] 69 | ,[ sh:prefix "FOVT" ; sh:namespace "http://purl.obolibrary.org/obo/FOVT_"] 70 | ,[ sh:prefix "FYPO" ; sh:namespace "http://purl.obolibrary.org/obo/FYPO_"] 71 | ,[ sh:prefix "GECKO" ; sh:namespace "http://purl.obolibrary.org/obo/GECKO_"] 72 | ,[ sh:prefix "GENEPIO" ; sh:namespace "http://purl.obolibrary.org/obo/GENEPIO_"] 73 | ,[ sh:prefix "GENO" ; sh:namespace "http://purl.obolibrary.org/obo/GENO_"] 74 | ,[ sh:prefix "GEO" ; sh:namespace "http://purl.obolibrary.org/obo/GEO_"] 75 | ,[ sh:prefix "GNO" ; sh:namespace "http://purl.obolibrary.org/obo/GNO_"] 76 | ,[ sh:prefix "HANCESTRO" ; sh:namespace "http://purl.obolibrary.org/obo/HANCESTRO_"] 77 | ,[ sh:prefix "HAO" ; sh:namespace "http://purl.obolibrary.org/obo/HAO_"] 78 | ,[ sh:prefix "HOM" ; sh:namespace "http://purl.obolibrary.org/obo/HOM_"] 79 | ,[ sh:prefix "HsapDv" ; sh:namespace "http://purl.obolibrary.org/obo/HsapDv_"] 80 | ,[ sh:prefix "HSO" ; sh:namespace "http://purl.obolibrary.org/obo/HSO_"] 81 | ,[ sh:prefix "HTN" ; sh:namespace "http://purl.obolibrary.org/obo/HTN_"] 82 | ,[ sh:prefix "IAO" ; sh:namespace "http://purl.obolibrary.org/obo/IAO_"] 83 | ,[ sh:prefix "ICEO" ; sh:namespace "http://purl.obolibrary.org/obo/ICEO_"] 84 | ,[ sh:prefix "ICO" ; sh:namespace "http://purl.obolibrary.org/obo/ICO_"] 85 | ,[ sh:prefix "IDO" ; sh:namespace "http://purl.obolibrary.org/obo/IDO_"] 86 | ,[ sh:prefix "INO" ; sh:namespace "http://purl.obolibrary.org/obo/INO_"] 87 | ,[ sh:prefix "LABO" ; sh:namespace "http://purl.obolibrary.org/obo/LABO_"] 88 | ,[ sh:prefix "LEPAO" ; sh:namespace "http://purl.obolibrary.org/obo/LEPAO_"] 89 | ,[ sh:prefix "MA" ; sh:namespace "http://purl.obolibrary.org/obo/MA_"] 90 | ,[ sh:prefix "MAXO" ; sh:namespace "http://purl.obolibrary.org/obo/MAXO_"] 91 | ,[ sh:prefix "MCO" ; sh:namespace "http://purl.obolibrary.org/obo/MCO_"] 92 | ,[ sh:prefix "MF" ; sh:namespace "http://purl.obolibrary.org/obo/MF_"] 93 | ,[ sh:prefix "MFMO" ; sh:namespace "http://purl.obolibrary.org/obo/MFMO_"] 94 | ,[ sh:prefix "MFOEM" ; sh:namespace "http://purl.obolibrary.org/obo/MFOEM_"] 95 | ,[ sh:prefix "MFOMD" ; sh:namespace "http://purl.obolibrary.org/obo/MFOMD_"] 96 | ,[ sh:prefix "MI" ; sh:namespace "http://purl.obolibrary.org/obo/MI_"] 97 | ,[ sh:prefix "MIAPA" ; sh:namespace "http://purl.obolibrary.org/obo/MIAPA_"] 98 | ,[ sh:prefix "MICRO" ; sh:namespace "http://purl.obolibrary.org/obo/MICRO_"] 99 | ,[ sh:prefix "MMO" ; sh:namespace "http://purl.obolibrary.org/obo/MMO_"] 100 | ,[ sh:prefix "MmusDv" ; sh:namespace "http://purl.obolibrary.org/obo/MmusDv_"] 101 | ,[ sh:prefix "MOD" ; sh:namespace "http://purl.obolibrary.org/obo/MOD_"] 102 | ,[ sh:prefix "MONDO" ; sh:namespace "http://purl.obolibrary.org/obo/MONDO_"] 103 | ,[ sh:prefix "MOP" ; sh:namespace "http://purl.obolibrary.org/obo/MOP_"] 104 | ,[ sh:prefix "MP" ; sh:namespace "http://purl.obolibrary.org/obo/MP_"] 105 | ,[ sh:prefix "MPATH" ; sh:namespace "http://purl.obolibrary.org/obo/MPATH_"] 106 | ,[ sh:prefix "MPIO" ; sh:namespace "http://purl.obolibrary.org/obo/MPIO_"] 107 | ,[ sh:prefix "MRO" ; sh:namespace "http://purl.obolibrary.org/obo/MRO_"] 108 | ,[ sh:prefix "MS" ; sh:namespace "http://purl.obolibrary.org/obo/MS_"] 109 | ,[ sh:prefix "NBO" ; sh:namespace "http://purl.obolibrary.org/obo/NBO_"] 110 | ,[ sh:prefix "NCBITaxon" ; sh:namespace "http://purl.obolibrary.org/obo/NCBITaxon_"] 111 | ,[ sh:prefix "NCIT" ; sh:namespace "http://purl.obolibrary.org/obo/NCIT_"] 112 | ,[ sh:prefix "NCRO" ; sh:namespace "http://purl.obolibrary.org/obo/NCRO_"] 113 | ,[ sh:prefix "NOMEN" ; sh:namespace "http://purl.obolibrary.org/obo/NOMEN_"] 114 | ,[ sh:prefix "OAE" ; sh:namespace "http://purl.obolibrary.org/obo/OAE_"] 115 | ,[ sh:prefix "OARCS" ; sh:namespace "http://purl.obolibrary.org/obo/OARCS_"] 116 | ,[ sh:prefix "OBA" ; sh:namespace "http://purl.obolibrary.org/obo/OBA_"] 117 | ,[ sh:prefix "OBCS" ; sh:namespace "http://purl.obolibrary.org/obo/OBCS_"] 118 | ,[ sh:prefix "OBIB" ; sh:namespace "http://purl.obolibrary.org/obo/OBIB_"] 119 | ,[ sh:prefix "OGG" ; sh:namespace "http://purl.obolibrary.org/obo/OGG_"] 120 | ,[ sh:prefix "OGMS" ; sh:namespace "http://purl.obolibrary.org/obo/OGMS_"] 121 | ,[ sh:prefix "OGSF" ; sh:namespace "http://purl.obolibrary.org/obo/OGSF_"] 122 | ,[ sh:prefix "OHD" ; sh:namespace "http://purl.obolibrary.org/obo/OHD_"] 123 | ,[ sh:prefix "OHMI" ; sh:namespace "http://purl.obolibrary.org/obo/OHMI_"] 124 | ,[ sh:prefix "OHPI" ; sh:namespace "http://purl.obolibrary.org/obo/OHPI_"] 125 | ,[ sh:prefix "OlatDv" ; sh:namespace "http://purl.obolibrary.org/obo/OlatDv_"] 126 | ,[ sh:prefix "OMIT" ; sh:namespace "http://purl.obolibrary.org/obo/OMIT_"] 127 | ,[ sh:prefix "OMO" ; sh:namespace "http://purl.obolibrary.org/obo/OMO_"] 128 | ,[ sh:prefix "OMP" ; sh:namespace "http://purl.obolibrary.org/obo/OMP_"] 129 | ,[ sh:prefix "OMRSE" ; sh:namespace "http://purl.obolibrary.org/obo/OMRSE_"] 130 | ,[ sh:prefix "ONE" ; sh:namespace "http://purl.obolibrary.org/obo/ONE_"] 131 | ,[ sh:prefix "ONS" ; sh:namespace "http://purl.obolibrary.org/obo/ONS_"] 132 | ,[ sh:prefix "ONTOAVIDA" ; sh:namespace "http://purl.obolibrary.org/obo/ONTOAVIDA_"] 133 | ,[ sh:prefix "ONTONEO" ; sh:namespace "http://purl.obolibrary.org/obo/ONTONEO_"] 134 | ,[ sh:prefix "OOSTT" ; sh:namespace "http://purl.obolibrary.org/obo/OOSTT_"] 135 | ,[ sh:prefix "OPL" ; sh:namespace "http://purl.obolibrary.org/obo/OPL_"] 136 | ,[ sh:prefix "OPMI" ; sh:namespace "http://purl.obolibrary.org/obo/OPMI_"] 137 | ,[ sh:prefix "ORNASEQ" ; sh:namespace "http://purl.obolibrary.org/obo/ORNASEQ_"] 138 | ,[ sh:prefix "OVAE" ; sh:namespace "http://purl.obolibrary.org/obo/OVAE_"] 139 | ,[ sh:prefix "PCL" ; sh:namespace "http://purl.obolibrary.org/obo/PCL_"] 140 | ,[ sh:prefix "PCO" ; sh:namespace "http://purl.obolibrary.org/obo/PCO_"] 141 | ,[ sh:prefix "PDRO" ; sh:namespace "http://purl.obolibrary.org/obo/PDRO_"] 142 | ,[ sh:prefix "PdumDv" ; sh:namespace "http://purl.obolibrary.org/obo/PdumDv_"] 143 | ,[ sh:prefix "PECO" ; sh:namespace "http://purl.obolibrary.org/obo/PECO_"] 144 | ,[ sh:prefix "PHIPO" ; sh:namespace "http://purl.obolibrary.org/obo/PHIPO_"] 145 | ,[ sh:prefix "PLANA" ; sh:namespace "http://purl.obolibrary.org/obo/PLANA_"] 146 | ,[ sh:prefix "PLANP" ; sh:namespace "http://purl.obolibrary.org/obo/PLANP_"] 147 | ,[ sh:prefix "PORO" ; sh:namespace "http://purl.obolibrary.org/obo/PORO_"] 148 | ,[ sh:prefix "PPO" ; sh:namespace "http://purl.obolibrary.org/obo/PPO_"] 149 | ,[ sh:prefix "PROCO" ; sh:namespace "http://purl.obolibrary.org/obo/PROCO_"] 150 | ,[ sh:prefix "PSDO" ; sh:namespace "http://purl.obolibrary.org/obo/PSDO_"] 151 | ,[ sh:prefix "PSO" ; sh:namespace "http://purl.obolibrary.org/obo/PSO_"] 152 | ,[ sh:prefix "PW" ; sh:namespace "http://purl.obolibrary.org/obo/PW_"] 153 | ,[ sh:prefix "RBO" ; sh:namespace "http://purl.obolibrary.org/obo/RBO_"] 154 | ,[ sh:prefix "RO" ; sh:namespace "http://purl.obolibrary.org/obo/RO_"] 155 | ,[ sh:prefix "RS" ; sh:namespace "http://purl.obolibrary.org/obo/RS_"] 156 | ,[ sh:prefix "RXNO" ; sh:namespace "http://purl.obolibrary.org/obo/RXNO_"] 157 | ,[ sh:prefix "SEPIO" ; sh:namespace "http://purl.obolibrary.org/obo/SEPIO_"] 158 | ,[ sh:prefix "SO" ; sh:namespace "http://purl.obolibrary.org/obo/SO_"] 159 | ,[ sh:prefix "SPD" ; sh:namespace "http://purl.obolibrary.org/obo/SPD_"] 160 | ,[ sh:prefix "STATO" ; sh:namespace "http://purl.obolibrary.org/obo/STATO_"] 161 | ,[ sh:prefix "SWO" ; sh:namespace "http://purl.obolibrary.org/obo/SWO_"] 162 | ,[ sh:prefix "SYMP" ; sh:namespace "http://purl.obolibrary.org/obo/SYMP_"] 163 | ,[ sh:prefix "TAXRANK" ; sh:namespace "http://purl.obolibrary.org/obo/TAXRANK_"] 164 | ,[ sh:prefix "TO" ; sh:namespace "http://purl.obolibrary.org/obo/TO_"] 165 | ,[ sh:prefix "TRANS" ; sh:namespace "http://purl.obolibrary.org/obo/TRANS_"] 166 | ,[ sh:prefix "TTO" ; sh:namespace "http://purl.obolibrary.org/obo/TTO_"] 167 | ,[ sh:prefix "TXPO" ; sh:namespace "http://purl.obolibrary.org/obo/TXPO_"] 168 | ,[ sh:prefix "UBERON" ; sh:namespace "http://purl.obolibrary.org/obo/UBERON_"] 169 | ,[ sh:prefix "UO" ; sh:namespace "http://purl.obolibrary.org/obo/UO_"] 170 | ,[ sh:prefix "UPHENO" ; sh:namespace "http://purl.obolibrary.org/obo/UPHENO_"] 171 | ,[ sh:prefix "VO" ; sh:namespace "http://purl.obolibrary.org/obo/VO_"] 172 | ,[ sh:prefix "VT" ; sh:namespace "http://purl.obolibrary.org/obo/VT_"] 173 | ,[ sh:prefix "VTO" ; sh:namespace "http://purl.obolibrary.org/obo/VTO_"] 174 | ,[ sh:prefix "WBbt" ; sh:namespace "http://purl.obolibrary.org/obo/WBbt_"] 175 | ,[ sh:prefix "WBls" ; sh:namespace "http://purl.obolibrary.org/obo/WBls_"] 176 | ,[ sh:prefix "WBPhenotype" ; sh:namespace "http://purl.obolibrary.org/obo/WBPhenotype_"] 177 | ,[ sh:prefix "XCO" ; sh:namespace "http://purl.obolibrary.org/obo/XCO_"] 178 | ,[ sh:prefix "XLMOD" ; sh:namespace "http://purl.obolibrary.org/obo/XLMOD_"] 179 | ,[ sh:prefix "XPO" ; sh:namespace "http://purl.obolibrary.org/obo/XPO_"] 180 | ,[ sh:prefix "ZECO" ; sh:namespace "http://purl.obolibrary.org/obo/ZECO_"] 181 | ,[ sh:prefix "ZFS" ; sh:namespace "http://purl.obolibrary.org/obo/ZFS_"] 182 | ,[ sh:prefix "ZP" ; sh:namespace "http://purl.obolibrary.org/obo/ZP_"] 183 | ,[ sh:prefix "GSSO" ; sh:namespace "http://purl.obolibrary.org/obo/GSSO_"] 184 | ,[ sh:prefix "HP" ; sh:namespace "http://purl.obolibrary.org/obo/HP_"] 185 | ,[ sh:prefix "KISAO" ; sh:namespace "http://purl.obolibrary.org/obo/KISAO_"] 186 | ,[ sh:prefix "SBO" ; sh:namespace "http://purl.obolibrary.org/obo/SBO_"] 187 | ,[ sh:prefix "SCDO" ; sh:namespace "http://purl.obolibrary.org/obo/SCDO_"] 188 | ,[ sh:prefix "FIX" ; sh:namespace "http://purl.obolibrary.org/obo/FIX_"] 189 | ,[ sh:prefix "MAMO" ; sh:namespace "http://purl.obolibrary.org/obo/MAMO_"] 190 | ,[ sh:prefix "REX" ; sh:namespace "http://purl.obolibrary.org/obo/REX_"] 191 | ,[ sh:prefix "SIBO" ; sh:namespace "http://purl.obolibrary.org/obo/SIBO_"] 192 | ,[ sh:prefix "VariO" ; sh:namespace "http://purl.obolibrary.org/obo/VariO_"] 193 | ,[ sh:prefix "AEO" ; sh:namespace "http://purl.obolibrary.org/obo/AEO_"] 194 | ,[ sh:prefix "CEPH" ; sh:namespace "http://purl.obolibrary.org/obo/CEPH_"] 195 | ,[ sh:prefix "EHDAA2" ; sh:namespace "http://purl.obolibrary.org/obo/EHDAA2_"] 196 | ,[ sh:prefix "FMA" ; sh:namespace "http://purl.obolibrary.org/obo/FMA_"] 197 | ,[ sh:prefix "GAZ" ; sh:namespace "http://purl.obolibrary.org/obo/GAZ_"] 198 | ,[ sh:prefix "IDOMAL" ; sh:namespace "http://purl.obolibrary.org/obo/IDOMAL_"] 199 | ,[ sh:prefix "MIRO" ; sh:namespace "http://purl.obolibrary.org/obo/MIRO_"] 200 | ,[ sh:prefix "RNAO" ; sh:namespace "http://purl.obolibrary.org/obo/RNAO_"] 201 | ,[ sh:prefix "TADS" ; sh:namespace "http://purl.obolibrary.org/obo/TADS_"] 202 | ,[ sh:prefix "TGMA" ; sh:namespace "http://purl.obolibrary.org/obo/TGMA_"] 203 | ,[ sh:prefix "UPA" ; sh:namespace "http://purl.obolibrary.org/obo/UPA_"] 204 | ,[ sh:prefix "AAO" ; sh:namespace "http://purl.obolibrary.org/obo/AAO_"] 205 | ,[ sh:prefix "ADW" ; sh:namespace "http://purl.obolibrary.org/obo/ADW_"] 206 | ,[ sh:prefix "AERO" ; sh:namespace "http://purl.obolibrary.org/obo/AERO_"] 207 | ,[ sh:prefix "ATO" ; sh:namespace "http://purl.obolibrary.org/obo/ATO_"] 208 | ,[ sh:prefix "BCGO" ; sh:namespace "http://purl.obolibrary.org/obo/BCGO_"] 209 | ,[ sh:prefix "BILA" ; sh:namespace "http://purl.obolibrary.org/obo/BILA_"] 210 | ,[ sh:prefix "BOOTSTREP" ; sh:namespace "http://purl.obolibrary.org/obo/BOOTSTREP_"] 211 | ,[ sh:prefix "CMF" ; sh:namespace "http://purl.obolibrary.org/obo/CMF_"] 212 | ,[ sh:prefix "DC_CL" ; sh:namespace "http://purl.obolibrary.org/obo/DC_CL_"] 213 | ,[ sh:prefix "DINTO" ; sh:namespace "http://purl.obolibrary.org/obo/DINTO_"] 214 | ,[ sh:prefix "EHDA" ; sh:namespace "http://purl.obolibrary.org/obo/EHDA_"] 215 | ,[ sh:prefix "EHDAA" ; sh:namespace "http://purl.obolibrary.org/obo/EHDAA_"] 216 | ,[ sh:prefix "EMAP" ; sh:namespace "http://purl.obolibrary.org/obo/EMAP_"] 217 | ,[ sh:prefix "EO" ; sh:namespace "http://purl.obolibrary.org/obo/EO_"] 218 | ,[ sh:prefix "EPO" ; sh:namespace "http://purl.obolibrary.org/obo/EPO_"] 219 | ,[ sh:prefix "ERO" ; sh:namespace "http://purl.obolibrary.org/obo/ERO_"] 220 | ,[ sh:prefix "EV" ; sh:namespace "http://purl.obolibrary.org/obo/EV_"] 221 | ,[ sh:prefix "FBSP" ; sh:namespace "http://purl.obolibrary.org/obo/FBSP_"] 222 | ,[ sh:prefix "FLU" ; sh:namespace "http://purl.obolibrary.org/obo/FLU_"] 223 | ,[ sh:prefix "GRO" ; sh:namespace "http://purl.obolibrary.org/obo/GRO_"] 224 | ,[ sh:prefix "HABRONATTUS" ; sh:namespace "http://purl.obolibrary.org/obo/HABRONATTUS_"] 225 | ,[ sh:prefix "IEV" ; sh:namespace "http://purl.obolibrary.org/obo/IEV_"] 226 | ,[ sh:prefix "IMR" ; sh:namespace "http://purl.obolibrary.org/obo/IMR_"] 227 | ,[ sh:prefix "IPR" ; sh:namespace "http://purl.obolibrary.org/obo/IPR_"] 228 | ,[ sh:prefix "LIPRO" ; sh:namespace "http://purl.obolibrary.org/obo/LIPRO_"] 229 | ,[ sh:prefix "LOGGERHEAD" ; sh:namespace "http://purl.obolibrary.org/obo/LOGGERHEAD_"] 230 | ,[ sh:prefix "MAO" ; sh:namespace "http://purl.obolibrary.org/obo/MAO_"] 231 | ,[ sh:prefix "MAT" ; sh:namespace "http://purl.obolibrary.org/obo/MAT_"] 232 | ,[ sh:prefix "MFO" ; sh:namespace "http://purl.obolibrary.org/obo/MFO_"] 233 | ,[ sh:prefix "MIRNAO" ; sh:namespace "http://purl.obolibrary.org/obo/MIRNAO_"] 234 | ,[ sh:prefix "MO" ; sh:namespace "http://purl.obolibrary.org/obo/MO_"] 235 | ,[ sh:prefix "NIF_CELL" ; sh:namespace "http://purl.obolibrary.org/obo/NIF_CELL_"] 236 | ,[ sh:prefix "NIF_DYSFUNCTION" ; sh:namespace "http://purl.obolibrary.org/obo/NIF_DYSFUNCTION_"] 237 | ,[ sh:prefix "NIF_GROSSANATOMY" ; sh:namespace "http://purl.obolibrary.org/obo/NIF_GROSSANATOMY_"] 238 | ,[ sh:prefix "NMR" ; sh:namespace "http://purl.obolibrary.org/obo/NMR_"] 239 | ,[ sh:prefix "OBO_REL" ; sh:namespace "http://purl.obolibrary.org/obo/OBO_REL_"] 240 | ,[ sh:prefix "OGI" ; sh:namespace "http://purl.obolibrary.org/obo/OGI_"] 241 | ,[ sh:prefix "OMIABIS" ; sh:namespace "http://purl.obolibrary.org/obo/OMIABIS_"] 242 | ,[ sh:prefix "PAO" ; sh:namespace "http://purl.obolibrary.org/obo/PAO_"] 243 | ,[ sh:prefix "PD_ST" ; sh:namespace "http://purl.obolibrary.org/obo/PD_ST_"] 244 | ,[ sh:prefix "PGDSO" ; sh:namespace "http://purl.obolibrary.org/obo/PGDSO_"] 245 | ,[ sh:prefix "PLO" ; sh:namespace "http://purl.obolibrary.org/obo/PLO_"] 246 | ,[ sh:prefix "PROPREO" ; sh:namespace "http://purl.obolibrary.org/obo/PROPREO_"] 247 | ,[ sh:prefix "RESID" ; sh:namespace "http://purl.obolibrary.org/obo/RESID_"] 248 | ,[ sh:prefix "SAO" ; sh:namespace "http://purl.obolibrary.org/obo/SAO_"] 249 | ,[ sh:prefix "SEP" ; sh:namespace "http://purl.obolibrary.org/obo/SEP_"] 250 | ,[ sh:prefix "SOPHARM" ; sh:namespace "http://purl.obolibrary.org/obo/SOPHARM_"] 251 | ,[ sh:prefix "TAHE" ; sh:namespace "http://purl.obolibrary.org/obo/TAHE_"] 252 | ,[ sh:prefix "TAHH" ; sh:namespace "http://purl.obolibrary.org/obo/TAHH_"] 253 | ,[ sh:prefix "TAO" ; sh:namespace "http://purl.obolibrary.org/obo/TAO_"] 254 | ,[ sh:prefix "VHOG" ; sh:namespace "http://purl.obolibrary.org/obo/VHOG_"] 255 | ,[ sh:prefix "VSAO" ; sh:namespace "http://purl.obolibrary.org/obo/VSAO_"] 256 | ,[ sh:prefix "YPO" ; sh:namespace "http://purl.obolibrary.org/obo/YPO_"] 257 | ,[ sh:prefix "ZEA" ; sh:namespace "http://purl.obolibrary.org/obo/ZEA_"] 258 | ] . 259 | -------------------------------------------------------------------------------- /src/prefixmaps/data/bioportal.curated.yaml: -------------------------------------------------------------------------------- 1 | name: bioportal 2 | prefixes: 3 | ABD: http://brd.bsvgateway.org/api/ 4 | ACESO: http://www.semanticweb.org/cbmi/ontologies/2018/10/aceso# 5 | ACGT-MO: http://www.ifomis.org/acgt/1.0# 6 | AD-DROP: http://www.semanticweb.org/AD-DROP# 7 | ADALAB-META: http://rdf.adalab-project.org/ontology/adalab-meta/ 8 | ADAR: 9 | - http://purl.org/autism-ontology/1.0/autism-core.owl# 10 | - http://purl.org/autism-ontology/1.0/CA_ADOS1-2001.owl# 11 | - http://purl.org/autism-ontology/1.0/Interests_and_behaviors_phenotype# 12 | - http://purl.org/autism-ontology/1.0/assessment-result.owl# 13 | - http://purl.org/autism-ontology/1.0/autism-merged.owl# 14 | - http://purl.org/autism-ontology/1.0/autism-rules.owl# 15 | - http://purl.org/autism-ontology/1.0/ca_adi-2003.owl# 16 | - http://purl.org/autism-ontology/1.0/ca_ados4_2001.owl# 17 | - http://purl.org/autism-ontology/1.0/ca_vinelandsurvey-2005.owl# 18 | ADCAD: https://purl.dataone.org/odo/ADCAD_ 19 | ADHER_INTCARE_EN: http://www.semanticweb.org/parracarlos/ontologies/2019/3/untitled-ontology-31# 20 | ADMO: http://www.semanticweb.org/ADMO# 21 | ADO: http://scai.fraunhofer.de/AlzheimerOntology# 22 | AGROCYMAC: http://www.semanticweb.org/yali/ontologies/2019/0/cultivos# 23 | AGROMOP: http://www.semanticweb.org/vera/ontologies/2020/1/untitled-ontology-5# 24 | AHOL: http://opendata.inra.fr/AHOL/AHOL_ 25 | AHSO: https://w3id.org/ahso# 26 | AIRBUS: http://protege.stanford.edu/thesauri/aero/ 27 | AISM: OBO:AISM_ 28 | AMINO-ACID: http://www.co-ode.org/ontologies/amino-acid/2006/05/18/amino-acid.owl# 29 | AO: http://childhealthservicemodels.eu/asthma# 30 | APAOCUEMPLOY: http://www.semanticweb.org/ontologies/2015/0/ocupationalemploymentcluster.owl# 31 | APATREATMENT: http://www.semanticweb.org/ontologies/2015/0/treatmentcluster.owl# 32 | ARCRC: http://purl.dataone.org/odo/ARCRC_ 33 | ASDPTO: http://cbmi.med.harvard.edu/asdphenotype# 34 | ASPECT: http://purl.org/aspect/ 35 | ATC: http://purl.bioontology.org/ontology/ATC/ 36 | ATOL: http://opendata.inra.fr/ATOL/ATOL_ 37 | AURA: http://www.projecthalo.com/aura# 38 | BAO: http://www.bioassayontology.org/bao#BAO_ 39 | BCI-O: https://w3id.org/BCI-ontology# 40 | BCTT: http://purl.bioontology.org/ontology/BCTT# 41 | BFO: http://www.ifomis.org/bfo/1.1/snap# 42 | BHN: http://chu-rouen.fr/cismef/BHN# 43 | BIBFRAME: http://id.loc.gov/ontologies/bibframe/ 44 | BIBLIOTEK-O: 45 | - http://bibliotek-o.org/1.1/ontology/ 46 | - http://bibliotek-o.org/ontology/ 47 | BIM: 48 | - http://cbakerlab.unbsj.ca/unbvps/BIM# 49 | - http://cbakerlab.unbsj.ca:8080/ontologies/BIM.owl# 50 | - http://cbakerlab.unbsj.ca:8080/sebi/BIM.owl# 51 | BIN: http://purl.bioontology.org/ontology/BIN/ 52 | BIRNLEX: http://bioontology.org/projects/ontologies/birnlex# 53 | BNO: http://www.owl-ontologies.com/Ontology1361987617.owl# 54 | BOF: http://www.owl-ontologies.com/BiodiversityOntologyFull.owl# 55 | BP: http://www.biopax.org/release/biopax-level3.owl# 56 | BRCT: 57 | - http://www.semanticweb.org/latitude_user/ontologies/2014/8/untitled-ontology-7# 58 | - http://www.semanticweb.org/ontologies/2009/9/Ontology1255357986125.owl# 59 | BRIDG: http://www.bridgmodel.org/owl# 60 | BRO: http://bioontology.org/ontologies/BiomedicalResourceOntology.owl# 61 | BRSO: 62 | - http://purl.jp/bio/10/brso/ 63 | - http://purl.org/brso/BiologicalResourceStatus# 64 | - http://purl.org/brso/BiologicalResourceType# 65 | BSAO: OBO:BSA_ 66 | BT: http://purl.org/biotop/biotop.owl# 67 | CABRO: http://www.semanticweb.org/dimitrios/ontologies/2013/2/untitled-ontology-2# 68 | CARELEX: http://www.CareLex.org/2012/carelex.owl# 69 | CARRE: 70 | - file:/Users/allanthird/Work/CARRE/CARREOntology/carre-ontology.xml# 71 | - file:/Users/allanthird/Work/CARRE/CARREOntology/carre-sensors.xml# 72 | CASE-BASE-ONTO: http://www.semanticweb.org/hsh/ontologies/2019/7/CBRDystempOnto# 73 | CCTOO: OBO:CCTO_ 74 | CDPEO: http://www.semanticweb.org/ontologies/chronic-diease-patient-education-ontology# 75 | CEDARVS: http://www.semanticweb.org/jgraybeal/ontologies/2015/7/cedarvaluesets# 76 | CHD: http://homes.esat.kuleuven.be/~bioiuser/chdwiki/index.php/CHD:CaseReport?id= 77 | CHEMINF: http://semanticscience.org/resource/CHEMINF_ 78 | CIDOC-CRM: http://www.cidoc-crm.org/cidoc-crm/ 79 | CKDO: http://clininf.eu/ckdo# 80 | CMDO: http://purl.bioontology.org/ontology/CMDO/ 81 | CMR-QA: http://www.semanticweb.org/ukbiobank/ocmr_isg/CMR-QA# 82 | CN: 83 | - http://mmisw.org/ont/Technology/ComputerNetworks/ 84 | - http://mmisw.org/ont/Technology/ComputerNetworks# 85 | CO-WHEAT: OBO:CO_321_ 86 | CODO: http://www.isibang.ac.in/ns/codo# 87 | COGAT: file:/srv/ncbo/repository/COGAT/8/ 88 | COGPO: 89 | - http://www.cogpo.org/ontologies/COGPO_ 90 | - http://www.cogpo.org/ontologies/CogPOver1.owl# 91 | - http://www.cogpo.org/ontologies/CogPOver2010.owl#COGPO_ 92 | COID: https://github.com/sap218/coid/blob/master/coid.owl# 93 | COKPME: http://www.iiitdwd.ac.in/ACB/COKPME# 94 | COMODI: http://purl.uni-rostock.de/comodi/comodi# 95 | COSTART: http://purl.bioontology.org/ontology/CST/ 96 | CPRO: http://purl.org/cpr/ 97 | CRISP: http://purl.bioontology.org/ontology/CSP/ 98 | CRYOEM: http://scipion.i2pc.es/ontology/CRYOEM_ 99 | CSSO: http://purl.jp/bio/11/csso/CSSO_ 100 | CU-VO: http://www.semanticweb.org/jdr2160/ontologies/2015/5/venom_ontology# 101 | CVAO: http://www.semanticweb.org/ontologies/2015/11/CVAO# 102 | CWD: http://www.semanticweb.org/jbagwell/ontologies/2017/9/untitled-ontology-6# 103 | CYTO: http://www.semanticweb.org/demetrios/ontologies/2014/5/ 104 | DATACITE: http://purl.org/spar/datacite/ 105 | DCM: http://dicom.nema.org/resources/ontology/DCM/ 106 | DEB: http://www.semanticweb.org/osnathakimi/ontologies/deb# 107 | DERMO: OBO:DERMO_ 108 | DFO: https://w3id.org/dfo/ 109 | DIAB: http://purl.bioontology.org/ontology/DIAB/ 110 | DIKB: http://purl.org/net/drug-interaction-knowledge-base/DIKB_evidence_ontology.owl# 111 | DISDRIV: OBO:DISDRIV_ 112 | DLO: https://w3id.org/dlo/ 113 | DLORO: http://www.semanticweb.org/alan/ontologies/2013/8/untitled-ontology-9# 114 | DOCCC: http://www.semanticweb.org/hll/ontologies/2013/8/untitled-ontology-2# 115 | DOID: http://purl.org/obo/owl/DOID# 116 | DOREMUS-KEYS: http://data.doremus.org/vocabulary/key/ 117 | DRANPTO: http://www.semanticweb.org/zhenyuzhang/ontologies/2019/8/nonpharmacological-intervention-for-agitation-in-dementia-ontology/ 118 | DREAMDNPTO: http://www.semanticweb.org/zhenyuzhang/ontologies/2021/DREAMDNPTO# 119 | DRPSNPTO: http://www.semanticweb.org/zhenyuzhang/ontologies/2020/DRPSNPTO/ 120 | DSEO: http://bigdatau.org/dseo# 121 | DTO: http://www.drugtargetontology.org/dto/DTO_ 122 | EBP: http://www.semanticweb.org/tswheeler/ontologies/2016/3/EmpowerBP# 123 | ECAO: OBO:ECAO_ 124 | ECP: http://iris.med.duth.gr/research/ecp/ontology/eCP.owl# 125 | ECG: http://www.cvrgrid.org/files/ECGOntologyv1.owl#ECG_ 126 | ECSO: http://purl.dataone.org/odo/ECSO_ 127 | EDAM: http://edamontology.org/ 128 | EFO: http://www.ebi.ac.uk/efo/EFO_ 129 | ELECTRICA: http://purl.org/ELECTRICA/ 130 | ELIG: http://www.semanticweb.org/ontologies/2012/8/Ontology1348158066194.owl# 131 | ELTER_CL: http://vocabs.lter-europe.net/eLTER_CL/ 132 | EMO: http://www.semanticweb.org/ontologies/2011/1/14/EMO.owl/ 133 | ENVS_VARIABLES: http://purl.org/m4m-dk-2/variables/ 134 | ENVTHES: http://vocabs.lter-europe.net/EnvThes/ 135 | EO: http://www.semanticweb.org/ethnicityOntology# 136 | EOL: http://purl.org/obo/owlEOL_ 137 | EP: http://www.cvrgrid.org/ontologies/Electrophysiology# 138 | EPIE: https://pat.nichd.nih.gov/patepigeneticentity/ 139 | EPILONT: http://www.semanticweb.org/ontologies/2009/3/EpilepsyOntology.owl# 140 | EPIO: https://bio.scai.fraunhofer.de/ontology/epilepsy# 141 | EPIP: https://pat.nichd.nih.gov/patepigeneticprocess/ 142 | EPISEM: http://www.semanticweb.org/danielhier/ontologies/2019/3/untitled-ontology-57/ 143 | EPO: http://www.semanticweb.org/ontologies/epo.owl# 144 | EPSO: http://www.case.edu/EpilepsyOntology.owl# 145 | ESSO: http://www.semanticweb.org/rjyy/ontologies/2015/5/ESSO# 146 | ETHANC: https://github.com/VODANA/Controlled-vocabulary/ethanc/ 147 | EXACT: http://www.owl-ontologies.com/Ontology1184060740.owl# 148 | EXTRACT: http://purl.org/extract/ 149 | FBbi: http://purl.org/obo/owl/FBbi#FBbi_ 150 | FCC1: http://www.semanticweb.org/diwaleva/ontologies/2019/9/fcc-ontology# 151 | FDC-GDMT: http://vocab.fairdatacollective.org/gdmt/ 152 | FG: https://w3id.org/fair-genomes/ontology/ 153 | FHHO: http://www.owl-ontologies.com/Ontology1172270693.owl# 154 | FIRE: http://cerrado.linkeddata.es/ecology/fire# 155 | FISH-AST: http://purl.org/heritagedata/schemes/560/concepts/ 156 | FISHO: 157 | - http://bioportal.bioontology.org/ontologies/FISHO# 158 | - http://mybiodiversityontologies.um.edu.my/FO.owl# 159 | FLYGLYCODB: http://www.flyglycodb.org/ontologies/2015/ 160 | FMA: 161 | - http://purl.org/sig/ont/fma/ 162 | - http://purl.org/obo/owlapi/fma# 163 | - http://sig.uw.edu/fma# 164 | GALEN: http://www.co-ode.org/ontologies/galen# 165 | GAMUTS: http://www.gamuts.net/entity# 166 | GBOL: http://gbol.life/0.1/ 167 | GCO: http://rdf.biosemantics.org/ontologies/genomecomponents# 168 | GECKO: OBO:GECKO_ 169 | GENE-CDS: http://www.genomic-cds.org/ont/genomic-cds.owl# 170 | GEOSPARQL: http://www.opengis.net/ont/geosparql# 171 | GEOSPECIES: 172 | - http://rdf.geospecies.org/ont/geospecies# 173 | - http://rdf.geospecies.org/ont/geospecies.owl# 174 | GFFO: https://raw.githubusercontent.com/mpievolbio-scicomp/GenomeFeatureFormatOntology/main/gffo# 175 | GFO: 176 | - http://www.onto-med.de/ontologies/gfo.owl# 177 | - http://www.onto-med.de/ontologies/gfo-basic.owl# 178 | GFO-BIO: http://onto.eva.mpg.de/ontologies/gfo-bio.owl# 179 | GFVO: https://www.codamono.com/biointerchange/gfvo# 180 | GLYCO: http://glycomics.ccrc.uga.edu/ontologies/GlycO# 181 | GLYCOCOO: http://purl.jp/bio/12/glyco/ 182 | GML: 183 | - http://www.opengis.net/ont/gml# 184 | - http://loki.cae.drexel.edu/~wbs/ontology/2004/09/ogc-gml# 185 | GMO: http://purl.jp/bio/10/gmo/GMO_ 186 | GNO: OBO:GNO_ 187 | GO: http://purl.org/obo/owl/GO#GO_ 188 | GRO: http://www.bootstrep.eu/ontology/GRO# 189 | GSSO: OBO:GSSO_ 190 | GVO: http://genome-variation.org/resource/gvo# 191 | HASCO: http://hadatac.org/ont/hasco/ 192 | HCDR: http://www.semanticweb.org/m14067/ontologies/2020/0/untitled-ontology-5# 193 | HCPCS: http://purl.bioontology.org/ontology/HCPCS/ 194 | HEIO: http://whistl.uwaterloo.ca/heio.owl# 195 | HFO: http://bmi.utah.edu/ontologies/hfontology/ 196 | HGNC: 197 | - http://ncicb.nci.nih.gov/xml/owl/EVS/Hugo.owl#HGNC_ 198 | - OBO:HGNC_ 199 | HIVO0004: http://bioportal/bioontology.org/ontologies/HIVO0004# 200 | HL7: http://purl.bioontology.org/ontology/HL7/ 201 | HLA: http://purl.org/stemnet/HLA# 202 | HMIS033B: http://vocab.vodana.org/hmis033b/ 203 | HNS: http://www.humannervousystem.org/KAnOE/2014/dave86# 204 | HRDO: http://www.limics.org/hrdo/HRDO.owl# 205 | HSO: https://w3id.org/hso# 206 | HUPSON: http://scai.fraunhofer.de/HuPSON# 207 | I2SV: https://i2insights.org/index/integration-and-implementation-sciences-vocabulary# 208 | I-ADOPT: https://w3id.org/iadopt/ont/ 209 | IAML-MOP: http://data.doremus.org/vocabulary/iaml/mop/ 210 | IBO: http://www.semanticweb.org/eamdouni/ontologies/2015/5/IBO# 211 | ICD10: 212 | - http://purl.bioontology.org/ontology/ICD10/ 213 | - https://cdn.rawgit.com/laiasubirats/rarediseasesontology/master/ICD10_1.0.owl# 214 | ICD10CM: http://purl.bioontology.org/ontology/ICD10CM/ 215 | ICD10PCS: http://purl.bioontology.org/ontology/ICD10PCS/ 216 | ICD11-BODYSYSTEM: http://who.int/bodysystem.owl# 217 | ICD9CM: http://purl.bioontology.org/ontology/ICD9CM/ 218 | ICECI: 219 | - http://who.int/iceci# 220 | - http://who.int/iceci.owl# 221 | ICF: http://who.int/icf# 222 | ICNP: http://www.icn.ch/icnp# 223 | ICPC2P: http://purl.bioontology.org/ontology/ICPC2P/ 224 | ICPS: http://www.ICPS/ontologies/ 225 | ID-AMR: http://purl.org/zonmw/id-amr/ 226 | IDEM: http://purl.org/idem/ 227 | IDG_GL: http://druggablegenome.net/ 228 | IDODEN: http://purl.bioontology.org/ontology/IDODEN_ 229 | IMGT-ONTOLOGY: http://www.imgt.org/download/IMGT-ONTOLOGY/IMGT-ONTOLOGY-v1-0-3.owl# 230 | INBIO: http://www.semanticweb.org/rs/ontologies/INBIO# 231 | INBIODIV: http://www.semanticweb.org/mca/ontologies/2018/8/untitled-ontology-47# 232 | INCENTIVE: http://purl.org/incentive/ 233 | INCENTIVE-VARS: http://purl.org/incentive/variables/ 234 | INFRARISK: https://www.infrarisk-fp7.eu/vocabs/# 235 | INSECTH: http://neuromorpho.org/ontologies/insectH.owl# 236 | INSNAME: https://www.vodan-totafrica.info/vocs/institutions/ 237 | INTO: http://www.semanticweb.org/Terrorism# 238 | INVERSEROLES: http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003# 239 | IRD: http://www.semanticweb.org/msh/ontologies/2019/9/untitled-ontology-3# 240 | IRDG: http://www.semanticweb.org/IRDGuyamazon# 241 | ISO-15926-2_2003: http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003# 242 | ISO19108TO: http://def.isotc211.org/iso19108/2006/ 243 | ISO19110: http://def.isotc211.org/iso19110/2005/ 244 | ISO19115: http://loki.cae.drexel.edu/~wbs/ontology/2004/09/iso-19115# 245 | ISO19115CC: http://def.isotc211.org/iso19115/-1/2014/CommonClasses/code/ 246 | ISO19115ID: http://def.isotc211.org/iso19115/2003/ 247 | ISO19115PR: 248 | - http://www.geosciml.org/vocabularies/iso-19115-codelists.owl# 249 | - http://www.geosciml.org/vocabularies/iso-19115-codes.owl# 250 | ISSVA: http://purl.bioontology.org/ontology/ISSVA/ 251 | IntAct: http://identifiers.org/intact/ 252 | JERM: http://jermontology.org/ontology/JERMOntology# 253 | KISAO: http://www.biomodels.net/kisao/KISAO#KISAO_ 254 | KORO: 255 | - http://www.knowledgegrid.org/koro# 256 | - http://www.knowledgegrid.org/koro/1.0.0/koro.owl# 257 | LAND-SURFACE: http://anzsoil.org/def/au/asls/land-surface/ 258 | LANDFORM: http://anzsoil.org/def/au/asls/landform/ 259 | LDA: http://www.semanticweb.org/ontologies/2008/10/languageacquisition_autism.owl# 260 | LEGALAPA: http://www.semanticweb.org/ontologies/2014/11/legal.owl# 261 | LEGALAPATEST2: http://www.semanticweb.org/ontologies/2014/11/legal-2.owl# 262 | LICO: http://vavlab.ee.boun.edu.tr/carera/khaos/lico.owl# 263 | LOINC: http://purl.bioontology.org/ontology/LNC/ 264 | LONGCOVID: http://www.semanticweb.org/orchid/ontologies/2021/Long-Covid-Phenotype-Ontology# 265 | LUNGMAP_H_CELL: OBO:LMHA_ 266 | LUNGMAP_M_CELL: OBO:LMMA_ 267 | M4M19-SUBS: http://purl.org/m4m19/subjects/ 268 | M4M19-VARS: http://purl.org/m4m19/variables# 269 | MATRELEMENT: http://sweet.jpl.nasa.gov/2.3/matrElement.owl# 270 | MATRROCK: http://sweet.jpl.nasa.gov/2.3/matrRock.owl# 271 | MATRROCKIGNEOUS: http://sweet.jpl.nasa.gov/2.3/matrRockIgneous.owl# 272 | MCBCC: OBO:MCBCC_ 273 | MCCL: 274 | - http://purl.bioontology.org/ontology/MCCL/CL__ 275 | - http://www.semanticweb.org/pallabi.d/ontologies/2014/2/untitled-ontology-11# 276 | MDDB: http://purl.bioontology.org/ontology/MDDB/ 277 | MEDLINEPLUS: http://purl.bioontology.org/ontology/MEDLINEPLUS/ 278 | MEDO: 279 | - http://www.ebi.ac.uk/efo/medo/MEDO_ 280 | - http://www.ebi.ac.uk/medo/ 281 | MEO: http://purl.jp/bio/11/meo/ 282 | MESH: http://purl.bioontology.org/ontology/MESH/ 283 | MHC: http://purl.org/stemnet/MHC# 284 | MIM: http://purl.bioontology.org/ontology/MIM# 285 | MIRO: OBO:miro# 286 | MIXS: 287 | - https://w3id.org/mixs/terms/ 288 | - https://w3id.org/mixs/vocab/ 289 | MOC: http://sweet.jpl.nasa.gov/2.3/matrOrganicCompound.owl# 290 | MODSCI: https://w3id.org/skgo/modsci# 291 | MONO: http://www.owl-ontologies.com/MO.owl# 292 | MOSAIC: https://purl.dataone.org/odo/MOSAIC_ 293 | MSO: http://scai.fraunhofer.de/MSOntology# 294 | MSTDE: http://purl.bioontology.org/ontology/MSTDE/ 295 | MSTDE-FRE: http://purl.bioontology.org/ontology/MSTDE-FRE/ 296 | MSV: http://purl.jp/bio/11/msv/ 297 | NCBIGene: 298 | - http://identifiers.org/ncbigene/ 299 | - OBO:NCBIGene_ 300 | NCBITAXON: 301 | - http://purl.bioontology.org/ontology/NCBITAXON/ 302 | - http://www.ncbi.nlm.nih.gov/taxonomy/ 303 | - OBO:NCBITAXON_ 304 | NCCNEHR: http://www.semanticweb.org/lamb/ontologies/NCCN-EHR# 305 | NCCO: http://www.semanticweb.org/vanessa/ontologies/2012/7/untitled-ontology-33# 306 | NCIT: http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl# 307 | NDDF: http://purl.bioontology.org/ontology/NDDF/ 308 | NDDO: http://www.purl.org/NDDO/ 309 | NDFRT: 310 | - http://purl.bioontology.org/ontology/NDFRT/ 311 | - http://evs.nci.nih.gov/ftp1/NDF-RT/NDF-RT.owl# 312 | NEICBEER: http://ontology.deic.dk/cv/beer-ontology/ 313 | NEOMARK3: http://www.neomark.eu/ontologies/ 314 | NEOMARK4: http://neomark.owl# 315 | NEUDIGS: http://bmkeg.isi.edu/neuDIGs# 316 | NEUMORE: http://neumore.cis.usouthal.edu/ontologies/NeuMORE-v0.1.owl# 317 | NIFCELL: http://ontology.neuinfo.org/NIF/BiomaterialEntities/NIF-Cell.owl# 318 | NIHSS: https://mre.zcu.cz/ontology/nihss.owl# 319 | NMOBR: http://neuromorpho.org/ontologies/NMOSp.owl# 320 | NMR: http://nmrML.org/nmrCV# 321 | NPI: http://purl.bioontology.org/ontology/NPI# 322 | NPO: http://purl.bioontology.org/ontology/npo# 323 | OA: http://www.w3.org/ns/oa# 324 | OBOE: http://ecoinformatics.org/oboe/oboe.1.2/ 325 | OBOREL: 326 | - http://www.obofoundry.org/ro/ro.owl# 327 | - OBO:OBO_REL#_ 328 | OBS: http://www.semanticweb.org/bito2/ontologies/2021/3/untitled-ontology-11# 329 | OCIMIDO: https://github.com/sap218/ocimido/blob/master/ontology/ocimido.owl# 330 | OCRE: http://purl.org/net/OCRe/ 331 | OGR: http://www.owl-ontologies.com/GeographicalRegion.owl# 332 | OGROUP: http://protozoadb.biowebdb.org/22/ogroup# 333 | OM: http://www.ontology-of-units-of-measure.org/resource/ 334 | OMIM: 335 | - http://purl.bioontology.org/ontology/OMIM/ 336 | - http://identifiers.org/omim/ 337 | OMV: http://omv.ontoware.org/2005/05/ontology# 338 | ONL-DP: http://neurolog.unice.fr/ontoneurolog/v3.0/ontoneurolog-dataset-processing.owl# 339 | ONL-TASKS: http://www.semanticweb.org/bakaev/ontologies/2020/3/untitled-ontology-25# 340 | ONLIRA: http://vavlab.ee.boun.edu.tr/carera/onlira.owl# 341 | ONSTR: http://onstr.googlecode.com/svn/tags/currentRelease/2014-09-03/ONSTR.owl#ONSTR_ 342 | ONTOAD: http://doe-generated-ontology.com/OntoAD# 343 | ONTODM: 344 | - http://www.ontodm.com/OntoDM-core/OntoDM_ 345 | - http://kt.ijs.si/panovp/OntoDM#OntoDM_ 346 | ONTODT: 347 | - http://ontodm.com/OntoDT# 348 | - http://www.ontodm.com/OntoDT# 349 | ONTOLURGENCES: http://www.limics.fr/ontologies/ontolurgences# 350 | ONTOPBM: http://w3id.org/ontopbm#OntoPBM_ 351 | ONTOPNEUMO: http://doe-generated-ontology.com/OntoPneumo# 352 | ONTOSIM: http://www.semanticweb.org/DIASUS/OntoSIM# 353 | ONTOSINASC: http://www.semanticweb.org/DIASUS/OntoSINASC# 354 | ONTOTOX: http://OntoTox.owl# 355 | OOEVV: http://bmkeg.isi.edu/ooevv/ 356 | OPB: 357 | - http://bhi.washington.edu/OPB#OPB_ 358 | - http://bhi.washington.edu/OPB## 359 | OPDE: http://www.mudhc.edu.et/template-vocabulary# 360 | OPE: http://www.semanticweb.org/ontologies/2013/2/OPE.owl# 361 | OPTION-ONTOLOGY: http://w3id.org/ontoopt/ 362 | ORCS: OBO:ORCS_ 363 | ORTH: http://purl.org/net/orth# 364 | OSM: https://saudeconectada.org/saude_mental.owl# 365 | PANDA: http://purl.bioontology.org/net/brunel/panda# 366 | PANET: http://purl.org/pan-science/PaNET/ 367 | PATCT: https://pat.nichd.nih.gov/placentalcelltype/ 368 | PATEL: http://www.semanticweb.org/ambrish/ontologies/2020/10/untitled-ontology-24# 369 | PATGV: https://pat.nichd.nih.gov/patgeneticvariance/ 370 | PATHLEX: http://www.semanticweb.org/david/ontologies/2013/0/pathLex.owl# 371 | PATIT: https://pat.nichd.nih.gov/patinvestigativetechniques/ 372 | PATMHC: http://pat.nichd.nih.gov/maternalconditions/ 373 | PATO: http://purl.obolibrary.org/obo/PATO_ 374 | PCALION: http://www.semanticweb.org/ontologies/Prostate_cancer# 375 | PDO: http://purl.jp/bio/11/pdo/ 376 | PDON: http://www.semanticweb.org/ontologies/2011/1/Ontology1296772722296.owl# 377 | PDQ: http://purl.bioontology.org/ontology/PDQ/ 378 | PDRO: OBO:PDRO/PDRO.owl# 379 | PDUMDV: OBO:PdumDv_ 380 | PE: http://bmi.utah.edu/ontologies/peontology/ 381 | PE-O: 382 | - http://www.pepathway.org/peo/1.2# 383 | - http://www.pepathway.org/peo/1.1# 384 | PEDTERM: http://www.owl-ontologies.com/Ontology1358660052.owl# 385 | PEO: http://knoesis.wright.edu/ParasiteExperiment.owl# 386 | PESONT: http://www.semanticweb.org/patienceusip/ontologies/2021/7/untitled-ontology-23# 387 | PGXO: http://pgxo.loria.fr/ 388 | PHENX: http://purl.bioontology.org/ontology/phenX/ 389 | PHYLONT: http://www.semanticweb.org/ontologies/2011/7/Ontology1314368515010.owl# 390 | PIERO: http://reactionontology.org/piero/ 391 | PLIO: http://www.semanticweb.org/ontologies/2010/3/Ontology1271664172453.owl# 392 | PLOSTHES: http://localhost/plosthes.2017-1# 393 | PMD: http://www.onto-med.de/ontologies/gfo-persian-medicine-diseases.owl# 394 | PMDO: http://www.case.edu/PMDO# 395 | PMO: http://performedmusicontology.org/ontology/ 396 | PMO-SPEED: http://performedmusicontology.org/ontologies/vocabularies/playing_speed/ 397 | PMR: http://purl.bioontology.org/ontology/PMR.owl# 398 | PP: https://bitbucket.org/PlantExpAssay/ontology/raw/v0.1/PipelinePatterns.owl#P 399 | PR: OBO:pr# 400 | PREGONTO: http://www.clininf.eu/pregnancy# 401 | PREO: http://presence-ontology.org/ontology// 402 | PROCCHEMICAL: http://sweet.jpl.nasa.gov/2.3/propChemical.owl# 403 | PROJ: http://linked.data.gov.au/def/project/ 404 | PROPREO: http://lsdis.cs.uga.edu/projects/glycomics/propreo# 405 | PROVO: 406 | - http://www.w3.org/ns/prov-o# 407 | - http://www.w3.org/ns/prov-o-20130312# 408 | PSO_2: http://ontorion.com/PSO# 409 | QUDT: 410 | - http://qudt.org/schema/ 411 | - http://qudt.org/2.1/schema/ 412 | RADLEX: 413 | - http://radlex.org/RID/ 414 | - http://www.radlex.org/RID/ 415 | RADXTT-MVREASONS: https://radx.orgx/vocs/missing-value-reason/ 416 | RCD: http://purl.bioontology.org/ontology/RCD/ 417 | RCTONT: http://www.owl-ontologies.com/RCTOntology.owl# 418 | RCTV2: http://purl.bioontology.org/ontology/RCTV2/ 419 | RDA-CONTENT: http://rdaregistry.info/termList/RDAContentType# 420 | REPO: http://purl.bioontology.org/ontology/REPO.owl# 421 | RH-MESH: http://phenomebrowser.net/ontologies/mesh/mesh.owl# 422 | RO: http://www.radiomics.org/RO/ 423 | ROLEO: OBO:RoleO_ 424 | ROO: http://www.cancerdata.org/roo/ 425 | ROS: urn:absolute:RadiationOncologyStructuresOntology# 426 | RPO: http://www.semanticweb.org/ontologies/2012/5/Ontology1338526551855.owl# 427 | RSA: http://rdf.biosemantics.org/ontologies/rsa# 428 | RVO: http://w3id.org/rv-ontology# 429 | SAO: http://ccdb.ucsd.edu/SAO/1.2# 430 | SARSMUTONTO: file://C/Users/Jamal/Desktop/SARSMutOnto.owl# 431 | SBO: 432 | - http://purl.bioontology.org/ontology/SBO/SBO_ 433 | - http://biomodels.net/SBO/SBO_ 434 | SBOL: OBO:SBOL_ 435 | SCHEMA: 436 | - http://schema.org/ 437 | - http://meta.schema.org/ 438 | - http://www.w3.org/wiki/WebSchemas/ 439 | - https://www.w3.org/wiki/WebSchemas/ 440 | SCIO: http://psink.de/scio/ 441 | SD3: http://www.wiser.pitt.edu/ontologies/SimulationScenarioDeviations.owl# 442 | SDO: http://mimi.case.edu/ontologies/2009/1/SDO.owl# 443 | SEDI: http://semantic-dicom.org/dcm# 444 | SENSO: http://purl.dataone.org/odo/SENSO_ 445 | SEQ: http://www.ontologydesignpatterns.org/cp/owl/sequence.owl# 446 | SHR: http://www.shojaee.com/shr/shr.owl# 447 | SITBAC: http://www.semanticweb.org/ontologies/2008/1/Ontology1204037102846.owl# 448 | SK: http://www.semanticweb.org/sandeepak/digitalforensic# 449 | SMASH: 450 | - http://aimlab.cs.uoregon.edu/smash/ontologies/smash-ontology# 451 | - http://aimlab.cs.uoregon.edu/smash/ontologies/biomarker.owl# 452 | - http://aimlab.cs.uoregon.edu/smash/ontologies/physical-activity.owl# 453 | - http://aimlab.cs.uoregon.edu/smash/ontologies/social-activity.owl# 454 | SNMI: http://purl.bioontology.org/ontology/SNMI/ 455 | SNOMEDCT: http://purl.bioontology.org/ontology/SNOMEDCT/ 456 | SNPO: http://www.loria.fr/~coulet/ontology/snpontology/version1.6/snpontology_full.owl# 457 | SO: http://purl.org/obo/owl/SO#SO_ 458 | SOCPRES: http://www.semanticweb.org/social-prescribing# 459 | SOPHARM: http://www.loria.fr/~coulet/sopharm/SOPHARM_ 460 | SOY: OBO:SOY_ 461 | SP: http://purl.org/net/SMARTprotocol# 462 | SPO: 463 | - http://www.semanticweb.org/ontologies/2008/8/MultiscaleSkinPhysiologyOntology.owl# 464 | - http://www.semanticweb.org/ontologies/2008/8/SPO_lightweight_merged.owl# 465 | SPTO: OBO:SP_ 466 | SSN: http://www.w3.org/ns/ssn/ 467 | SSO: 468 | - http://surveillance.mcgill.ca/sso/syndromes.owl# 469 | - http://www.medicine.mcgill.ca/epidemiology/buckeridge/syndromes.owl# 470 | STMSO: https://bioportal.bioontology.org/ontologies/STMSO# 471 | STY: http://purl.bioontology.org/ontology/STY/ 472 | SURGICAL: http://www.cablesat.com.au/research/ 473 | SWEET: http://sweetontology.net/ 474 | SWO: 475 | - http://www.ebi.ac.uk/swo/SWO_ 476 | - http://www.ebi.ac.uk/efo/swo/SWO_ 477 | - http://www.ebi.ac.uk/swo/algorithm/SWO_ 478 | - http://www.ebi.ac.uk/swo/data/SWO_ 479 | - http://www.ebi.ac.uk/swo/interface/SWO_ 480 | - http://www.ebi.ac.uk/swo/license/SWO_ 481 | - http://www.ebi.ac.uk/swo/objective/SWO_ 482 | - http://www.ebi.ac.uk/swo/organization/SWO_ 483 | - http://www.ebi.ac.uk/swo/version/SWO_ 484 | TAXRANK: OBO:taxrank.owl# 485 | TCDO: http://OntoTCM.org.cn/ontologies/TCDO_ 486 | TCO: http://www.semanticweb.org/hx-jta/ontologies/thyroid_cancer_ontology# 487 | TDWGSPEC: http://rs.tdwg.org/ontology/voc/Specimen# 488 | TEDDY: http://identifiers.org/teddy/TEDDY_ 489 | TEO: http://informatics.mayo.edu/TEO.owl#TEO_ 490 | TESTEX: https://bioportal.databiology.com/test1.owl# 491 | TIME: http://www.w3.org/2006/time# 492 | TIMEBANK: https://w3id.org/timebank# 493 | TM-CONST: http://who.int/ictm/constitution# 494 | TM-MER: http://who.int/ictm/meridians# 495 | TM-SIGNS-AND-SYMPTS: http://who.int/ictm/signsAndSymptoms# 496 | TMA: http://bioontology.org/ontologies/tma-minimal# 497 | TMO: http://www.w3.org/2001/sw/hcls/ns/transmed/ 498 | TOK: http://cui.unige.ch/isi/onto/tok/TOK.owl# 499 | TOP-MENELAS: http://www.limics.fr/ontologies/menelastop# 500 | TRAK: OBO:TRAK_ 501 | TRIAGE: http://www.semanticweb.org/philshields/ontologies/2015/4/untitled-ontology-59# 502 | TRON: OBO:TrOn_ 503 | TXPO: OBO:TXPO_ 504 | TYPON: http://purl.phyloviz.net/ontology/typon# 505 | UMMS: https://w3id.org/umms/ekg/onto01/ 506 | UNITSONT: http://mimi.case.edu/ontologies/2009/1/UnitsOntology# 507 | UPA: OBO:UPa_ 508 | VANDF: http://purl.bioontology.org/ontology/VANDF/ 509 | VARIO: OBO:VariO_ 510 | VDOT: http://www.ifomis.org/vdot/vdot_core.owl#vdot_ 511 | VEO: http://sbmi.uth.tmc.edu/ontology/VEO# 512 | VIDO: OBO:VIDO_ 513 | VODANADISEASES: http://vocab.vodan-totafrica.info/vodana-terms/vdiseases/ 514 | VODANAMFLCODE: http://vocab.vodana.org/vmfl/ 515 | WB-LS: OBO:WBls_ 516 | WC: OBO:WC_ 517 | WEAR: http://purl.org/wear/ 518 | WEAVE: http://purl.org/weave/ 519 | WETAXTOPICS: http://purl.org/neat/ 520 | WIKIPATHWAYS: 521 | - http://vocabularies.wikipathways.org/wp# 522 | - http://vocabularies.wikipathways.org/wpTypes# 523 | WSIO: 524 | - OBO:WSIO_ 525 | - OBO:http://wsio.org# 526 | XEO: OBO:XEO_ 527 | XLMOD: OBO:XLMOD_ 528 | XPO: OBO:XPO_ 529 | XREF-FUNDER-REF: http://data.crossref.org/fundingdata/vocabulary/Label- 530 | ZONMW-ADMIN-MD: http://www.fair-data-collective.com/zonmw/projectadmin/ 531 | ZONMW-CONTENT: http://purl.org/zonmw/covid19/ 532 | ZONMW-GENERIC: http://purl.org/zonmw/generic/ 533 | araport: OBO:Araport_ 534 | cgnc: OBO:CGNC_ 535 | ensembl.bacteria: OBO:EnsemblBacteria#_ 536 | -------------------------------------------------------------------------------- /src/prefixmaps/data/bioportal.csv: -------------------------------------------------------------------------------- 1 | context,prefix,namespace,status 2 | bioportal,ABD,http://brd.bsvgateway.org/api/,canonical 3 | bioportal,ACESO,http://www.semanticweb.org/cbmi/ontologies/2018/10/aceso#,canonical 4 | bioportal,ACGT-MO,http://www.ifomis.org/acgt/1.0#,canonical 5 | bioportal,AD-DROP,http://www.semanticweb.org/AD-DROP#,canonical 6 | bioportal,ADALAB-META,http://rdf.adalab-project.org/ontology/adalab-meta/,canonical 7 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/autism-core.owl#,canonical 8 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/CA_ADOS1-2001.owl#,prefix_alias 9 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/Interests_and_behaviors_phenotype#,prefix_alias 10 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/assessment-result.owl#,prefix_alias 11 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/autism-merged.owl#,prefix_alias 12 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/autism-rules.owl#,prefix_alias 13 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/ca_adi-2003.owl#,prefix_alias 14 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/ca_ados4_2001.owl#,prefix_alias 15 | bioportal,ADAR,http://purl.org/autism-ontology/1.0/ca_vinelandsurvey-2005.owl#,prefix_alias 16 | bioportal,ADCAD,https://purl.dataone.org/odo/ADCAD_,canonical 17 | bioportal,ADHER_INTCARE_EN,http://www.semanticweb.org/parracarlos/ontologies/2019/3/untitled-ontology-31#,canonical 18 | bioportal,ADMO,http://www.semanticweb.org/ADMO#,canonical 19 | bioportal,ADO,http://scai.fraunhofer.de/AlzheimerOntology#,canonical 20 | bioportal,AGROCYMAC,http://www.semanticweb.org/yali/ontologies/2019/0/cultivos#,canonical 21 | bioportal,AGROMOP,http://www.semanticweb.org/vera/ontologies/2020/1/untitled-ontology-5#,canonical 22 | bioportal,AHOL,http://opendata.inra.fr/AHOL/AHOL_,canonical 23 | bioportal,AHSO,https://w3id.org/ahso#,canonical 24 | bioportal,AIRBUS,http://protege.stanford.edu/thesauri/aero/,canonical 25 | bioportal,AISM,OBO:AISM_,canonical 26 | bioportal,AMINO-ACID,http://www.co-ode.org/ontologies/amino-acid/2006/05/18/amino-acid.owl#,canonical 27 | bioportal,AO,http://childhealthservicemodels.eu/asthma#,canonical 28 | bioportal,APAOCUEMPLOY,http://www.semanticweb.org/ontologies/2015/0/ocupationalemploymentcluster.owl#,canonical 29 | bioportal,APATREATMENT,http://www.semanticweb.org/ontologies/2015/0/treatmentcluster.owl#,canonical 30 | bioportal,araport,OBO:Araport_,canonical 31 | bioportal,ARCRC,http://purl.dataone.org/odo/ARCRC_,canonical 32 | bioportal,ASDPTO,http://cbmi.med.harvard.edu/asdphenotype#,canonical 33 | bioportal,ASPECT,http://purl.org/aspect/,canonical 34 | bioportal,ATC,http://purl.bioontology.org/ontology/ATC/,canonical 35 | bioportal,ATOL,http://opendata.inra.fr/ATOL/ATOL_,canonical 36 | bioportal,AURA,http://www.projecthalo.com/aura#,canonical 37 | bioportal,BAO,http://www.bioassayontology.org/bao#BAO_,canonical 38 | bioportal,BCI-O,https://w3id.org/BCI-ontology#,canonical 39 | bioportal,BCTT,http://purl.bioontology.org/ontology/BCTT#,canonical 40 | bioportal,BFO,http://www.ifomis.org/bfo/1.1/snap#,canonical 41 | bioportal,BHN,http://chu-rouen.fr/cismef/BHN#,canonical 42 | bioportal,BIBFRAME,http://id.loc.gov/ontologies/bibframe/,canonical 43 | bioportal,BIBLIOTEK-O,http://bibliotek-o.org/1.1/ontology/,canonical 44 | bioportal,BIBLIOTEK-O,http://bibliotek-o.org/ontology/,prefix_alias 45 | bioportal,BIM,http://cbakerlab.unbsj.ca/unbvps/BIM#,canonical 46 | bioportal,BIM,http://cbakerlab.unbsj.ca:8080/ontologies/BIM.owl#,prefix_alias 47 | bioportal,BIM,http://cbakerlab.unbsj.ca:8080/sebi/BIM.owl#,prefix_alias 48 | bioportal,BIN,http://purl.bioontology.org/ontology/BIN/,canonical 49 | bioportal,BIRNLEX,http://bioontology.org/projects/ontologies/birnlex#,canonical 50 | bioportal,BNO,http://www.owl-ontologies.com/Ontology1361987617.owl#,canonical 51 | bioportal,BOF,http://www.owl-ontologies.com/BiodiversityOntologyFull.owl#,canonical 52 | bioportal,BP,http://www.biopax.org/release/biopax-level3.owl#,canonical 53 | bioportal,BRCT,http://www.semanticweb.org/latitude_user/ontologies/2014/8/untitled-ontology-7#,canonical 54 | bioportal,BRCT,http://www.semanticweb.org/ontologies/2009/9/Ontology1255357986125.owl#,prefix_alias 55 | bioportal,BRIDG,http://www.bridgmodel.org/owl#,canonical 56 | bioportal,BRO,http://bioontology.org/ontologies/BiomedicalResourceOntology.owl#,canonical 57 | bioportal,BRSO,http://purl.jp/bio/10/brso/,canonical 58 | bioportal,BRSO,http://purl.org/brso/BiologicalResourceStatus#,prefix_alias 59 | bioportal,BRSO,http://purl.org/brso/BiologicalResourceType#,prefix_alias 60 | bioportal,BSAO,OBO:BSA_,canonical 61 | bioportal,BT,http://purl.org/biotop/biotop.owl#,canonical 62 | bioportal,CABRO,http://www.semanticweb.org/dimitrios/ontologies/2013/2/untitled-ontology-2#,canonical 63 | bioportal,CARELEX,http://www.CareLex.org/2012/carelex.owl#,canonical 64 | bioportal,CARRE,file:/Users/allanthird/Work/CARRE/CARREOntology/carre-ontology.xml#,canonical 65 | bioportal,CARRE,file:/Users/allanthird/Work/CARRE/CARREOntology/carre-sensors.xml#,prefix_alias 66 | bioportal,CASE-BASE-ONTO,http://www.semanticweb.org/hsh/ontologies/2019/7/CBRDystempOnto#,canonical 67 | bioportal,CCTOO,OBO:CCTO_,canonical 68 | bioportal,CDPEO,http://www.semanticweb.org/ontologies/chronic-diease-patient-education-ontology#,canonical 69 | bioportal,CEDARVS,http://www.semanticweb.org/jgraybeal/ontologies/2015/7/cedarvaluesets#,canonical 70 | bioportal,cgnc,OBO:CGNC_,canonical 71 | bioportal,CHD,http://homes.esat.kuleuven.be/~bioiuser/chdwiki/index.php/CHD:CaseReport?id=,canonical 72 | bioportal,CHEMINF,http://semanticscience.org/resource/CHEMINF_,canonical 73 | bioportal,CIDOC-CRM,http://www.cidoc-crm.org/cidoc-crm/,canonical 74 | bioportal,CKDO,http://clininf.eu/ckdo#,canonical 75 | bioportal,CMDO,http://purl.bioontology.org/ontology/CMDO/,canonical 76 | bioportal,CMR-QA,http://www.semanticweb.org/ukbiobank/ocmr_isg/CMR-QA#,canonical 77 | bioportal,CN,http://mmisw.org/ont/Technology/ComputerNetworks/,canonical 78 | bioportal,CN,http://mmisw.org/ont/Technology/ComputerNetworks#,prefix_alias 79 | bioportal,CO-WHEAT,OBO:CO_321_,canonical 80 | bioportal,CODO,http://www.isibang.ac.in/ns/codo#,canonical 81 | bioportal,COGAT,file:/srv/ncbo/repository/COGAT/8/,canonical 82 | bioportal,COGPO,http://www.cogpo.org/ontologies/COGPO_,canonical 83 | bioportal,COGPO,http://www.cogpo.org/ontologies/CogPOver1.owl#,prefix_alias 84 | bioportal,COGPO,http://www.cogpo.org/ontologies/CogPOver2010.owl#COGPO_,prefix_alias 85 | bioportal,COID,https://github.com/sap218/coid/blob/master/coid.owl#,canonical 86 | bioportal,COKPME,http://www.iiitdwd.ac.in/ACB/COKPME#,canonical 87 | bioportal,COMODI,http://purl.uni-rostock.de/comodi/comodi#,canonical 88 | bioportal,COSTART,http://purl.bioontology.org/ontology/CST/,canonical 89 | bioportal,CPRO,http://purl.org/cpr/,canonical 90 | bioportal,CRISP,http://purl.bioontology.org/ontology/CSP/,canonical 91 | bioportal,CRYOEM,http://scipion.i2pc.es/ontology/CRYOEM_,canonical 92 | bioportal,CSSO,http://purl.jp/bio/11/csso/CSSO_,canonical 93 | bioportal,CU-VO,http://www.semanticweb.org/jdr2160/ontologies/2015/5/venom_ontology#,canonical 94 | bioportal,CVAO,http://www.semanticweb.org/ontologies/2015/11/CVAO#,canonical 95 | bioportal,CWD,http://www.semanticweb.org/jbagwell/ontologies/2017/9/untitled-ontology-6#,canonical 96 | bioportal,CYTO,http://www.semanticweb.org/demetrios/ontologies/2014/5/,canonical 97 | bioportal,DATACITE,http://purl.org/spar/datacite/,canonical 98 | bioportal,DCM,http://dicom.nema.org/resources/ontology/DCM/,canonical 99 | bioportal,DEB,http://www.semanticweb.org/osnathakimi/ontologies/deb#,canonical 100 | bioportal,DERMO,OBO:DERMO_,canonical 101 | bioportal,DFO,https://w3id.org/dfo/,canonical 102 | bioportal,DIAB,http://purl.bioontology.org/ontology/DIAB/,canonical 103 | bioportal,DIKB,http://purl.org/net/drug-interaction-knowledge-base/DIKB_evidence_ontology.owl#,canonical 104 | bioportal,DISDRIV,OBO:DISDRIV_,canonical 105 | bioportal,DLO,https://w3id.org/dlo/,canonical 106 | bioportal,DLORO,http://www.semanticweb.org/alan/ontologies/2013/8/untitled-ontology-9#,canonical 107 | bioportal,DOCCC,http://www.semanticweb.org/hll/ontologies/2013/8/untitled-ontology-2#,canonical 108 | bioportal,DOID,http://purl.org/obo/owl/DOID#,canonical 109 | bioportal,DOREMUS-KEYS,http://data.doremus.org/vocabulary/key/,canonical 110 | bioportal,DRANPTO,http://www.semanticweb.org/zhenyuzhang/ontologies/2019/8/nonpharmacological-intervention-for-agitation-in-dementia-ontology/,canonical 111 | bioportal,DREAMDNPTO,http://www.semanticweb.org/zhenyuzhang/ontologies/2021/DREAMDNPTO#,canonical 112 | bioportal,DRPSNPTO,http://www.semanticweb.org/zhenyuzhang/ontologies/2020/DRPSNPTO/,canonical 113 | bioportal,DSEO,http://bigdatau.org/dseo#,canonical 114 | bioportal,DTO,http://www.drugtargetontology.org/dto/DTO_,canonical 115 | bioportal,EBP,http://www.semanticweb.org/tswheeler/ontologies/2016/3/EmpowerBP#,canonical 116 | bioportal,ECAO,OBO:ECAO_,canonical 117 | bioportal,ECG,http://www.cvrgrid.org/files/ECGOntologyv1.owl#ECG_,canonical 118 | bioportal,ECP,http://iris.med.duth.gr/research/ecp/ontology/eCP.owl#,canonical 119 | bioportal,ECSO,http://purl.dataone.org/odo/ECSO_,canonical 120 | bioportal,EDAM,http://edamontology.org/,canonical 121 | bioportal,EFO,http://www.ebi.ac.uk/efo/EFO_,canonical 122 | bioportal,ELECTRICA,http://purl.org/ELECTRICA/,canonical 123 | bioportal,ELIG,http://www.semanticweb.org/ontologies/2012/8/Ontology1348158066194.owl#,canonical 124 | bioportal,ELTER_CL,http://vocabs.lter-europe.net/eLTER_CL/,canonical 125 | bioportal,EMO,http://www.semanticweb.org/ontologies/2011/1/14/EMO.owl/,canonical 126 | bioportal,ensembl.bacteria,OBO:EnsemblBacteria#_,canonical 127 | bioportal,ENVS_VARIABLES,http://purl.org/m4m-dk-2/variables/,canonical 128 | bioportal,ENVTHES,http://vocabs.lter-europe.net/EnvThes/,canonical 129 | bioportal,EO,http://www.semanticweb.org/ethnicityOntology#,canonical 130 | bioportal,EOL,http://purl.org/obo/owlEOL_,canonical 131 | bioportal,EP,http://www.cvrgrid.org/ontologies/Electrophysiology#,canonical 132 | bioportal,EPIE,https://pat.nichd.nih.gov/patepigeneticentity/,canonical 133 | bioportal,EPILONT,http://www.semanticweb.org/ontologies/2009/3/EpilepsyOntology.owl#,canonical 134 | bioportal,EPIO,https://bio.scai.fraunhofer.de/ontology/epilepsy#,canonical 135 | bioportal,EPIP,https://pat.nichd.nih.gov/patepigeneticprocess/,canonical 136 | bioportal,EPISEM,http://www.semanticweb.org/danielhier/ontologies/2019/3/untitled-ontology-57/,canonical 137 | bioportal,EPO,http://www.semanticweb.org/ontologies/epo.owl#,canonical 138 | bioportal,EPSO,http://www.case.edu/EpilepsyOntology.owl#,canonical 139 | bioportal,ESSO,http://www.semanticweb.org/rjyy/ontologies/2015/5/ESSO#,canonical 140 | bioportal,ETHANC,https://github.com/VODANA/Controlled-vocabulary/ethanc/,canonical 141 | bioportal,EXACT,http://www.owl-ontologies.com/Ontology1184060740.owl#,canonical 142 | bioportal,EXTRACT,http://purl.org/extract/,canonical 143 | bioportal,FBbi,http://purl.org/obo/owl/FBbi#FBbi_,canonical 144 | bioportal,FCC1,http://www.semanticweb.org/diwaleva/ontologies/2019/9/fcc-ontology#,canonical 145 | bioportal,FDC-GDMT,http://vocab.fairdatacollective.org/gdmt/,canonical 146 | bioportal,FG,https://w3id.org/fair-genomes/ontology/,canonical 147 | bioportal,FHHO,http://www.owl-ontologies.com/Ontology1172270693.owl#,canonical 148 | bioportal,FIRE,http://cerrado.linkeddata.es/ecology/fire#,canonical 149 | bioportal,FISH-AST,http://purl.org/heritagedata/schemes/560/concepts/,canonical 150 | bioportal,FISHO,http://bioportal.bioontology.org/ontologies/FISHO#,canonical 151 | bioportal,FISHO,http://mybiodiversityontologies.um.edu.my/FO.owl#,prefix_alias 152 | bioportal,FLYGLYCODB,http://www.flyglycodb.org/ontologies/2015/,canonical 153 | bioportal,FMA,http://purl.org/sig/ont/fma/,canonical 154 | bioportal,FMA,http://purl.org/obo/owlapi/fma#,prefix_alias 155 | bioportal,FMA,http://sig.uw.edu/fma#,prefix_alias 156 | bioportal,GALEN,http://www.co-ode.org/ontologies/galen#,canonical 157 | bioportal,GAMUTS,http://www.gamuts.net/entity#,canonical 158 | bioportal,GBOL,http://gbol.life/0.1/,canonical 159 | bioportal,GCO,http://rdf.biosemantics.org/ontologies/genomecomponents#,canonical 160 | bioportal,GECKO,OBO:GECKO_,canonical 161 | bioportal,GENE-CDS,http://www.genomic-cds.org/ont/genomic-cds.owl#,canonical 162 | bioportal,GEOSPARQL,http://www.opengis.net/ont/geosparql#,canonical 163 | bioportal,GEOSPECIES,http://rdf.geospecies.org/ont/geospecies#,canonical 164 | bioportal,GEOSPECIES,http://rdf.geospecies.org/ont/geospecies.owl#,prefix_alias 165 | bioportal,GFFO,https://raw.githubusercontent.com/mpievolbio-scicomp/GenomeFeatureFormatOntology/main/gffo#,canonical 166 | bioportal,GFO,http://www.onto-med.de/ontologies/gfo.owl#,canonical 167 | bioportal,GFO,http://www.onto-med.de/ontologies/gfo-basic.owl#,prefix_alias 168 | bioportal,GFO-BIO,http://onto.eva.mpg.de/ontologies/gfo-bio.owl#,canonical 169 | bioportal,GFVO,https://www.codamono.com/biointerchange/gfvo#,canonical 170 | bioportal,GLYCO,http://glycomics.ccrc.uga.edu/ontologies/GlycO#,canonical 171 | bioportal,GLYCOCOO,http://purl.jp/bio/12/glyco/,canonical 172 | bioportal,GML,http://www.opengis.net/ont/gml#,canonical 173 | bioportal,GML,http://loki.cae.drexel.edu/~wbs/ontology/2004/09/ogc-gml#,prefix_alias 174 | bioportal,GMO,http://purl.jp/bio/10/gmo/GMO_,canonical 175 | bioportal,GNO,OBO:GNO_,canonical 176 | bioportal,GO,http://purl.org/obo/owl/GO#GO_,canonical 177 | bioportal,GRO,http://www.bootstrep.eu/ontology/GRO#,canonical 178 | bioportal,GSSO,OBO:GSSO_,canonical 179 | bioportal,GVO,http://genome-variation.org/resource/gvo#,canonical 180 | bioportal,HASCO,http://hadatac.org/ont/hasco/,canonical 181 | bioportal,HCDR,http://www.semanticweb.org/m14067/ontologies/2020/0/untitled-ontology-5#,canonical 182 | bioportal,HCPCS,http://purl.bioontology.org/ontology/HCPCS/,canonical 183 | bioportal,HEIO,http://whistl.uwaterloo.ca/heio.owl#,canonical 184 | bioportal,HFO,http://bmi.utah.edu/ontologies/hfontology/,canonical 185 | bioportal,HGNC,http://ncicb.nci.nih.gov/xml/owl/EVS/Hugo.owl#HGNC_,canonical 186 | bioportal,HGNC,OBO:HGNC_,prefix_alias 187 | bioportal,HIVO0004,http://bioportal/bioontology.org/ontologies/HIVO0004#,canonical 188 | bioportal,HL7,http://purl.bioontology.org/ontology/HL7/,canonical 189 | bioportal,HLA,http://purl.org/stemnet/HLA#,canonical 190 | bioportal,HMIS033B,http://vocab.vodana.org/hmis033b/,canonical 191 | bioportal,HNS,http://www.humannervousystem.org/KAnOE/2014/dave86#,canonical 192 | bioportal,HRDO,http://www.limics.org/hrdo/HRDO.owl#,canonical 193 | bioportal,HSO,https://w3id.org/hso#,canonical 194 | bioportal,HUPSON,http://scai.fraunhofer.de/HuPSON#,canonical 195 | bioportal,I-ADOPT,https://w3id.org/iadopt/ont/,canonical 196 | bioportal,I2SV,https://i2insights.org/index/integration-and-implementation-sciences-vocabulary#,canonical 197 | bioportal,IAML-MOP,http://data.doremus.org/vocabulary/iaml/mop/,canonical 198 | bioportal,IBO,http://www.semanticweb.org/eamdouni/ontologies/2015/5/IBO#,canonical 199 | bioportal,ICD10,http://purl.bioontology.org/ontology/ICD10/,canonical 200 | bioportal,ICD10,https://cdn.rawgit.com/laiasubirats/rarediseasesontology/master/ICD10_1.0.owl#,prefix_alias 201 | bioportal,ICD10CM,http://purl.bioontology.org/ontology/ICD10CM/,canonical 202 | bioportal,ICD10PCS,http://purl.bioontology.org/ontology/ICD10PCS/,canonical 203 | bioportal,ICD11-BODYSYSTEM,http://who.int/bodysystem.owl#,canonical 204 | bioportal,ICD9CM,http://purl.bioontology.org/ontology/ICD9CM/,canonical 205 | bioportal,ICECI,http://who.int/iceci#,canonical 206 | bioportal,ICECI,http://who.int/iceci.owl#,prefix_alias 207 | bioportal,ICF,http://who.int/icf#,canonical 208 | bioportal,ICNP,http://www.icn.ch/icnp#,canonical 209 | bioportal,ICPC2P,http://purl.bioontology.org/ontology/ICPC2P/,canonical 210 | bioportal,ICPS,http://www.ICPS/ontologies/,canonical 211 | bioportal,ID-AMR,http://purl.org/zonmw/id-amr/,canonical 212 | bioportal,IDEM,http://purl.org/idem/,canonical 213 | bioportal,IDG_GL,http://druggablegenome.net/,canonical 214 | bioportal,IDODEN,http://purl.bioontology.org/ontology/IDODEN_,canonical 215 | bioportal,IMGT-ONTOLOGY,http://www.imgt.org/download/IMGT-ONTOLOGY/IMGT-ONTOLOGY-v1-0-3.owl#,canonical 216 | bioportal,INBIO,http://www.semanticweb.org/rs/ontologies/INBIO#,canonical 217 | bioportal,INBIODIV,http://www.semanticweb.org/mca/ontologies/2018/8/untitled-ontology-47#,canonical 218 | bioportal,INCENTIVE,http://purl.org/incentive/,canonical 219 | bioportal,INCENTIVE-VARS,http://purl.org/incentive/variables/,canonical 220 | bioportal,INFRARISK,https://www.infrarisk-fp7.eu/vocabs/#,canonical 221 | bioportal,INSECTH,http://neuromorpho.org/ontologies/insectH.owl#,canonical 222 | bioportal,INSNAME,https://www.vodan-totafrica.info/vocs/institutions/,canonical 223 | bioportal,IntAct,http://identifiers.org/intact/,canonical 224 | bioportal,INTO,http://www.semanticweb.org/Terrorism#,canonical 225 | bioportal,INVERSEROLES,http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#,canonical 226 | bioportal,IRD,http://www.semanticweb.org/msh/ontologies/2019/9/untitled-ontology-3#,canonical 227 | bioportal,IRDG,http://www.semanticweb.org/IRDGuyamazon#,canonical 228 | bioportal,ISO-15926-2_2003,http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#,namespace_alias 229 | bioportal,ISO19108TO,http://def.isotc211.org/iso19108/2006/,canonical 230 | bioportal,ISO19110,http://def.isotc211.org/iso19110/2005/,canonical 231 | bioportal,ISO19115,http://loki.cae.drexel.edu/~wbs/ontology/2004/09/iso-19115#,canonical 232 | bioportal,ISO19115CC,http://def.isotc211.org/iso19115/-1/2014/CommonClasses/code/,canonical 233 | bioportal,ISO19115ID,http://def.isotc211.org/iso19115/2003/,canonical 234 | bioportal,ISO19115PR,http://www.geosciml.org/vocabularies/iso-19115-codelists.owl#,canonical 235 | bioportal,ISO19115PR,http://www.geosciml.org/vocabularies/iso-19115-codes.owl#,prefix_alias 236 | bioportal,ISSVA,http://purl.bioontology.org/ontology/ISSVA/,canonical 237 | bioportal,JERM,http://jermontology.org/ontology/JERMOntology#,canonical 238 | bioportal,KISAO,http://www.biomodels.net/kisao/KISAO#KISAO_,canonical 239 | bioportal,KORO,http://www.knowledgegrid.org/koro#,canonical 240 | bioportal,KORO,http://www.knowledgegrid.org/koro/1.0.0/koro.owl#,prefix_alias 241 | bioportal,LAND-SURFACE,http://anzsoil.org/def/au/asls/land-surface/,canonical 242 | bioportal,LANDFORM,http://anzsoil.org/def/au/asls/landform/,canonical 243 | bioportal,LDA,http://www.semanticweb.org/ontologies/2008/10/languageacquisition_autism.owl#,canonical 244 | bioportal,LEGALAPA,http://www.semanticweb.org/ontologies/2014/11/legal.owl#,canonical 245 | bioportal,LEGALAPATEST2,http://www.semanticweb.org/ontologies/2014/11/legal-2.owl#,canonical 246 | bioportal,LICO,http://vavlab.ee.boun.edu.tr/carera/khaos/lico.owl#,canonical 247 | bioportal,LOINC,http://purl.bioontology.org/ontology/LNC/,canonical 248 | bioportal,LONGCOVID,http://www.semanticweb.org/orchid/ontologies/2021/Long-Covid-Phenotype-Ontology#,canonical 249 | bioportal,LUNGMAP_H_CELL,OBO:LMHA_,canonical 250 | bioportal,LUNGMAP_M_CELL,OBO:LMMA_,canonical 251 | bioportal,M4M19-SUBS,http://purl.org/m4m19/subjects/,canonical 252 | bioportal,M4M19-VARS,http://purl.org/m4m19/variables#,canonical 253 | bioportal,MATRELEMENT,http://sweet.jpl.nasa.gov/2.3/matrElement.owl#,canonical 254 | bioportal,MATRROCK,http://sweet.jpl.nasa.gov/2.3/matrRock.owl#,canonical 255 | bioportal,MATRROCKIGNEOUS,http://sweet.jpl.nasa.gov/2.3/matrRockIgneous.owl#,canonical 256 | bioportal,MCBCC,OBO:MCBCC_,canonical 257 | bioportal,MCCL,http://purl.bioontology.org/ontology/MCCL/CL__,canonical 258 | bioportal,MCCL,http://www.semanticweb.org/pallabi.d/ontologies/2014/2/untitled-ontology-11#,prefix_alias 259 | bioportal,MDDB,http://purl.bioontology.org/ontology/MDDB/,canonical 260 | bioportal,MEDLINEPLUS,http://purl.bioontology.org/ontology/MEDLINEPLUS/,canonical 261 | bioportal,MEDO,http://www.ebi.ac.uk/efo/medo/MEDO_,canonical 262 | bioportal,MEDO,http://www.ebi.ac.uk/medo/,prefix_alias 263 | bioportal,MEO,http://purl.jp/bio/11/meo/,canonical 264 | bioportal,MESH,http://purl.bioontology.org/ontology/MESH/,canonical 265 | bioportal,MHC,http://purl.org/stemnet/MHC#,canonical 266 | bioportal,MIM,http://purl.bioontology.org/ontology/MIM#,canonical 267 | bioportal,MIRO,OBO:miro#,canonical 268 | bioportal,MIXS,https://w3id.org/mixs/terms/,canonical 269 | bioportal,MIXS,https://w3id.org/mixs/vocab/,prefix_alias 270 | bioportal,MOC,http://sweet.jpl.nasa.gov/2.3/matrOrganicCompound.owl#,canonical 271 | bioportal,MODSCI,https://w3id.org/skgo/modsci#,canonical 272 | bioportal,MONO,http://www.owl-ontologies.com/MO.owl#,canonical 273 | bioportal,MOSAIC,https://purl.dataone.org/odo/MOSAIC_,canonical 274 | bioportal,MSO,http://scai.fraunhofer.de/MSOntology#,canonical 275 | bioportal,MSTDE,http://purl.bioontology.org/ontology/MSTDE/,canonical 276 | bioportal,MSTDE-FRE,http://purl.bioontology.org/ontology/MSTDE-FRE/,canonical 277 | bioportal,MSV,http://purl.jp/bio/11/msv/,canonical 278 | bioportal,NCBIGene,http://identifiers.org/ncbigene/,canonical 279 | bioportal,NCBIGene,OBO:NCBIGene_,prefix_alias 280 | bioportal,NCBITAXON,http://purl.bioontology.org/ontology/NCBITAXON/,canonical 281 | bioportal,NCBITAXON,http://www.ncbi.nlm.nih.gov/taxonomy/,prefix_alias 282 | bioportal,NCBITAXON,OBO:NCBITAXON_,prefix_alias 283 | bioportal,NCCNEHR,http://www.semanticweb.org/lamb/ontologies/NCCN-EHR#,canonical 284 | bioportal,NCCO,http://www.semanticweb.org/vanessa/ontologies/2012/7/untitled-ontology-33#,canonical 285 | bioportal,NCIT,http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#,canonical 286 | bioportal,NDDF,http://purl.bioontology.org/ontology/NDDF/,canonical 287 | bioportal,NDDO,http://www.purl.org/NDDO/,canonical 288 | bioportal,NDFRT,http://purl.bioontology.org/ontology/NDFRT/,canonical 289 | bioportal,NDFRT,http://evs.nci.nih.gov/ftp1/NDF-RT/NDF-RT.owl#,prefix_alias 290 | bioportal,NEICBEER,http://ontology.deic.dk/cv/beer-ontology/,canonical 291 | bioportal,NEOMARK3,http://www.neomark.eu/ontologies/,canonical 292 | bioportal,NEOMARK4,http://neomark.owl#,canonical 293 | bioportal,NEUDIGS,http://bmkeg.isi.edu/neuDIGs#,canonical 294 | bioportal,NEUMORE,http://neumore.cis.usouthal.edu/ontologies/NeuMORE-v0.1.owl#,canonical 295 | bioportal,NIFCELL,http://ontology.neuinfo.org/NIF/BiomaterialEntities/NIF-Cell.owl#,canonical 296 | bioportal,NIHSS,https://mre.zcu.cz/ontology/nihss.owl#,canonical 297 | bioportal,NMOBR,http://neuromorpho.org/ontologies/NMOSp.owl#,canonical 298 | bioportal,NMR,http://nmrML.org/nmrCV#,canonical 299 | bioportal,NPI,http://purl.bioontology.org/ontology/NPI#,canonical 300 | bioportal,NPO,http://purl.bioontology.org/ontology/npo#,canonical 301 | bioportal,OA,http://www.w3.org/ns/oa#,canonical 302 | bioportal,OBOE,http://ecoinformatics.org/oboe/oboe.1.2/,canonical 303 | bioportal,OBOREL,http://www.obofoundry.org/ro/ro.owl#,canonical 304 | bioportal,OBOREL,OBO:OBO_REL#_,prefix_alias 305 | bioportal,OBS,http://www.semanticweb.org/bito2/ontologies/2021/3/untitled-ontology-11#,canonical 306 | bioportal,OCIMIDO,https://github.com/sap218/ocimido/blob/master/ontology/ocimido.owl#,canonical 307 | bioportal,OCRE,http://purl.org/net/OCRe/,canonical 308 | bioportal,OGR,http://www.owl-ontologies.com/GeographicalRegion.owl#,canonical 309 | bioportal,OGROUP,http://protozoadb.biowebdb.org/22/ogroup#,canonical 310 | bioportal,OM,http://www.ontology-of-units-of-measure.org/resource/,canonical 311 | bioportal,OMIM,http://purl.bioontology.org/ontology/OMIM/,canonical 312 | bioportal,OMIM,http://identifiers.org/omim/,prefix_alias 313 | bioportal,OMV,http://omv.ontoware.org/2005/05/ontology#,canonical 314 | bioportal,ONL-DP,http://neurolog.unice.fr/ontoneurolog/v3.0/ontoneurolog-dataset-processing.owl#,canonical 315 | bioportal,ONL-TASKS,http://www.semanticweb.org/bakaev/ontologies/2020/3/untitled-ontology-25#,canonical 316 | bioportal,ONLIRA,http://vavlab.ee.boun.edu.tr/carera/onlira.owl#,canonical 317 | bioportal,ONSTR,http://onstr.googlecode.com/svn/tags/currentRelease/2014-09-03/ONSTR.owl#ONSTR_,canonical 318 | bioportal,ONTOAD,http://doe-generated-ontology.com/OntoAD#,canonical 319 | bioportal,ONTODM,http://www.ontodm.com/OntoDM-core/OntoDM_,canonical 320 | bioportal,ONTODM,http://kt.ijs.si/panovp/OntoDM#OntoDM_,prefix_alias 321 | bioportal,ONTODT,http://ontodm.com/OntoDT#,canonical 322 | bioportal,ONTODT,http://www.ontodm.com/OntoDT#,prefix_alias 323 | bioportal,ONTOLURGENCES,http://www.limics.fr/ontologies/ontolurgences#,canonical 324 | bioportal,ONTOPBM,http://w3id.org/ontopbm#OntoPBM_,canonical 325 | bioportal,ONTOPNEUMO,http://doe-generated-ontology.com/OntoPneumo#,canonical 326 | bioportal,ONTOSIM,http://www.semanticweb.org/DIASUS/OntoSIM#,canonical 327 | bioportal,ONTOSINASC,http://www.semanticweb.org/DIASUS/OntoSINASC#,canonical 328 | bioportal,ONTOTOX,http://OntoTox.owl#,canonical 329 | bioportal,OOEVV,http://bmkeg.isi.edu/ooevv/,canonical 330 | bioportal,OPB,http://bhi.washington.edu/OPB#OPB_,canonical 331 | bioportal,OPB,http://bhi.washington.edu/OPB##,prefix_alias 332 | bioportal,OPDE,http://www.mudhc.edu.et/template-vocabulary#,canonical 333 | bioportal,OPE,http://www.semanticweb.org/ontologies/2013/2/OPE.owl#,canonical 334 | bioportal,OPTION-ONTOLOGY,http://w3id.org/ontoopt/,canonical 335 | bioportal,ORCS,OBO:ORCS_,canonical 336 | bioportal,ORTH,http://purl.org/net/orth#,canonical 337 | bioportal,OSM,https://saudeconectada.org/saude_mental.owl#,canonical 338 | bioportal,PANDA,http://purl.bioontology.org/net/brunel/panda#,canonical 339 | bioportal,PANET,http://purl.org/pan-science/PaNET/,canonical 340 | bioportal,PATCT,https://pat.nichd.nih.gov/placentalcelltype/,canonical 341 | bioportal,PATEL,http://www.semanticweb.org/ambrish/ontologies/2020/10/untitled-ontology-24#,canonical 342 | bioportal,PATGV,https://pat.nichd.nih.gov/patgeneticvariance/,canonical 343 | bioportal,PATHLEX,http://www.semanticweb.org/david/ontologies/2013/0/pathLex.owl#,canonical 344 | bioportal,PATIT,https://pat.nichd.nih.gov/patinvestigativetechniques/,canonical 345 | bioportal,PATMHC,http://pat.nichd.nih.gov/maternalconditions/,canonical 346 | bioportal,PATO,http://purl.obolibrary.org/obo/PATO_,canonical 347 | bioportal,PCALION,http://www.semanticweb.org/ontologies/Prostate_cancer#,canonical 348 | bioportal,PDO,http://purl.jp/bio/11/pdo/,canonical 349 | bioportal,PDON,http://www.semanticweb.org/ontologies/2011/1/Ontology1296772722296.owl#,canonical 350 | bioportal,PDQ,http://purl.bioontology.org/ontology/PDQ/,canonical 351 | bioportal,PDRO,OBO:PDRO/PDRO.owl#,canonical 352 | bioportal,PDUMDV,OBO:PdumDv_,canonical 353 | bioportal,PE,http://bmi.utah.edu/ontologies/peontology/,canonical 354 | bioportal,PE-O,http://www.pepathway.org/peo/1.2#,canonical 355 | bioportal,PE-O,http://www.pepathway.org/peo/1.1#,prefix_alias 356 | bioportal,PEDTERM,http://www.owl-ontologies.com/Ontology1358660052.owl#,canonical 357 | bioportal,PEO,http://knoesis.wright.edu/ParasiteExperiment.owl#,canonical 358 | bioportal,PESONT,http://www.semanticweb.org/patienceusip/ontologies/2021/7/untitled-ontology-23#,canonical 359 | bioportal,PGXO,http://pgxo.loria.fr/,canonical 360 | bioportal,PHENX,http://purl.bioontology.org/ontology/phenX/,canonical 361 | bioportal,PHYLONT,http://www.semanticweb.org/ontologies/2011/7/Ontology1314368515010.owl#,canonical 362 | bioportal,PIERO,http://reactionontology.org/piero/,canonical 363 | bioportal,PLIO,http://www.semanticweb.org/ontologies/2010/3/Ontology1271664172453.owl#,canonical 364 | bioportal,PLOSTHES,http://localhost/plosthes.2017-1#,canonical 365 | bioportal,PMD,http://www.onto-med.de/ontologies/gfo-persian-medicine-diseases.owl#,canonical 366 | bioportal,PMDO,http://www.case.edu/PMDO#,canonical 367 | bioportal,PMO,http://performedmusicontology.org/ontology/,canonical 368 | bioportal,PMO-SPEED,http://performedmusicontology.org/ontologies/vocabularies/playing_speed/,canonical 369 | bioportal,PMR,http://purl.bioontology.org/ontology/PMR.owl#,canonical 370 | bioportal,PP,https://bitbucket.org/PlantExpAssay/ontology/raw/v0.1/PipelinePatterns.owl#P,canonical 371 | bioportal,PR,OBO:pr#,canonical 372 | bioportal,PREGONTO,http://www.clininf.eu/pregnancy#,canonical 373 | bioportal,PREO,http://presence-ontology.org/ontology//,canonical 374 | bioportal,PROCCHEMICAL,http://sweet.jpl.nasa.gov/2.3/propChemical.owl#,canonical 375 | bioportal,PROJ,http://linked.data.gov.au/def/project/,canonical 376 | bioportal,PROPREO,http://lsdis.cs.uga.edu/projects/glycomics/propreo#,canonical 377 | bioportal,PROVO,http://www.w3.org/ns/prov-o#,canonical 378 | bioportal,PROVO,http://www.w3.org/ns/prov-o-20130312#,prefix_alias 379 | bioportal,PSO_2,http://ontorion.com/PSO#,canonical 380 | bioportal,QUDT,http://qudt.org/schema/,canonical 381 | bioportal,QUDT,http://qudt.org/2.1/schema/,prefix_alias 382 | bioportal,RADLEX,http://radlex.org/RID/,canonical 383 | bioportal,RADLEX,http://www.radlex.org/RID/,prefix_alias 384 | bioportal,RADXTT-MVREASONS,https://radx.orgx/vocs/missing-value-reason/,canonical 385 | bioportal,RCD,http://purl.bioontology.org/ontology/RCD/,canonical 386 | bioportal,RCTONT,http://www.owl-ontologies.com/RCTOntology.owl#,canonical 387 | bioportal,RCTV2,http://purl.bioontology.org/ontology/RCTV2/,canonical 388 | bioportal,RDA-CONTENT,http://rdaregistry.info/termList/RDAContentType#,canonical 389 | bioportal,REPO,http://purl.bioontology.org/ontology/REPO.owl#,canonical 390 | bioportal,RH-MESH,http://phenomebrowser.net/ontologies/mesh/mesh.owl#,canonical 391 | bioportal,RO,http://www.radiomics.org/RO/,canonical 392 | bioportal,ROLEO,OBO:RoleO_,canonical 393 | bioportal,ROO,http://www.cancerdata.org/roo/,canonical 394 | bioportal,ROS,urn:absolute:RadiationOncologyStructuresOntology#,canonical 395 | bioportal,RPO,http://www.semanticweb.org/ontologies/2012/5/Ontology1338526551855.owl#,canonical 396 | bioportal,RSA,http://rdf.biosemantics.org/ontologies/rsa#,canonical 397 | bioportal,RVO,http://w3id.org/rv-ontology#,canonical 398 | bioportal,SAO,http://ccdb.ucsd.edu/SAO/1.2#,canonical 399 | bioportal,SARSMUTONTO,file://C/Users/Jamal/Desktop/SARSMutOnto.owl#,canonical 400 | bioportal,SBO,http://purl.bioontology.org/ontology/SBO/SBO_,canonical 401 | bioportal,SBO,http://biomodels.net/SBO/SBO_,prefix_alias 402 | bioportal,SBOL,OBO:SBOL_,canonical 403 | bioportal,SCHEMA,http://schema.org/,canonical 404 | bioportal,SCHEMA,http://meta.schema.org/,prefix_alias 405 | bioportal,SCHEMA,http://www.w3.org/wiki/WebSchemas/,prefix_alias 406 | bioportal,SCHEMA,https://www.w3.org/wiki/WebSchemas/,prefix_alias 407 | bioportal,SCIO,http://psink.de/scio/,canonical 408 | bioportal,SD3,http://www.wiser.pitt.edu/ontologies/SimulationScenarioDeviations.owl#,canonical 409 | bioportal,SDO,http://mimi.case.edu/ontologies/2009/1/SDO.owl#,canonical 410 | bioportal,SEDI,http://semantic-dicom.org/dcm#,canonical 411 | bioportal,SENSO,http://purl.dataone.org/odo/SENSO_,canonical 412 | bioportal,SEQ,http://www.ontologydesignpatterns.org/cp/owl/sequence.owl#,canonical 413 | bioportal,SHR,http://www.shojaee.com/shr/shr.owl#,canonical 414 | bioportal,SITBAC,http://www.semanticweb.org/ontologies/2008/1/Ontology1204037102846.owl#,canonical 415 | bioportal,SK,http://www.semanticweb.org/sandeepak/digitalforensic#,canonical 416 | bioportal,SMASH,http://aimlab.cs.uoregon.edu/smash/ontologies/smash-ontology#,canonical 417 | bioportal,SMASH,http://aimlab.cs.uoregon.edu/smash/ontologies/biomarker.owl#,prefix_alias 418 | bioportal,SMASH,http://aimlab.cs.uoregon.edu/smash/ontologies/physical-activity.owl#,prefix_alias 419 | bioportal,SMASH,http://aimlab.cs.uoregon.edu/smash/ontologies/social-activity.owl#,prefix_alias 420 | bioportal,SNMI,http://purl.bioontology.org/ontology/SNMI/,canonical 421 | bioportal,SNOMEDCT,http://purl.bioontology.org/ontology/SNOMEDCT/,canonical 422 | bioportal,SNPO,http://www.loria.fr/~coulet/ontology/snpontology/version1.6/snpontology_full.owl#,canonical 423 | bioportal,SO,http://purl.org/obo/owl/SO#SO_,canonical 424 | bioportal,SOCPRES,http://www.semanticweb.org/social-prescribing#,canonical 425 | bioportal,SOPHARM,http://www.loria.fr/~coulet/sopharm/SOPHARM_,canonical 426 | bioportal,SOY,OBO:SOY_,canonical 427 | bioportal,SP,http://purl.org/net/SMARTprotocol#,canonical 428 | bioportal,SPO,http://www.semanticweb.org/ontologies/2008/8/MultiscaleSkinPhysiologyOntology.owl#,canonical 429 | bioportal,SPO,http://www.semanticweb.org/ontologies/2008/8/SPO_lightweight_merged.owl#,prefix_alias 430 | bioportal,SPTO,OBO:SP_,canonical 431 | bioportal,SSN,http://www.w3.org/ns/ssn/,canonical 432 | bioportal,SSO,http://surveillance.mcgill.ca/sso/syndromes.owl#,canonical 433 | bioportal,SSO,http://www.medicine.mcgill.ca/epidemiology/buckeridge/syndromes.owl#,prefix_alias 434 | bioportal,STMSO,https://bioportal.bioontology.org/ontologies/STMSO#,canonical 435 | bioportal,STY,http://purl.bioontology.org/ontology/STY/,canonical 436 | bioportal,SURGICAL,http://www.cablesat.com.au/research/,canonical 437 | bioportal,SWEET,http://sweetontology.net/,canonical 438 | bioportal,SWO,http://www.ebi.ac.uk/swo/SWO_,canonical 439 | bioportal,SWO,http://www.ebi.ac.uk/efo/swo/SWO_,prefix_alias 440 | bioportal,SWO,http://www.ebi.ac.uk/swo/algorithm/SWO_,prefix_alias 441 | bioportal,SWO,http://www.ebi.ac.uk/swo/data/SWO_,prefix_alias 442 | bioportal,SWO,http://www.ebi.ac.uk/swo/interface/SWO_,prefix_alias 443 | bioportal,SWO,http://www.ebi.ac.uk/swo/license/SWO_,prefix_alias 444 | bioportal,SWO,http://www.ebi.ac.uk/swo/objective/SWO_,prefix_alias 445 | bioportal,SWO,http://www.ebi.ac.uk/swo/organization/SWO_,prefix_alias 446 | bioportal,SWO,http://www.ebi.ac.uk/swo/version/SWO_,prefix_alias 447 | bioportal,TAXRANK,OBO:taxrank.owl#,canonical 448 | bioportal,TCDO,http://OntoTCM.org.cn/ontologies/TCDO_,canonical 449 | bioportal,TCO,http://www.semanticweb.org/hx-jta/ontologies/thyroid_cancer_ontology#,canonical 450 | bioportal,TDWGSPEC,http://rs.tdwg.org/ontology/voc/Specimen#,canonical 451 | bioportal,TEDDY,http://identifiers.org/teddy/TEDDY_,canonical 452 | bioportal,TEO,http://informatics.mayo.edu/TEO.owl#TEO_,canonical 453 | bioportal,TESTEX,https://bioportal.databiology.com/test1.owl#,canonical 454 | bioportal,TIME,http://www.w3.org/2006/time#,canonical 455 | bioportal,TIMEBANK,https://w3id.org/timebank#,canonical 456 | bioportal,TM-CONST,http://who.int/ictm/constitution#,canonical 457 | bioportal,TM-MER,http://who.int/ictm/meridians#,canonical 458 | bioportal,TM-SIGNS-AND-SYMPTS,http://who.int/ictm/signsAndSymptoms#,canonical 459 | bioportal,TMA,http://bioontology.org/ontologies/tma-minimal#,canonical 460 | bioportal,TMO,http://www.w3.org/2001/sw/hcls/ns/transmed/,canonical 461 | bioportal,TOK,http://cui.unige.ch/isi/onto/tok/TOK.owl#,canonical 462 | bioportal,TOP-MENELAS,http://www.limics.fr/ontologies/menelastop#,canonical 463 | bioportal,TRAK,OBO:TRAK_,canonical 464 | bioportal,TRIAGE,http://www.semanticweb.org/philshields/ontologies/2015/4/untitled-ontology-59#,canonical 465 | bioportal,TRON,OBO:TrOn_,canonical 466 | bioportal,TXPO,OBO:TXPO_,canonical 467 | bioportal,TYPON,http://purl.phyloviz.net/ontology/typon#,canonical 468 | bioportal,UMMS,https://w3id.org/umms/ekg/onto01/,canonical 469 | bioportal,UNITSONT,http://mimi.case.edu/ontologies/2009/1/UnitsOntology#,canonical 470 | bioportal,UPA,OBO:UPa_,canonical 471 | bioportal,VANDF,http://purl.bioontology.org/ontology/VANDF/,canonical 472 | bioportal,VARIO,OBO:VariO_,canonical 473 | bioportal,VDOT,http://www.ifomis.org/vdot/vdot_core.owl#vdot_,canonical 474 | bioportal,VEO,http://sbmi.uth.tmc.edu/ontology/VEO#,canonical 475 | bioportal,VIDO,OBO:VIDO_,canonical 476 | bioportal,VODANADISEASES,http://vocab.vodan-totafrica.info/vodana-terms/vdiseases/,canonical 477 | bioportal,VODANAMFLCODE,http://vocab.vodana.org/vmfl/,canonical 478 | bioportal,WB-LS,OBO:WBls_,canonical 479 | bioportal,WC,OBO:WC_,canonical 480 | bioportal,WEAR,http://purl.org/wear/,canonical 481 | bioportal,WEAVE,http://purl.org/weave/,canonical 482 | bioportal,WETAXTOPICS,http://purl.org/neat/,canonical 483 | bioportal,WIKIPATHWAYS,http://vocabularies.wikipathways.org/wp#,canonical 484 | bioportal,WIKIPATHWAYS,http://vocabularies.wikipathways.org/wpTypes#,prefix_alias 485 | bioportal,WSIO,OBO:WSIO_,canonical 486 | bioportal,WSIO,OBO:http://wsio.org#,prefix_alias 487 | bioportal,XEO,OBO:XEO_,canonical 488 | bioportal,XLMOD,OBO:XLMOD_,canonical 489 | bioportal,XPO,OBO:XPO_,canonical 490 | bioportal,XREF-FUNDER-REF,http://data.crossref.org/fundingdata/vocabulary/Label-,canonical 491 | bioportal,ZONMW-ADMIN-MD,http://www.fair-data-collective.com/zonmw/projectadmin/,canonical 492 | bioportal,ZONMW-CONTENT,http://purl.org/zonmw/covid19/,canonical 493 | bioportal,ZONMW-GENERIC,http://purl.org/zonmw/generic/,canonical 494 | --------------------------------------------------------------------------------