REST API endpoints to ingest study and panel data into a cBioPortal instance. It requires the Docker installation of cBioPortal.
make installThis creates a virtual environment in .env that can be either activated, or indirectly by using
uv run ....
source .venv/bin/activateThen, start the server and worker:
# Terminal 1
make serve
# Terminal 2
make workerdocker run -d -p 5000:5000 --name registry registry:2If the container is not running anymore (because of system restart or similar):
docker start registrybash docker/build.shThis builds and pushes the image to your local registry.
docker pull localhost:5000/cbio-ingest:devTo use the installation with the cBioPortal docker compose, copy the override and env file to the cbioPortal Docker compose:
cp docker/docker-compose.override.yml ../cbioportal-docker-compose
cp docker/env.example ../cbioportal-docker-compose/.env.cbio-ingestThe server in development instance is reachable via http://localhost:8000.
To access the API schema, navigate to http://localhost:8000/docs.
We use alembic to manage database migrations and keep a history of changes to the database.
A typical workflow looks like this:
# 1. change a model in models.py, then:
make db-migration msg="add new_field to study"
# 2. review the generated file in migrations/versions/, fill in downgrade()
# 3. apply it
make db-migrate
# 4. if something's wrong
make db-rollbackTo see the history of migrations, do:
make db-historyTo see where in the history the database currently is, do:
bash db-current