This python package works with PISA to analyse data for macromolecular interfaces and interactions in assemblies.
Project description
Assembly interfaces analysis
Basic information
This python package works with PISA to analyze data for macromolecular interfaces and interactions in assemblies.
The code consists of the module pisa_analysis that will:
- Analyse macromolecular interfaces with PISA
- Create a JSON dictionary with assembly interactions/interfaces information
git clone https://github.com/PDBe-KB/pisa-analysis
cd pisa-analysis
Dependencies
The pisa_analysis process runs PISA as a subprocess and requires apriori compilation of PISA.
To make your life easier when running the process, you can set two path environment variables for PISA:
An environment variable to the pisa binary:
export PATH="$PATH:your_path_to_pisa/pisa/build"
A path to the setup directory of PISA:
export PISA_SETUP_DIR="/your_path_to_pisa/pisa/setup"
Additionally, it is required that PISA setup directory contains a pisa configuration template named pisa_cfg_tmp
Usage
Follow below steps to install the module pisa_analysis and required dependencies:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r requirements.txt
To run the modules in command line:
pisa_analysis:
pisa_analysis [-h] \
-i <INPUT_CIF_FILE> \
--pdb_id <PDB_ID> \
--assembly_id <ASSEMBLY_CODE> \
-o <OUTPUT_JSON> \
--output_xml <OUTPUT_XML>
Required arguments are :
--input_cif (-i) : Assembly CIF file (It can also read a PDB file). Optional if --gen_full_results is used and --assembly_id not specified.
--pdb_id : Entry ID
--assembly_id : Assembly code
--output_json (-o) : Output directory for JSON fille
--output_xml : Output directory for XML files
Other optional arguments are:
--input_updated_cif : Updated cif for pdbid entry
--force : Always runs PISA calculation
--pisa_setup_dir : Path to the 'setup' directory in PISA
--pisa_binary : Binary file for PISA
-h, --help : Show help message
The process is as follows:
For pisa_analysis module:
-
The process first runs PISA in a subprocess and generates two xml files:
- interfaces.xml
- assembly.xml
The xml files are saved in the output directory defined by the
--output_xmlargument. If the xml files exist and are valid, the process will skip running PISA unless the--forceis used in the arguments. -
Next, the process parses xml files generated by PISA and creates a dictionary that contains all assembly interfaces/interactions information.
-
While creating the interfaces dictionary for the entry, the process reads UniProt accession and sequence numbers from an Updated CIF file using Gemmi.
-
The process also parses xml file
assembly.xmlgenerated by PISA and creates a simplified dictionary with some assembly information. -
In the last steps, the process dumps the dictionaries into JSON files. The JSON files are saved in the output directory defined by the
-oor--output_jsonarguments. The output json files are:xxxx-assemX_interfaces.json and xxxx-assemblyX.json
where xxxx is the pdb id entry and X is the assembly code.
Expected JSON files
Documentation on the assembly interfaces json file and schema can be found here:
The simplified assembly json output looks as follows:
{
"PISA": {
"pdb_id": "1d2s",
"assembly_id": "1",
"pisa_version": "2.0",
"assembly": {
"id": "1",
"size": "8",
"macromolecular_size": "2",
"dissociation_energy": -3.96,
"accessible_surface_area": 15146.45,
"buried_surface_area": 3156.79,
"entropy": 12.09,
"dissociation_area": 733.07,
"solvation_energy_gain": -41.09,
"number_of_uc": "0",
"number_of_dissociated_elements": "2",
"symmetry_number": "2",
"formula": "A(2)a(4)b(2)",
"composition": "A-2A[CA](4)[DHT](2)"
}
}
}
Run with Docker
docker run -v <HOST_DIR>:/data_dir \
pdbegroup/pisa-analysis \
pisa_analysis \
--input_cif /data_dir/<INPUT_CIF> \
--pdb_id <PDB_ID> \
--assembly_id <ASSEMBLY_CODE> \
--output_json /data_dir/<OUTPUT_JSON> \
--output_xml /data_dir/<OUTPUT_XML>
Development
We use Astral's uv tool for setting up the project and
managing dependencies:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
source .venv/bin/activate
We also use pre-commit checks to ensure that requirements.txt and requirements-dev.txt are up to date and, also, to
lint the code with Ruff.
pre-commit install
pre-commit run --all-files
You can also build the Docker image locally and then run it as described above:
docker build . -t pdbegroup/pisa-analysis
Versioning
We use SemVer for versioning.
Authors
- Grisell Diaz Leines - Lead developer
- Stephen Anyango - Review and productionising
- Mihaly Varadi - Review and management
See all contributors here.
License
See 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 pisa_analysis-3.1.0.tar.gz.
File metadata
- Download URL: pisa_analysis-3.1.0.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae0dc2337035dc8f3d3a4cfbf4d862e2f53e144e4d92045d5f636045403d8cf
|
|
| MD5 |
ebbec23881d83a572d4befc528e37913
|
|
| BLAKE2b-256 |
3967f7ca1bf5a3bad2574596571d23fdfa182986af4eb11bedb15de9c103a05b
|
Provenance
The following attestation bundles were made for pisa_analysis-3.1.0.tar.gz:
Publisher:
main.yml on PDBe-KB/pisa-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pisa_analysis-3.1.0.tar.gz -
Subject digest:
2ae0dc2337035dc8f3d3a4cfbf4d862e2f53e144e4d92045d5f636045403d8cf - Sigstore transparency entry: 1075725357
- Sigstore integration time:
-
Permalink:
PDBe-KB/pisa-analysis@f16278fd65e2e5d195b483323221b4f0ee43b716 -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/PDBe-KB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@f16278fd65e2e5d195b483323221b4f0ee43b716 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pisa_analysis-3.1.0-py3-none-any.whl.
File metadata
- Download URL: pisa_analysis-3.1.0-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5804a5eb1094b39ab7a5f1e97ded2ff11cd4625a58d348bdb349a407a69ba847
|
|
| MD5 |
9e16aea8697b018685f2176fd0618acf
|
|
| BLAKE2b-256 |
bfd143fa21fa0e565fb18804316a29600a4b33d9f7a5aa2b03d68ffaa54264f4
|
Provenance
The following attestation bundles were made for pisa_analysis-3.1.0-py3-none-any.whl:
Publisher:
main.yml on PDBe-KB/pisa-analysis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pisa_analysis-3.1.0-py3-none-any.whl -
Subject digest:
5804a5eb1094b39ab7a5f1e97ded2ff11cd4625a58d348bdb349a407a69ba847 - Sigstore transparency entry: 1075725389
- Sigstore integration time:
-
Permalink:
PDBe-KB/pisa-analysis@f16278fd65e2e5d195b483323221b4f0ee43b716 -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/PDBe-KB
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@f16278fd65e2e5d195b483323221b4f0ee43b716 -
Trigger Event:
push
-
Statement type: