Skip to main content

Protein Domain Segmentation Library

This library provides a convenient interface for protein domain segmentation using the powerful tools Merizo and Chainsaw. The library abstracts the complexity of using these tools, allowing users to predict protein domain boundaries directly from PDB files or MDAnalysis universes.

Features

  • Unified Interface: Use a consistent API to access both Merizo and Chainsaw functionalities.
  • Flexible Input Support: Predict from PDB files or MDAnalysis universes.
  • Lightweight Usage: Avoid integrating full tool codebases directly into your project.

Requirements

Python 3.10+

Installation

Install the library and its dependencies using pip:

pip install protein-domain-segmentation

Usage

Below is an example demonstrating how to use the MerizoCluster and ChainsawCluster classes:

from protein_domain_segmentation import MerizoCluster, ChainsawCluster
import MDAnalysis as mda

# Initialize clusters
merizo_cluster = MerizoCluster()
chainsaw_cluster = ChainsawCluster()

# Example PDB file path
pdb_path = "example.pdb"

# Predict chopping using Merizo
merizo_result = merizo_cluster.predict_from_pdb(pdb_path)
print("Merizo Results:", merizo_result)

# Predict chopping using Chainsaw
chainsaw_result = chainsaw_cluster.predict_from_pdb(pdb_path)
print("Chainsaw Results:", chainsaw_result)

# Predict chopping from an MDAnalysis Universe
u = mda.Universe(pdb_path)
merizo_from_universe = merizo_cluster.predict_from_universe(u)
print("Merizo Results from Universe:", merizo_from_universe)

Warning for non-Linux Users (Merizo only)

If you are not on a Linux system, you might need to compile Stride, which is used by Merizo for secondary structure assignment.

You can find Stride installation procedure on their official website.

You can then specify STRIDE_PATH to point towards the binary:

export STRIDE_PATH=/path/to/stride_executable

API Overview

Classes

  • Cluster: Abstract base class for clustering tools.

    • predict_from_pdb(pdb_path: str, model_params: Dict = None): Predicts the chopping of a protein from a PDB file.
    • predict_from_universe(universe: mda.Universe, model_params: Dict = None): Predicts the chopping of a protein from an MDAnalysis Universe.
  • MerizoCluster: Implementation of Cluster for Merizo.

  • ChainsawCluster: Implementation of Cluster for Chainsaw.

Methods

  • MerizoCluster.predict_from_pdb(pdb_path: str, model_params: Dict = None): Uses Merizo to predict chopping from a PDB file.

  • ChainsawCluster.predict_from_pdb(pdb_path: str, model_params: Dict = None): Uses Chainsaw to predict chopping from a PDB file.

Credits

This package wraps the functionality of the following tools:

Citation

If you use this package in your research, please cite the respective papers for Merizo and Chainsaw:

  • Merizo: Lau et al., 2023. Merizo: a rapid and accurate protein domain segmentation method using invariant point attention. Nature Communications.
  • Chainsaw: Wells et al., Chainsaw: protein domain segmentation with fully convolutional neural networks. Bioinformatics.

License

This package is distributed under the MIT License. See the LICENSE file for details.

Acknowledgments

We extend our gratitude to the developers of Merizo and Chainsaw for their invaluable contributions to the field of protein domain segmentation.

Release files for protein-domain-segmentation 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for protein-domain-segmentation 0.1.4
File Size Uploaded
protein_domain_segmentation-0.1.4.tar.gz 194.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for protein-domain-segmentation 0.1.4
File Interpreter ABI Platform
protein_domain_segmentation-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 388.4 MB

Release files / protein_domain_segmentation-0.1.4.tar.gz

Download URL protein_domain_segmentation-0.1.4.tar.gz
Size 194.2 MB
Tags Source
SHA-256 checksum
How to use checksums
327efb107fb9705b480de73b75f38e413e9f123e7888c13f66dba16fdf917fc4
BLAKE2b-256 checksum
How to use checksums
1de5ad36bba418c47c71ecfdbf9fa209a3358df38403b45da7bd908101e8c59e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 6, 2025.

Transparency log

Release files / protein_domain_segmentation-0.1.4-py3-none-any.whl

Download URL protein_domain_segmentation-0.1.4-py3-none-any.whl
Size 194.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b19a43e35d864b2b8f0f0a7fdd70d28592b74afa37b264065d1780ec4d70f3d5
BLAKE2b-256 checksum
How to use checksums
15be6bb009b2a1938bd95bd2af237f55f6dbc227cd070eedfb7e31b8cfe91ead
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 6, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page