Protein pKa and environment analysis with an interactive HTML dashboard
Project description
pKaRaptor
pKaRaptor is a Python toolkit for the analysis of protein protonation states and residue-level physicochemical environments, with results presented through an interactive HTML dashboard.
The package is intended for structure-based exploration of ionizable residues and their local environments, supporting the inspection of protonation-related features in proteins. It was developed to facilitate the interpretation of pKa-relevant structural descriptors in a practical and accessible format for research workflows.
Overview
Protonation states play an important role in protein structure, stability, dynamics, and function. pKaRaptor was developed as a lightweight toolkit to help researchers inspect protein structures with a focus on ionizable residues and their surrounding physicochemical environments.
The package combines command-line workflows with an interactive dashboard, allowing users to move from structure processing to exploratory analysis in a reproducible and accessible way.
Features
- Analysis of protein protonation states and residue-level physicochemical environments from PDB structures
- Integration of multiple pKa sources, including local and external predictions
- Support for membrane-aware annotation through OPM/PPM-oriented structures
- Interactive HTML dashboard for visual exploration of results
- Export of residue selections from the dashboard in JSON format
- Utilities to apply residue-name selections to structures
- Protonation workflows using OpenMM templates
Installation
Install from PyPI
pip install pkaraptor
Create and activate a dedicated environment (recommended)
Using conda:
conda create -n pkaraptor python=3.10
conda activate pkaraptor
pip install pkaraptor
Using venv:
python -m venv pkaraptor-env
source pkaraptor-env/bin/activate
pip install pkaraptor
Installation from source
git clone https://github.com/jmargaridars/pkaraptor.git
cd pkaraptor
pip install -e .
Requirements
- Python 3.10 or later
Command-line tools
After installation, the following command-line tools should be available:
pkaraptor
pkaraptor-dashboard
pkaraptor-apply-json
pkaraptor-protonate
Main analysis
The main pkaraptor command generates a protonation and environment analysis CSV from a PDB structure using pKa sources and environment descriptors.
pkaraptor --pdb input.pdb
To inspect all available options:
pkaraptor -h
Main options
--pdbinput PDB file--phpH at which protonation fractions are computed--outoutput CSV file name--no-propkadisable local PROPKA execution--pypka-csvPyPka server CSV input--deepka-csvDeepKa server CSV input--opm-idoptional OPM identifier for downstream visualization--opm-zminlower Z boundary of membrane slab in Angstrom--opm-zmaxupper Z boundary of membrane slab in Angstrom--opm-pdboriented PDB from PPM/OPM for environment feature calculation--opm-residueslegacy residue ranges without chain identifiers--opm-embeddedchain-aware embedded residues, repeatable by chain
Example usage
Basic analysis:
pkaraptor --pdb protein.pdb
Analysis at a defined pH with a custom output file:
pkaraptor --pdb protein.pdb --ph 7.4 --out protonation_environment_analysis.csv
Analysis using external pKa predictions:
pkaraptor --pdb protein.pdb --pypka-csv pypka_results.csv --deepka-csv deepka_results.csv
Membrane-aware analysis using an OPM-oriented structure:
pkaraptor --pdb protein.pdb --opm-pdb protein_opm.pdb --opm-zmin -15 --opm-zmax 15
Chain-aware membrane embedded residues:
pkaraptor --pdb protein.pdb --opm-embedded "A:48-66,69,426" --opm-embedded "B:48-66,69,426,461"
Dashboard generation
The pkaraptor-dashboard command builds an interactive protonation dashboard HTML from a PDB structure and a CSV file produced by pkaraptor.
pkaraptor-dashboard --pdb protein.pdb --csv protonation_environment_analysis.csv --out dashboard.html
To inspect all available options:
pkaraptor-dashboard -h
Dashboard options
--pdbinput PDB file--csvCSV file produced bypkaraptor--phpH used for the analysis, displayed in the dashboard title--outoutput HTML file
Apply dashboard selections to a PDB
The pkaraptor-apply-json command applies residue-name selections exported from the dashboard to a PDB by renaming residue names.
pkaraptor-apply-json --json selections.json --pdb protein.pdb --out renamed_structure.pdb
To inspect all available options:
pkaraptor-apply-json -h
Apply-json options
--jsonselections JSON exported from the dashboard--pdbinput PDB file, overriding the JSONpdbfield if provided--outoutput protonated or renamed PDB file--no-validate-alloweddisable validation thatselected_resnameis present inallowed_resnames
Protonate a structure from dashboard selections
The pkaraptor-protonate command applies selections exported from the dashboard to a PDB and adds hydrogens using OpenMM templates.
pkaraptor-protonate --json selections.json --pdb protein.pdb --out protonated_structure.pdb
To inspect all available options:
pkaraptor-protonate -h
Protonation options
--jsonselections JSON exported from the dashboard--pdbinput PDB file, overriding the JSONpdbfield if provided--outoutput PDB file with hydrogens--strip-ppmremove PPM/OPM dummy atoms (DUM/DU)--no-validate-alloweddo not validate thatselected_resnameis present inallowed_resnames--phpH used by OpenMM to place hydrogens--forcefieldOpenMM ForceField XML file, repeatable; default isamber14-all.xml--remove-heterogensremove heterogens before hydrogenation--keep-waterwhen removing heterogens, keep water molecules
Typical workflow
A typical workflow may involve running pkaraptor on a PDB structure to generate a protonation environment analysis CSV, building an interactive dashboard with pkaraptor-dashboard, exporting residue selections from the dashboard as JSON, applying renamed residue selections with pkaraptor-apply-json, and generating a hydrogenated structure with pkaraptor-protonate.
Output
Depending on the selected workflow and inputs, pKaRaptor can generate outputs such as protonation environment analysis CSV files, interactive HTML dashboards, JSON files containing residue selections exported from the dashboard, renamed PDB structures, and protonated PDB structures with hydrogens added through OpenMM.
Use cases
pKaRaptor may be useful for exploratory analysis of ionizable residues in protein structures, inspection of local environments around titratable sites, comparison of protonation-related predictions from different sources, investigation of pH-dependent structural hypotheses, membrane protein analysis with OPM-informed context, preparation and interpretation steps prior to molecular simulation, and educational or methodological demonstrations related to protein protonation analysis.
Repository structure
A typical repository structure includes the files LICENSE, README.md, and pyproject.toml, together with the src/ directory containing the package source code and, when distributions are built locally, a dist/ directory.
Citation
If you use pKaRaptor in academic work, please cite the software repository or the corresponding PyPI release.
A formal software citation will be added once available.
Authorship, Contributions, and Maintenance
Joana Ribeiro da Silva is the author and developer of pKaRaptor. The PyPI maintainers are Joana Ribeiro da Silva, Pedro Alexandrino Fernandes, and Pedro Ferreira. Acknowledged contributions include academic supervision and project support from Pedro Alexandrino Fernandes, and testing, feedback, and scientific discussion from Pedro Ferreira.
Contributing
Contributions, suggestions, and bug reports are welcome. Please use the GitHub issue tracker to report problems or propose improvements.
License
This project is distributed under the BSD 3-Clause License. See the LICENSE file for details.
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 pkaraptor-0.1.2.tar.gz.
File metadata
- Download URL: pkaraptor-0.1.2.tar.gz
- Upload date:
- Size: 43.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35652f53b89b25d8e8cf990d066fd843268509629a819130a4fd69067bca69e8
|
|
| MD5 |
701e7ff52e040d2f03df092f5ceecfce
|
|
| BLAKE2b-256 |
22e8fa8dfec21499afe0b334ffc2377ca6f9e9800be511dd3d967cdac6aafe5c
|
File details
Details for the file pkaraptor-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pkaraptor-0.1.2-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46e8e0db1c81dd94db44c1b47b121502b23f826a40f0048a01b1fca54b4d7cce
|
|
| MD5 |
cc9c245910253ea56ef75ea741a9ebed
|
|
| BLAKE2b-256 |
881f0fa3fafb2971f07cdf4ae60ce41388f1d7f04d541abc267bc2f06416602d
|