Skip to main content

py50_full.png

py50: Generate Dose-Response Curves

py50 Python Versions Streamlit DOI Documentation Status

Summary

The aim of py50 is to make the generation of dose-response curves and annotated plots with statistics. The project was created primarily for my personal use and for my coworkers/classmates. I found many of my classmates/coworkers were using a program that I find to be unfriendly in generating dose-response curves or with calculating statistics and plots. During my search, I found other helpful repositories that can generate dose-response curves, calculate statistics, or make annotated plots. However, I found that these packages did not meet my requirements:

  1. Use Pandas for the Data so that it can be easily plugged into a Jupyter Notebook or Python scripts
  2. Adaptable to user needs
  3. Easy to use (hopefully!)

The dose-response curves in py50 are built using the four parameter logistic regression model:

$Y = \text{Min} + \frac{\text{Max} - \text{Min}}{1 + \left(\frac{X}{\text{IC50}}\right)^{\text{Hill coefficient}}}$

where min is the minimum response value, max is the maximum response value, Y is the response values of the curves, and X is the concentration.

The statistics and annotated plots are wrapped from Pingouin and Statannotations. This may have been done inelegantly and will be updated based on my use or recommendations by others. As things stand, this project meets my needs and the needs of my classmates/coworkers. Hopefully it can meet the needs of others.

Installation

pip install py50

pacakge can be upgraded specifically using pip with the following:

pip install py50 -U

Tutorial

Documentation can be found here.

A Jupyter Notebook demoing the code can be found here.

A blog post demoing the code can be found at Practice in Code

Web Application Streamlit App

For those who are not versed in python coding, py50 has been converted into a web application using Streamlit!

The web application can be found here: py50-app

The repository for the Streamlit app version can be found here: py50-streamlit

NOTE: Updates to the web application take more time. Updates will be made when possible or upon request.

MCP

py50 ships an MCP server that exposes its dose-response calculations and plots to an MCP-compatible client — Claude Desktop, or a local LLM through a runner such as Jan or LM Studio.

To get started, install py50 with the MCP dependencies:

pip install 'py50[mcp]'

This adds a py50-mcp executable to your environment. The MCP can then be set up as follows:

{
  "mcpServers": {
    "py50": {
      "command": "/absolute/path/to/env/bin/py50-mcp"
    }
  }
}

Test installation by running which py50-mcp in the activated environment.

Citation

If you are interested in citing the repository, the BibTeX reference is as follows:

@software{lin_2024_14523624,
  author       = {Lin, Tony Eight},
  title        = {py50: Generate Dose-Response Curves},
  month        = dec,
  year         = 2024,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.10183912},
  url          = {https://doi.org/10.5281/zenodo.10183912},
}

All versions can be linked to the Zenodo repository here: DOI

Thanks for your interest!

Metadata

Release files for py50 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py50 1.2.0
File Size Uploaded
py50-1.2.0.tar.gz 39.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py50 1.2.0
File Interpreter ABI Platform
py50-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 83.3 kB

Release files / py50-1.2.0.tar.gz

Download URL py50-1.2.0.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f2fc467de1dc9e7d2b93e64c666e7d13bc13dc22822a1d85c1f34de9296ac2de
BLAKE2b-256 checksum
How to use checksums
52789b409e1c67ea43845bc468997467f2f15b55701c68ad4a2067b9dbf1b5ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / py50-1.2.0-py3-none-any.whl

Download URL py50-1.2.0-py3-none-any.whl
Size 43.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74818223ee1646938a7c39927ac489405d482e2db2eb39d91f88dfbfd31742ff
BLAKE2b-256 checksum
How to use checksums
8f6d0de80f2eb31c87e5ec8a03103fd49c5dd411822135e6f55f4dc87ab0df3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page