Package: oxbiodtp-7-PK-modelling
Pharmacokinetic Modelling Group ProjectA PharmacoKinetic (PK) modelling function for analysis of injected solute dynamics over time, developed by Group 6 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/AuthorsAmit Halkhoree -amit.halkhoree@dtc.ox.ac.ukCameron Anderson -cameron.anderson@dtc.ox.ac.ukDan Hudson -alexander.hudson@dtc.ox.ac.ukIshaan Kapoor -ishaan.kapoor@dtc.ox.ac.ukJoseph Pollacco -joseph.pollacco@dtc.ox.ac.ukSamuel Johnson -samuel.johnson@dtc.ox.ac.ukBackgroundRef: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 overviewOur 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 constantsA user interface (ux.py) that prompts the user to configure the modelA visualisation module (visualiser.py) that generates and saves comparative plots to facilitate evaluation of PK using different administration methodsFolder structureThis repository includes the following key files/folders:.github/workflows: directory of github actions ensuring continuous integration (CI) of repository updatesdata: directory for saving outputsdocs: files required for automated document productionjsons: directory for saving user input and passing to the solverpk_model: directory for main executablesdefinitons.py: Key helper functions for the solverdosing.py: computes dose changes for different administration modelssolver.py: Solver model for PK modellingux.py: User interface executablevisualiser.py Graph plotting functionREADME.md: text file populating this guidetests: unit tests fed to pytest for continuous integrationvenv: virtual environment including dependencies for this package.gitignore: file controlling which files are/are not updated by git during developmentrequirements.txt: Dependencies required for proper package functioningInstallationClone the git repository to your local directory:'git clonehttps://github.com/Software-Engineering-BBSRC-Group-6/PK_modelling'Set the correct working directory:'cd PK_modelling'We recommend then creating and activating a virtual environment'python 3 venv venv''source venv/bin/activate'The project dependencies can then be installed via pippip install oxbiodtp-7-PK-modellingOR'pip install -r requirements.txt' (this will also install modules required for development)'Execute the main file to run the programmepython -m pk_model_main_pipeline.py\RuntimeThe 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? 1What kind of models do you want to build? (intravenous bolous (ib) / subcutaneous (sc)): ibWhat compound or drug are you using? paracetamolHow is the dose delivered? Constantly over time (c), Instantaneously (i) or Repeated instantaneous doses (r): iWhat is the mass of the dose of paracetamol that you want to test? (units in ng): 500What time period would you like to simluate the model? (units in hours): 24What interval time would you like in the simulation? (units in hours): 1What is the clearance rate? (units in ng/hour): 50Enter volume (L), transition rate (ng/hour) for the main compartment (all seperated by spaces - eg: 5 25 ): 7 50How many peripheral compartments do you want to test?: 1Enter volume (L), transition rate (ng/hour) of the compartment (all seperated by spaces - eg: 5 25): 2 25Please enter the name of the compartment (please ensure correct spelling): heartWould you like to generate a graph? (Y/N): yThis should produce a plot of the distribution of paracetamol between the main compartment and the heart, and save the resulting .csv in the data directory.
NB: If running multiple models, please use the same number of compartments - developers are working to correct this issue.