A Python package for fitting and plotting of binding curves.
Project description
Welcome to BindCurve
This repository contains bindcurve - a lightweight Python package for fitting and plotting of binding curves (dose-response curves). It contains the logistic model for fitting $\text{IC}_{50}$ or $\text{logIC}_{50}$ and also exact polynomial models for fitting $K_d$ from both direct and competitive binding experiments. Fixing lower and upper asymptotes of the models during fitting is supported, as well as fixing the slope in the logistic model. Additionally, $\text{IC}_{50}$ values can be converted to $K_d$ using conversion models.
bindcurve is intended as a simple tool for Python-based workflows in Jupyter notebooks or similar tools. Even if you have never used Python before, you can fit your binding curve in less than 5 lines of code. The results can be conveniently plotted with another few lines of code or simply reported in formatted output.
[!WARNING]
bindcurveis currently in Alpha version. Changes to API might happen momentarily without notice. If you encounter bugs, please report them as Issues.
Documentation
The bindcurve documentation can be found at https://choutkaj.github.io/bindcurve/.
Installation
bindcurve is installed from pip using
pip install bindcurve
If you want to upgrade to the latest version, use
pip install --upgrade bindcurve
Basic usage
bindcurve contains functions that are executed directly on Pandas DataFrames, which are used to store the data. The following example demonstrates the most basic usage. See the tutorials for more instructions and examples.
Fitting
# Import bindcurve
import bindcurve as bc
# Load data from csv file
input_data = bc.load_csv("path/to/your/file.csv")
# This DataFrame will now contain preprocessed input data
print(input_data)
# Fit IC50 from your data
IC50_results = bc.fit_50(input_data, model="IC50")
print(IC50_results)
# Fit Kd from your data
Kd_results = bc.fit_Kd_competition(input_data, model="comp_3st_specific", RT=0.05, LsT=0.005, Kds=0.0245)
print(Kd_results)
Plotting
# Import matplotlib
import matplotlib.pyplot as plt
# Initiate the plot
plt.figure(figsize=(6, 5))
# Plot your curves from the IC50_results dataframe
bc.plot(input_data, IC50_results)
# Just use matplotlib to set up and show the plot
plt.xlabel("your x label")
plt.ylabel("your y label")
plt.xscale("log")
plt.legend()
plt.show()
How to cite
No dedicated DOI is available yet. Please cite this repository.
License
bindcurve is published under the MIT license.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bindcurve-0.1.0.tar.gz.
File metadata
- Download URL: bindcurve-0.1.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7f81b9ebd355f536751ff46bf7f76fd4031f94075580dc42a3bedc1f4a06ba4
|
|
| MD5 |
0654296f4e562ad6ca048ce2281d9691
|
|
| BLAKE2b-256 |
8984caaf82763ff152fac1f197856cd4c095f162c2c218dbb97737059533ba7e
|
Provenance
The following attestation bundles were made for bindcurve-0.1.0.tar.gz:
Publisher:
release.yml on choutkaj/bindcurve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bindcurve-0.1.0.tar.gz -
Subject digest:
b7f81b9ebd355f536751ff46bf7f76fd4031f94075580dc42a3bedc1f4a06ba4 - Sigstore transparency entry: 255652102
- Sigstore integration time:
-
Permalink:
choutkaj/bindcurve@61af1faf63b558984e13af0bd54b3395a47e368a -
Branch / Tag:
refs/tags/v0.1.0-alpha2 - Owner: https://github.com/choutkaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61af1faf63b558984e13af0bd54b3395a47e368a -
Trigger Event:
release
-
Statement type:
File details
Details for the file bindcurve-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bindcurve-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e668498f5b6fbd9cbe206329aeca526aecb860db06f6c4083144261771cb8b56
|
|
| MD5 |
a321d8abdcfc2e109f31e13ca52a42c0
|
|
| BLAKE2b-256 |
af4cfc9e30a0d5e734ee02497ca2ec1b866a8df9a8bda6bed877a0888f68bba1
|
Provenance
The following attestation bundles were made for bindcurve-0.1.0-py3-none-any.whl:
Publisher:
release.yml on choutkaj/bindcurve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bindcurve-0.1.0-py3-none-any.whl -
Subject digest:
e668498f5b6fbd9cbe206329aeca526aecb860db06f6c4083144261771cb8b56 - Sigstore transparency entry: 255652108
- Sigstore integration time:
-
Permalink:
choutkaj/bindcurve@61af1faf63b558984e13af0bd54b3395a47e368a -
Branch / Tag:
refs/tags/v0.1.0-alpha2 - Owner: https://github.com/choutkaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61af1faf63b558984e13af0bd54b3395a47e368a -
Trigger Event:
release
-
Statement type: