Skip to main content

A package for fitting benchmark dose curves to dichotomous, proportional, and light photomotor response data

Project description

bmdrc

Python library for the calculation of BenchMark Dose Response Curves (bmdrc) for binary, continuous, and larval photomotor response data. We suggest using Python version 3.10 or later.

Please cite: Degnan, D. J., Bramer, L. M., Truong, L., Tanguay, R. L., Gosline, S. M., & Waters, K. M. (2025). bmdrc: Python package for quantifying phenotypes from chemical exposures with benchmark dose modeling. PLOS Computational Biology, 21(7), e1013337.

Read the full paper here

General Schematic

Originally built to calculate benchmark doses (BMDs) for dichotomous data converted to proportions, bmdrc has now been expanded to also fit curves for continuous data.

General bmdrc inputs and outputs

  1. Input Data Module: Import data into the python library.

  2. Pre-Processing Module: Combine and remove endpoints as needed.

  3. Filtering Modules: Apply recommended filters from the EPA and statistics experts.

  4. Model Fitting Modules: Fit recommended models from the EPA and statistics experts. The best fit model is auto-selected for you.

  5. Output Modules: Select tables to output as csvs. View plots in a HTML report.

How to install the package

First, install the package from pip using:

pip install bmdrc

Or from github using:

pip install git+https://github.com/PNNL-CompBio/bmdrc

Package terminology

A phenotype being measured in response to a chemical exposure is called an endpoint. This can be the presence or absence of a deformity (dichotomous data) or a continuous measurement (like from an assay). Each endpoint has a response variable if it can be modeled directly. When a raw measurement needs transormation before modeling (e.g., converting a value of 0 or 1 to a proportional response for dichotomous data), the initial measurement is referred to as a value. While not always required, researchers may also track data associated with the plate, well, and time of the experiment for object in specific classes.

How to use the package

Dichotomous Data

  • BinaryClass The BinaryClass object contains specific pre-processing and filtering functions that pertain to plates and wells. Each value should be a 0, 1, or NA, and bmdrc will caculate the response column. The following columns are needed for data in long and wide format: chemical, plate, well, concentration. The following columns are only needed for data in wide format: endpoint, value. See a full pipeline demo here

  • ProportionalClass If your data does not contain plates and wells, the ProportionalClass object only requires a chemical, endpoint, concentration, and response (a proportion ranging from 0 to 1). Data must be in long format. See a full pipeline demo here

  • LPRClass In the LPRClass, larval photomotor response data can be converted to dichotomous as described in Thomas et al 2019. Data must be in long format and contain the following columns: chemical, plate, well, concentration, time, and value. Users must specify the time between cycles, the cooldown time between cycles, and whether to start with a light or dark cycle. If this format does not fit your data nicely, please report it to the issues tab. See a full pipeline demo here

Available Models: gamma, log logistic, log probit, logistic, multistage, probit, quantal linear, Weibull

Continuous Data

  • ContinuousClass The ContinuousClass object requires only four columns: chemical, endpoint, concentration, and response (a continuous variable with any range). All selected models support negative numbers and zeroes. NA values are automatically filtered out. All models assume that data is meant to be monotonic (increasing/staying the same OR decreasing/staying the same). Thus, there will be one curve. See a full pipeline demo here

Available Models: asymptotic regression, exponential, Gompertz, Hill, Michaelis-Mentin, power, Weibull

Example Data and Reports

Example Data

Example data for dichotomous, proportional, larval photomotor response, and continuous data can be found here.

Example Report

A sample generated report for:

  • binary (dichotomous)/proportional data can be found here

  • larval photomotor response (LPR) data can be found here

  • reports for continuous data coming soon!

Logo

Feel free to use our logo when referring to our tool!

bmdrc

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

bmdrc-1.1.1.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

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

bmdrc-1.1.1-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file bmdrc-1.1.1.tar.gz.

File metadata

  • Download URL: bmdrc-1.1.1.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for bmdrc-1.1.1.tar.gz
Algorithm Hash digest
SHA256 aeddfecf1aee51331197e925f07e71c39d7c571e57ce4af3efbc9896e7f96835
MD5 0c246789b091a357f0fe0ef8220bd53f
BLAKE2b-256 f7d18ee565c99426da8e15b8498a8c0215c026feb842a48e8afc634ee41a067f

See more details on using hashes here.

File details

Details for the file bmdrc-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: bmdrc-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for bmdrc-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55dd8d316b868ca7e9dcc764e93ff150658a99fdea315ae710c2824268da8e25
MD5 27005311df190d35f1d0ceae644adc0d
BLAKE2b-256 2634f59e351029be747ed823bd6bbd190a8a7a54a29fb11939da815950781c46

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