bindcurve 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bindcurve-0.1.0/LICENSE +21 -0
- bindcurve-0.1.0/PKG-INFO +93 -0
- bindcurve-0.1.0/README.md +78 -0
- bindcurve-0.1.0/bindcurve/__init__.py +16 -0
- bindcurve-0.1.0/bindcurve/calculate.py +639 -0
- bindcurve-0.1.0/bindcurve/data.py +829 -0
- bindcurve-0.1.0/bindcurve/models.py +369 -0
- bindcurve-0.1.0/bindcurve/models_other.py +100 -0
- bindcurve-0.1.0/bindcurve.egg-info/PKG-INFO +93 -0
- bindcurve-0.1.0/bindcurve.egg-info/SOURCES.txt +13 -0
- bindcurve-0.1.0/bindcurve.egg-info/dependency_links.txt +1 -0
- bindcurve-0.1.0/bindcurve.egg-info/requires.txt +4 -0
- bindcurve-0.1.0/bindcurve.egg-info/top_level.txt +1 -0
- bindcurve-0.1.0/pyproject.toml +31 -0
- bindcurve-0.1.0/setup.cfg +4 -0
bindcurve-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 choutkaj
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
bindcurve-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: bindcurve
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python package for fitting and plotting of binding curves.
|
|
5
|
+
Author-email: Jan Choutka <jan.choutka@uochb.cas.cz>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: numpy
|
|
11
|
+
Requires-Dist: pandas
|
|
12
|
+
Requires-Dist: matplotlib
|
|
13
|
+
Requires-Dist: lmfit
|
|
14
|
+
Dynamic: license-file
|
|
15
|
+
|
|
16
|
+
# Welcome to BindCurve
|
|
17
|
+
|
|
18
|
+
[](https://github.com/choutkaj/bindcurve/blob/main/LICENSE)
|
|
19
|
+
[](https://github.com/choutkaj/bindcurve/actions/workflows/pylint.yml)
|
|
20
|
+
[](https://github.com/choutkaj/bindcurve/actions/workflows/lint.yml)
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
`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.
|
|
25
|
+
|
|
26
|
+
> [!WARNING]
|
|
27
|
+
> `bindcurve` is currently in Alpha version. Changes to API might happen momentarily without notice. If you encounter bugs, please report them as Issues.
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
The `bindcurve` documentation can be found at https://choutkaj.github.io/bindcurve/.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
`bindcurve` is installed from pip using
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
pip install bindcurve
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If you want to upgrade to the latest version, use
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
pip install --upgrade bindcurve
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Basic usage
|
|
46
|
+
`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.
|
|
47
|
+
|
|
48
|
+
### Fitting
|
|
49
|
+
```python
|
|
50
|
+
# Import bindcurve
|
|
51
|
+
import bindcurve as bc
|
|
52
|
+
|
|
53
|
+
# Load data from csv file
|
|
54
|
+
input_data = bc.load_csv("path/to/your/file.csv")
|
|
55
|
+
|
|
56
|
+
# This DataFrame will now contain preprocessed input data
|
|
57
|
+
print(input_data)
|
|
58
|
+
|
|
59
|
+
# Fit IC50 from your data
|
|
60
|
+
IC50_results = bc.fit_50(input_data, model="IC50")
|
|
61
|
+
print(IC50_results)
|
|
62
|
+
|
|
63
|
+
# Fit Kd from your data
|
|
64
|
+
Kd_results = bc.fit_Kd_competition(input_data, model="comp_3st_specific", RT=0.05, LsT=0.005, Kds=0.0245)
|
|
65
|
+
print(Kd_results)
|
|
66
|
+
```
|
|
67
|
+
### Plotting
|
|
68
|
+
```python
|
|
69
|
+
# Import matplotlib
|
|
70
|
+
import matplotlib.pyplot as plt
|
|
71
|
+
|
|
72
|
+
# Initiate the plot
|
|
73
|
+
plt.figure(figsize=(6, 5))
|
|
74
|
+
|
|
75
|
+
# Plot your curves from the IC50_results dataframe
|
|
76
|
+
bc.plot(input_data, IC50_results)
|
|
77
|
+
|
|
78
|
+
# Just use matplotlib to set up and show the plot
|
|
79
|
+
plt.xlabel("your x label")
|
|
80
|
+
plt.ylabel("your y label")
|
|
81
|
+
plt.xscale("log")
|
|
82
|
+
plt.legend()
|
|
83
|
+
plt.show()
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## How to cite
|
|
89
|
+
No dedicated DOI is available yet. Please cite this repository.
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
`bindcurve` is published under the MIT license.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Welcome to BindCurve
|
|
2
|
+
|
|
3
|
+
[](https://github.com/choutkaj/bindcurve/blob/main/LICENSE)
|
|
4
|
+
[](https://github.com/choutkaj/bindcurve/actions/workflows/pylint.yml)
|
|
5
|
+
[](https://github.com/choutkaj/bindcurve/actions/workflows/lint.yml)
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
`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.
|
|
10
|
+
|
|
11
|
+
> [!WARNING]
|
|
12
|
+
> `bindcurve` is currently in Alpha version. Changes to API might happen momentarily without notice. If you encounter bugs, please report them as Issues.
|
|
13
|
+
|
|
14
|
+
## Documentation
|
|
15
|
+
The `bindcurve` documentation can be found at https://choutkaj.github.io/bindcurve/.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
`bindcurve` is installed from pip using
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
pip install bindcurve
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If you want to upgrade to the latest version, use
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
pip install --upgrade bindcurve
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Basic usage
|
|
31
|
+
`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.
|
|
32
|
+
|
|
33
|
+
### Fitting
|
|
34
|
+
```python
|
|
35
|
+
# Import bindcurve
|
|
36
|
+
import bindcurve as bc
|
|
37
|
+
|
|
38
|
+
# Load data from csv file
|
|
39
|
+
input_data = bc.load_csv("path/to/your/file.csv")
|
|
40
|
+
|
|
41
|
+
# This DataFrame will now contain preprocessed input data
|
|
42
|
+
print(input_data)
|
|
43
|
+
|
|
44
|
+
# Fit IC50 from your data
|
|
45
|
+
IC50_results = bc.fit_50(input_data, model="IC50")
|
|
46
|
+
print(IC50_results)
|
|
47
|
+
|
|
48
|
+
# Fit Kd from your data
|
|
49
|
+
Kd_results = bc.fit_Kd_competition(input_data, model="comp_3st_specific", RT=0.05, LsT=0.005, Kds=0.0245)
|
|
50
|
+
print(Kd_results)
|
|
51
|
+
```
|
|
52
|
+
### Plotting
|
|
53
|
+
```python
|
|
54
|
+
# Import matplotlib
|
|
55
|
+
import matplotlib.pyplot as plt
|
|
56
|
+
|
|
57
|
+
# Initiate the plot
|
|
58
|
+
plt.figure(figsize=(6, 5))
|
|
59
|
+
|
|
60
|
+
# Plot your curves from the IC50_results dataframe
|
|
61
|
+
bc.plot(input_data, IC50_results)
|
|
62
|
+
|
|
63
|
+
# Just use matplotlib to set up and show the plot
|
|
64
|
+
plt.xlabel("your x label")
|
|
65
|
+
plt.ylabel("your y label")
|
|
66
|
+
plt.xscale("log")
|
|
67
|
+
plt.legend()
|
|
68
|
+
plt.show()
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## How to cite
|
|
74
|
+
No dedicated DOI is available yet. Please cite this repository.
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
`bindcurve` is published under the MIT license.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from bindcurve.data import load_csv, load_df, plot, plot_grid, plot_asymptotes, plot_traces, plot_value, report
|
|
2
|
+
from bindcurve.calculate import fit_50, fit_Kd_direct, fit_Kd_competition, convert
|
|
3
|
+
from bindcurve.models import IC50, logIC50,dir_simple, dir_specific, dir_total, comp_3st_specific, comp_3st_total, comp_4st_specific, comp_4st_total, cheng_prusoff, cheng_prusoff_corr, coleska
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
"load_csv", "load_df", "plot", "plot_grid", "plot_asymptotes", "plot_traces", "plot_value", "report",
|
|
8
|
+
"fit_50", "fit_Kd_direct", "fit_Kd_competition", "convert", "IC50", "logIC50", "dir_simple", "dir_specific", "dir_total",
|
|
9
|
+
"comp_3st_specific", "comp_3st_total", "comp_4st_specific", "comp_4st_total", "cheng_prusoff", "cheng_prusoff_corr", "coleska",
|
|
10
|
+
"__version__"
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|