'Library for producing, solving and visualising pharmacokinetic models.'
Project description
Pharmacokinetic Modelling Group Project
A PharmacoKinetic (PK) modelling function for analysis of injected solute dynamics over time, developed by Group 8 of the 2021 Software Engineering course. This model has been developed with the end-user in mind, and includes an easy-to-use interface to guide refinement of tissue models.
https://software-engineering-bbsrc-group-6.github.io/PK_modelling/
Authors
Amit Halkhoree - amit.halkhoree@dtc.ox.ac.uk
Cameron Anderson - cameron.anderson@dtc.ox.ac.uk
Dan Hudson - alexander.hudson@dtc.ox.ac.uk
Ishaan Kapoor - ishaan.kapoor@dtc.ox.ac.uk
Joseph Pollacco - joseph.pollacco@dtc.ox.ac.uk
Samuel Johnson - samuel.johnson@dtc.ox.ac.uk
Background
Ref: https://sabs-r3.github.io/software-engineering-projects/01-introduction/index.html.
The field of Pharmacokinetics (PK) provides a quantitative basis for describing the delivery of a drug to a patient, the diffusion of that drug through the plasma/body tissue, and the subsequent clearance of the drug from the patient’s system. PK is used to ensure that there is sufficient concentration of the drug to maintain the required efficacy of the drug, while ensuring that the concentration levels remain below the toxic threshold. Pharmacokinetic (PK) models are often combined with Pharmacodynamic (PD) models, which model the positive effects of the drug, such as the binding of a drug to the biological target, and/or undesirable side effects, to form a full PKPD model of the drug-body interaction. This project will only focus on PK, neglecting the interaction with a PD model.
Model overview
Our model consists of three principal modules:
- A solver (solver.py) that computes the distribution of solute in different tissue compartments over time, given input parameters including the number of compartments to model, dose, mode of administration (intravenous or subcutaneous), compartment volume and transition rate constants.
- A user interface (ux.py) that prompts the user to configure the model
- A visualisation module (visualiser.py) that generates and saves comparative plots to facilitate evaluation of PK using different administration methods.
Folder structure
This repository includes the following key files/folders:
- .github/workflows: directory of github actions ensuring continuous integration (CI) of repository updates
- data: directory for saving outputs
- docs: files required for automated document production
- jsons: directory for saving user input and passing to the solver
- pk_model: directory for main executables
- definitons.py: Key helper functions for the solver
- dosing.py: computes dose changes for different administration models
- solver.py: Solver model for PK modelling
- ux.py: User interface executable
- visualiser.py Graph plotting function
- README.md: text file populating this guide
- tests: unit tests fed to pytest for continuous integration
- venv: virtual environment including dependencies for this package
- .gitignore: file controlling which files are/are not updated by git during development
- requirements.txt: Dependencies required for proper package functioning
Installation
The project can be installed via pip: pip install pkproject-8 CHECK To exeute the file, navigate to the root directory of the pk_modelling folder in terminal and enter the following: python -m pk_model_main_pipeline.py
Runtime
The model will then pose a series of questions, to be answered using the command line. An example runscript is provided below:
How many models would you like to test? 1 What kind of models do you want to build? (intravenous bolous (ib) / subcutaneous (sc)): ib What compound or drug are you using? paracetamol How is the dose delivered? Constantly over time (c), Instantaneously (i) or Repeated instantaneous doses (r): c What is the dose of paracetamol that you want to test? (units in ng per hour): 500 What time period would you like to simluate the model? (units in hours): 48 What interval time would you like in the simulation? (units in hours): 1 What is the clearance rate? (units in ng/hour): 50 Enter volume (L), transition rate (ng/hour) for the main compartment (all seperated by spaces - eg: 5 25 ): 7 50 How many peripheral compartments do you want to test?: 1 Enter volume (L), transition rate (ng/hour) of the compartment (all seperated by spaces - eg: 5 25): 2 10 Please enter the name of the compartment (please ensure correct spelling): heart Would you like to generate a graph? (Y/N): y
This should produce a plot of the distribution of paracetamol between the main compartment and the heart, and save the resulting figure in data/xxx.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file oxbiodtp_7_PK_modelling-0.3.0.1.tar.gz
.
File metadata
- Download URL: oxbiodtp_7_PK_modelling-0.3.0.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bc54bddf7a7567f6ce718a3460a7415906005f31bb73b324b3e7ff7dbcd84ce |
|
MD5 | a01e2954a187e86cf4863f96793e935c |
|
BLAKE2b-256 | 45d327ca6b28b74c965393870feca423219c205bafaf5a978cc48c24c17445fe |
File details
Details for the file oxbiodtp_7_PK_modelling-0.3.0.1-py3-none-any.whl
.
File metadata
- Download URL: oxbiodtp_7_PK_modelling-0.3.0.1-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dac381c2bbc0ef52f65b5f3224107bc16fe0a930a3a2775f0f977c94f4d09c9 |
|
MD5 | 85f378f79178bba9c2adf3b4c85f03ea |
|
BLAKE2b-256 | 73e027a4001eaa5387300b9c18568105a134b510baa76cd8ec053f3333f30039 |