Skip to content
Back to search

ols4

The EMBL-EBI Ontology Lookup Service (OLS)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/EBISPOT/ols4 with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/EBISPOT/ols4'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ebispot--ols4/badge.svg)](/listings/ebispot--ols4)

HTML

<a href="/listings/ebispot--ols4"><img src="/api/listings/ebispot--ols4/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 181 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <a href="https://github.com/EBISPOT/ols4/actions/workflows/test.yml"><img src="https://github.com/EBISPOT/ols4/actions/workflows/test.yml/badge.svg"/></a>
  2. The Ontology Lookup Service (OLS) is a repository for biomedical ontologies that aims to provide a single point of access to the latest ontology versions. It provides a [website](https://www.ebi.ac.uk/ols4/), [REST API](https://www.ebi.ac.uk/ols4/api-docs), and [MCP server](https://www.ebi.ac.uk/ols4/mcp).
  3. See also:
  4. * The public OLS instance at EMBL-EBI: <b>[https://www.ebi.ac.uk/ols4/](https://www.ebi.ac.uk/ols4/)</a></b>
  5. * [<i>OLS4: a new Ontology Lookup Service for a growing interdisciplinary knowledge ecosystem</i>](https://academic.oup.com/bioinformatics/article/41/5/btaf279/8125017)
  6. * [REST API docs](https://www.ebi.ac.uk/ols4/api-docs)
  7. * MCP endpoint (Streamable HTTP): `https://www.ebi.ac.uk/ols4/api/mcp`
  8. The MCP endpoint uses stateless Streamable HTTP: clients initialize and call tools
  9. with POST requests, and the server returns JSON responses without an
  10. `Mcp-Session-Id`. OLS tools do not need persistent sessions or server-initiated
  11. messages. Listening GET requests return HTTP 405, so abandoned SSE connections
  12. cannot accumulate and exhaust the server's connection capacity.
  13. If you use OLS in your work, please cite [our recent publication in <i>Bioinformatics</i>](https://academic.oup.com/bioinformatics/article/41/5/btaf279/8125017).
  14. ---
  15. This repository contains three projects:
  16. * The dataloader (`dataload` directory)
  17. * The API server (`backend` directory)
  18. * The React frontend (`frontend` directory)
  19. # Deploying OLS4
  20. First run the OLS dataload (requires Docker):
  21. OLS4_CONFIG=./dataload/configs/efo.json ./dataload.sh
  22. This will create a PostgreSQL database in the `out` directory. Now start the OLS stack:
  23. HOST_UID=$(id -u) HOST_GID=$(id -g) docker compose up
  24. You should now be able to access the OLS4 frontend at `http://localhost:8081`.
  25. If you want to test it with your own ontology, copy the OWL or RDFS ontology file into this repository folder. Then make a new config file for your ontology; you can use `efo.json` from `dataload/configs` as a
  26. template. For the `ontology_purl` property in the config, use the relative path in this repository to your ontology e.g. `./myontology.owl`. Then follow the above steps for efo with the config filename you created.
  27. ## Deployment: Using Kubernetes with GitHub Packages
  28. To deploy OLS4 using Kubernetes, Docker images built and uploaded to this repository (using GitHub Packages) are
  29. utilized. Software requirements are as follows:
  30. 1. Kubernetes command-line tool, _kubectl_
  31. 2. Kubernetes package manager, _helm_
  32. ### Create data archives for PostgreSQL
  33. First run the OLS dataload (requires Docker):
  34. OLS4_CONFIG=./dataload/configs/efo.json ./dataload.sh
  35. This will create a PostgreSQL database in the `out` directory.
  36. ### Startup OLS4 deployment
  37. Uninstall existing `ols4` deployments, if any, before installing a new one. Do not forget to set `KUBECONFIG`
  38. environment variable.
  39. **IMPORTANT**: The use of `imageTag` is to specify the Docker image (uploaded to this repository) that will be used in the deployment. If not familiar, simply
  40. use either the `dev` or `stable` image.
  41. export KUBECONFIG=<K8S_CONFIG>
  42. helm install ols4 <OLS4_DIR>/k8chart/ols4 --set imageTag=dev
  43. # Developing OLS4
  44. OLS is different to most webapps in that its API provides both full text search and recursive graph queries. It uses [**PostgreSQL**](https://www.postgresql.org) with [pgvector](https://github.com/pgvector/pgvector), for storing entities, hierarchies, embedding vectors, and full-text search.
  45. * The `dataload` directory contains the code which turns ontologies from RDF (specified using OWL and/or RDFS) into JSON
  46. and TSV datasets which can be loaded into PostgreSQL; and some minimal bash scripts which help with
  47. loading them.
  48. * The `backend` directory contains a Spring Boot application which hosts the OLS API over the above PostgreSQL
  49. instance
  50. * The `frontend` directory contains the React frontend built upon the `backend` above.
  51. ![OLS4 overview](docs/overview.png)
  52. ## Running OLS4 components using Docker
  53. You can run OLS4, or any combination of its consistuent parts (dataload, backend, frontend) in Docker. When developing,
  54. it is often useful to run, for example, just PostgreSQL in Docker, while running the API server locally; or to run
  55. PostgreSQL and the backend API server in Docker while running the frontend locally.
  56. First install the latest version of Docker Desktop (or compatible, such as Rancher Desktop) if you are on Mac or Windows. This now includes the `docker compose`
  57. command. If you are on Linux, make sure you have the `docker compose` plugin
  58. installed (`apt install docker.io docker-compose-plugin` on Ubuntu).
  59. Then, start up the components you would like to run. For example, PostgreSQL only (to develop the backend API server
  60. and/or frontend):
  61. docker compose up --force-recreate --build --always-recreate-deps --attach-dependencies ols4-postgres
  62. This will start up PostgreSQL with your new dataset on port 5432.
  63. To start PostgreSQL **AND** the backend API server (to develop the frontend):
  64. docker compose up --force-recreate --build --always-recreate-deps --attach-dependencies ols4-postgres ols4-backend
  65. To start everything, including the frontend:
  66. docker compose up --force-recreate --build --always-recreate-deps --attach-dependencies ols4-postgres ols4-backend ols4-frontend
  67. ## Making the tests pass
  68. OLS has a comprehensive suite of automated CI tests for the dataload and API. If code changes change the output such that it no longer matches `testcases_expected_output` (mock dataload) and/or `testcases_expected_output_api` (full Nextflow dataload and API) the CI will fail, and you will need to update the expected output.
  69. Before running your testcases, ensure that your work is already committed. Create a new branch based on the branch you worked on
  70. but with a `-testcases` suffix. I.e., if your branch is called "fix-xyz", the new branch for the testcases will be
  71. `fix-xyz-testcases`. We commit testcases to a separate branch due to the large number of files updated when testcases are run.
  72. ### Testing the mock dataload
  73. First, build an up to date Docker image for the dataload:
  74. docker build -t ols4-dataload:local -f ./dataload/Dockerfile . --no-cache
  75. Remove the old `testcases_expected_output` contents from your local working tree:
  76. rm -rf testcases_expected_output/*
  77. Re-populate `testcases_expected_output` directory with updated test output:
  78. docker run \
  79. -v $(pwd)/testcases_expected_output:/opt/ols/testcases_output \
  80. ols4-dataload:local \
  81. bash -c "cd /opt/ols && ./test_dataload.sh"
  82. Now you can inspect any changes to the files in `testcases_expected_output` and make sure they are intentional, e.g. using `git diff` or from VS Code. When you are happy, stage and commit the updated `testcases_expected_output`.
  83. git add -A testcases_expected_output
  84. git commit -m "Update testcase output"
  85. ### Testing the full Nextflow dataload and API
  86. First follow the instructions above for testing the mock dataload. Then build up to date Docker images for remainder of the OLS stack:
  87. For backend use following docker command:
  88. docker build -t ols4-backend:local -f ./backend/Dockerfile . --no-cache
  89. For frontend use following docker command:
  90. docker build -t ols4-frontend:local -f ./frontend/Dockerfile ./frontend --no-cache
  91. For apitester use following docker command:
  92. docker build -t ols4-apitester4:local -f ./apitester4/Dockerfile ./apitester4 --no-cache
  93. and then run the API tests with the new images:
  94. export OLS4_BACKEND_IMAGE=ols4-backend:local
  95. export OLS4_FRONTEND_IMAGE=ols4-frontend:local
  96. export OLS4_APITESTER_IMAGE=ols4-apitester4:local
  97. HOST_UID=$(id -u) HOST_GID=$(id -g) docker compose --profile run-api-tests build --no-cache
  98. Run the test script to produce a `testcases_output_api` directory:
  99. OLS4_DATALOAD_IMAGE=ols4-dataload:local ./test_api.sh
  100. The log file `testcases_output_api/apitester4.log` contains diff information. You can also manually compare the files in `testcases_output_api` with the files in `testcases_expected_output_api`. Once you are happy the changes are intentional, replace the old test outputs with the new ones:
  101. rm -rf testcases_expected_output_api
  102. mv testcases_output_api testcases_expected_output_api
  103. Stage and commit the updated `testcases_expected_output_api`:
  104. git add -A testcases_expected_output_api
  105. git commit -m "Update API testcase output"
  106. ## Running OLS locally
  107. OLS is intended to be run as a containerised application. However, for some debugging scenarios it may be useful to run OLS non-containerised (i.e. outside of Docker). Best effort instructions are provided in [RUNNING_LOCALLY.md](docs/RUNNING_LOCALLY.md), though these may not be suitable for all platforms.
  108. # Reasoning
  109. OLS does not do any OWL reasoning on ontologies at all. The assumption is that ontologies loaded into OLS are pre-reasoned.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.