Skip to main content

Cli for fitting macromolecule pH titration or binding assays data e.g. fluorescence spectra.

Project description

PyPI Tests RtD zenodo

ClopHfit

Cli for fitting macromolecule pH titration or binding assay data, e.g. fluorescence spectra.

  • Version: “0.3.4”

Features

  • Plate Reader data Parser.

  • Perform non-linear least square fitting.

  • Extract and fit pH and chloride titrations of GFP libraries.

    • For 2 labelblocks (e.g. 400, 485 nm) fit data separately and globally.

    • Estimate uncertainty using bootstrap.

    • Subtract buffer for each titration point.

    • Report controls e.g. S202N, E2 and V224Q.

    • Correct for dilution of titration additions.

    • Plot data when fitting fails and save txt file anyway.

Usage

  • Extract and fit titrations from a list of tecan files collected at various pH or chloride concentrations:

    clop prtecan --help

    For example:

    clop prtecan list.pH -k ph --scheme ../scheme.txt --dil additions.pH --norm \
      --out prova2 --Klim 6.8,8.4 --sel 7.6,20

    To reproduce older pr.tecan add –no-weight option:

    clop prtecan list.pH -k ph --scheme ../scheme.txt --no-bg --no-weight \
      --out 4old --Klim 6.8,8.4 --sel 7.6,20
  • Predict chloride dissociation constant K_d at given pH:

    clop eq1 --help

To use clophfit in a project:

from clophfit import prtecan, binding

Installation

You can get the library directly from PyPI:

pip install clophfit

Development

Prepare a virtual development environment and test first installation:

pyenv install 3.10.2
poetry env use 3.10
poetry install
poetry run pytest -v

Make sure:

pre-commit install
pre-commit install --hook-type commit-msg

For Jupyter:

poetry run python -m ipykernel install --user --name="cloph-310"

To generate docs:

poetry run nox -rs docs

When needed (e.g. API updates):

sphinx-apidoc -f -o docs/api/ src/clophfit/

Use commitizen and github-cli to release:

poetry run cz bump --changelog-to-stdout --files-only (--prerelease alpha) --increment MINOR
gh release create (--target devel) v0.3.0a0

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)
    - flake8-rst-docstrings
    • rst-lint

  • 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-to-stdout --files-only --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 configured in .github/workflows:

    tests.yml
    release.yml

    Remember to update tools version e.g. nox_poetry==0.9.

What is missing to modernize:

Code of Conduct

Everyone interacting in the readme_renderer project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PSF Code of Conduct.

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

ClopHfit-0.3.4.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

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

clophfit-0.3.4-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file ClopHfit-0.3.4.tar.gz.

File metadata

  • Download URL: ClopHfit-0.3.4.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.8.10 Linux/5.15.0-1019-azure

File hashes

Hashes for ClopHfit-0.3.4.tar.gz
Algorithm Hash digest
SHA256 dacea74467bf7032ed52eb3458b86d607401a7a42aa9b299f52b53bdf5cdcedb
MD5 ab122836182c143bd7f41e49b349ceaf
BLAKE2b-256 4fb99972fea6adea9b1d08285a231372d52a2e1b645c461988a83b076dd71762

See more details on using hashes here.

File details

Details for the file clophfit-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: clophfit-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.8.10 Linux/5.15.0-1019-azure

File hashes

Hashes for clophfit-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 89970280b26e5ccdbae4d34f233c2fa7b06852aee169027ef9509a0b8b179158
MD5 e4352a416f398d6d705441d5ce7b97c4
BLAKE2b-256 ff4c4ae7ab3b72382132471d787dc711d4f23abcd80f0e84c1ab52bd2bbe0e3d

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