Skip to content
Pharmacokinetics database
Python CSS Vue JavaScript HTML Shell Other
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

DOI License (LGPL version 3)

Jan Grzegorzewski and Matthias König

PK-DB - a pharmacokinetics database


[^] PK-DB is a database and web interface for pharmacokinetics data and information from clinical trials as well as pre-clinical research. PK-DB allows to curate pharmacokinetics data integrated with the corresponding meta-information

  • characteristics of studied patient collectives and individuals (age, bodyweight, smoking status, ...)
  • applied interventions (e.g., dosing, substance, route of application)
  • measured pharmacokinetics time courses and pharmacokinetics parameters (e.g., clearance, half-life, ...).

Important features are

  • the representation of experimental errors and variation
  • the representation and normalisation of units
  • annotation of information to biological ontologies
  • calculation of pharmacokinetics information from time courses (apparent clearance, half-life, ...)
  • a workflow for collaborative data curation
  • strong validation rules on data, and simple access via a REST API

PK-DB is available at


[^] PK-DB code and documentation is licensed as


[^] Jan Grzegorzewski and Matthias König are supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (LiSyM, grant number 031L0054).

How to cite

[^] If you use PK-DB or data from PK-DB cite



[^] PK-DB is deployed via docker and docker-compose.


To setup the development server the following minimal requirements must be fulfilled

  • docker
  • docker-compose
  • Python3.6

For elasticsearch the following system settings are required

sudo sysctl -w vm.max_map_count=262144

To set vm.max_map_count persistently change the value in


Start development server

To start the local development server

# clone or pull the latest code
git clone
cd pkdb
git pull

# set environment variables
set -a && source .env.local
# create/rebuild all docker containers

This setups a clean database and clean volumes and starts the containers for pkdb_backend, pkdb_frontend, elasticsearch and postgres. You can check that all the containers are running via

docker container ls

which lists the current containers

CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                              NAMES
bc7f9204468f        pkdb_backend          "bash -c '/usr/local…"   27 hours ago        Up 18 hours>8000/tcp             pkdb_backend_1
17b8d243e956        pkdb_frontend         "/bin/sh -c 'npm run…"   27 hours ago        Up 18 hours>8080/tcp             pkdb_frontend_1
7730c6fe2210        elasticsearch:6.8.1   "/usr/local/bin/dock…"   27 hours ago        Up 18 hours         9300/tcp,>9200/tcp   pkdb_elasticsearch_1
e880fbb0f349        postgres:11.4         "docker-entrypoint.s…"   27 hours ago        Up 18 hours>5432/tcp             pkdb_postgres_1

The locally running develop version of PK-DB can now be accessed via the web browser from

Fill database

Due to copyright, licensing and privacy issues this repository does not contain any data. All data is managed via a separate private repository at This also includes the curation scripts and curation workflows.

If you are interested in curating data or contributing data please contact us at


[^] PKDB provides a REST API which allows simple interaction with the database and easy access of data. An overview over the REST endpoints is provided at http://localhost:8000/api/v1/.

Query examples

The REST API supports elastisearch queries, with syntax examples
available here

Suggestion example

In addition suggestion queries are possible

Docker interaction

[^] In the following typical examples to interact with the PK-DB docker containers are provided.

Check running containers

To check the running containers use

watch docker container ls

Interactive container mode


Container logs

To get access to individual container logs use docker container logs <container>. For instance to check the django backend logs use

docker container logs pkdb_backend_1 

Run command in container

To run commands inside the docker container use

docker-compose run --rm backend [command]

or to run migrations

docker-compose run --rm backend python makemigrations

Authentication data

The following examples show how to dump and restore the authentication data.

Dump authentication data

docker-compose -f $PKDB_DOCKER_COMPOSE_YAML run --rm backend ./  dumpdata auth  --indent 2 > ./backend/pkdb_app/fixtures/auth.json
docker-compose -f $PKDB_DOCKER_COMPOSE_YAML run --rm backend ./  dumpdata users  --indent 2 > ./backend/pkdb_app/fixtures/users.json
docker-compose -f $PKDB_DOCKER_COMPOSE_YAML run --rm backend ./  dumpdata rest_email_auth  --indent 2 > ./backend/pkdb_app/fixtures/rest_email_auth.json

Restore authentication data

docker-compose -f $PKDB_DOCKER_COMPOSE_YAML run --rm backend ./  loaddata auth pkdb_app/fixtures/auth.json
docker-compose -f $PKDB_DOCKER_COMPOSE_YAML run --rm backend ./  loaddata users pkdb_app/fixtures/users.json
docker-compose -f $PKDB_DOCKER_COMPOSE_YAML run --rm backend ./  loaddata rest_email_auth pkdb_app/fixtures/rest_email_auth.json

© 2017-2019 Jan Grzegorzewski & Matthias König;

You can’t perform that action at this time.