Skip to main content

An example Python project.

Project description

Run unit tests for pkmodel BCH compliance codecov Documentation Status License: MIT

PK_Model, a pharmacokinetic model developed by students on the Oxford Interdisciplinary Bioscience DTP

This is a package to run a user-specifed pharmacokinetic model (PK model). The user can specify the number of peripheral compartment around a central compartment, a dosing type (I.V. or S.C.), and a dosing protocol. A solver will solve the differential equations that model the pharmacokinetics of the compartments, and graphs comparing the solutions of different model parameters will be outputted.

The package is pip installable and can be run on the latest windows, ubuntu and macos operating systems.

Quickstart

  1. First clone or fork this repository and navigate to the repository's top directory
git clone https://github.com/Down-To-Programme/PK_Model.git
cd PK_Model
  1. We recommend that you create a virtual environment with python versons 3.6+ to use our package. Tests are run continuously on these python versions to ensure the package works, but previous versions are not tested.
python3 –m venv venv
source venv/bin/activate
  1. To install requirements and dependencies, you can use our setup.py file by typing:

pip install –e .

Running the model

[Most user-friendly option] You can run an interactive script that will take you through the different steps needed to specify the parameters of the PK model. It will then generate a plot, giving you the options to compare two different models and to save the generated figure. Run this script from the command line with:

python interactive_pkmodel.py

Or you can run an example model from the command line with:

python try_out_script.py

Alternatively you can pip install the dtp-pkmodel package with:

pip install dtp-pkmodel

open your python interpreter and import:

python
>>> import pkmodel

Directory structure

.
├── LICENSE
├── README.md
├── build
│   ├── bdist.macosx-10.15-x86_64
│   └── lib
│       └── pkmodel
│           ├── __init__.py
│           ├── model.py
│           ├── protocol.py
│           ├── solution.py
│           ├── tests
│           │   ├── __init__.py
│           │   ├── test_model.py
│           │   ├── test_pipeline.py
│           │   ├── test_protocol.py
│           │   └── test_solution.py
│           └── version_info.py
├── dist
│   ├── dtp_pkmodel-1.0.1-py3-none-any.whl
│   └── dtp_pkmodel-1.0.1.tar.gz
├── docs
│   ├── Makefile
│   ├── conf.py
│   ├── index.rst
│   └── make.bat
├── dtp_pkmodel.egg-info
│   ├── PKG-INFO
│   ├── SOURCES.txt
│   ├── dependency_links.txt
│   ├── requires.txt
│   └── top_level.txt
├── pkmodel
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-38.pyc
│   │   ├── model.cpython-38.pyc
│   │   ├── protocol.cpython-38.pyc
│   │   ├── solution.cpython-38.pyc
│   │   └── version_info.cpython-38.pyc
│   ├── model.py
│   ├── protocol.py
│   ├── solution.py
│   ├── tests
│   │   ├── __init__.py
│   │   ├── __pycache__
│   │   │   ├── __init__.cpython-38.pyc
│   │   │   ├── test_model.cpython-38.pyc
│   │   │   ├── test_protocol.cpython-38.pyc
│   │   │   └── test_solution.cpython-38.pyc
│   │   ├── test_model.py
│   │   ├── test_pipeline.py
│   │   ├── test_protocol.py
│   │   └── test_solution.py
│   └── version_info.py
├── requirements.txt
├── interactive_pkmodel.py
├── setup.py
└── try_out_script.py

Raising issues

If you spot an issue and would like us to fix it, let us know by:

  1. Pulling changes from the master branch to avoid conflicts:

git pull origin master

  1. Create an issue on GitHub by navigating to the 'Issues' tab in the repository's home page

  2. Create a new branch corresponding to the issue with git

git checkout -b <new-branch>

  1. Make your changes and then use git add, commit and push your changes to the repository on GitHub

git add <file>

(You can find out what files need to be added with git status)

git commit –m "issue-number-comment" 
git push origin <new-branch>
  1. Make a pull request on GitHub

License

This package was created under the MIT License. Read more about this at https://github.com/Down-To-Programme/PK_Model/blob/master/LICENSE

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dtp_pkmodel-1.0.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dtp_pkmodel-1.0.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file dtp_pkmodel-1.0.0.tar.gz.

File metadata

  • Download URL: dtp_pkmodel-1.0.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for dtp_pkmodel-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ccf6d9427d6a626343f1a1a3a86aebbadc76f4ba172cfa9a7acdce0450bff672
MD5 c4ab8c3c459f234f9668d5af33d17c05
BLAKE2b-256 c4a38c81f5f6defe4c99aa985aedac98e678f5da84568134ccfa9f6ab7cef539

See more details on using hashes here.

File details

Details for the file dtp_pkmodel-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dtp_pkmodel-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for dtp_pkmodel-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aff9cf034a2ad51c6df8be24ea0b6262cf3af0856b42db1140fa1300eb73d162
MD5 15fc69c887aa398cce8c36a7780a984b
BLAKE2b-256 26771f64465760dfbb372162e6328ccb645de5e3b9d098e77936cee6343a8bd1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page