Cli for fitting macromolecule pH titration or binding assays data e.g. fluorescence spectra.
Project description
ClopHfit
Cli for fitting macromolecule pH titration or binding assays data e.g. fluorescence spectra.
Version: “0.3.0a1”
Installation
At this stage few scripts are available in src/clophfit/old.
pyenv install 3.6.15 poetry install poetry run pytest -v
Use
fit_titration.py
A single script for pK and Cl and various methods w/out bootstraping: 1. svd 2. bands and 3. single lambda.
input ← csvtable and note_file
output → pK spK (stdout) and pdf of analysis
To do
Bootstrap svd with optimize or lmfit.
Average spectra
Join spectra [‘B’, ‘E’, ‘F’]
Compute band integral (or sums)
fit_titration_global.py
A script for fitting tuples (y1, y2) of values for each concentration (x). It uses lmfit confint and bootstrap.
input ← x y1 y2 (file)
output → K SA1 SB1 SA2 SB2 , png and correl.png
In global fit the best approach was using lmfit without bootstraping.
Example
for i in *.dat; do gfit $i png2 --boot 99 > png2/$i.txt; done
Old tecan todo list
I do not know how to unittest
better fit 400, 485 (also separated) e bootstrap to estimate uncertanty
print sorted output
buffer correction and report controls e.g. S202N, E2 and V224Q
dilution correction
check metadata and report the diff REMEMBER 8.8; dataframe groupby per meta_pre, ma anche enspire
fit chloride
fluorescence is constant? GREAT
plot data when fit fail and save txt file
Development
Make sure this README passes https://pypi.org/project/readme-renderer/
gh release create (--target devel) v0.3.0a0 gh workflow disable|enable|view|run|list
TL;DR
poetry env use 3.9 poetry install pre-commit install pre-commit install --hook-type commit-msg
When needed (e.g. API updates):
sphinx-apidoc -f -o docs/api/ src/clophfit/
For Jupyter:
poetry run python -m ipykernel install --user --name="clophfit"
Development environment
Test automation requires nox and nox-poetry.
Formatting with black[jupyter] configured in pyproject.
Linters are configured in .flake8 .darglint and .isort.cfg and include:
- flake8-isort - flake8-bugbear - flake8-docstrings - darglint - flake8-eradicate - flake8-comprehensions - flake8-pytest-style - flake8-annotations (see mypy)
pre-commit configured in .pre-commit-config.yaml activated with:
- pre-commit install - commitizen install --hook-type commit-msg
Tests coverage (pytest-cov) configured in .coveragerc.
Type annotation configured in mypy.ini.
Commitizen also used to bump version:
cz bump --changelog --prerelease alpha --increment MINOR
need one-time initialization:
(cz init)
xdoctest
sphinx with pydata-sphinx-theme and sphinx-autodoc-typehints. (nbsphinx, sphinxcontrib-plantuml):
mkdir docs; cd docs sphinx-quickstart
Edit conf.py [“sphinx.ext.autodoc”] and index.rst [e.g. api/modules]:
sphinx-apidoc -f -o docs/api/ src/clophfit/
CI/CD to PYPI configured in .github/:
tests.yml release.yml
What is missing to modernize:
coveralls/Codecov
release drafter
readthedocs or ghpages? https://www.docslikecode.com/articles/github-pages-python-sphinx/
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
Hashes for ClopHfit-0.3.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 371c705917f96fbc02573f7575f6ff8e9a5b860896623301b2dae832eb9d36fa |
|
MD5 | 14c3adacd85994b97ea9a870df4cea2c |
|
BLAKE2b-256 | f9fc951e085189cef99dffc56ba07fd775ed5c0969463470161df3c08941af0b |