Metadata-Version: 2.1
Name: metamorphic-multifunction-search
Version: 4.2.0
Summary: Comprehensive Python Module for Protein Data Management: Designed for streamlined integration and processing of protein information from both UniProt and PDB. Equipped with features for concurrent data fetching, robust error handling, and database synchronization.
Author: frapercan
Author-email: frapercan1@alum.us.es
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: bio (>=1.6.0,<2.0.0)
Requires-Dist: biopython (>=1.81,<2.0)
Requires-Dist: django (>=5.1.7,<6.0.0)
Requires-Dist: docopt (>=0.6.2,<0.7.0)
Requires-Dist: esm (>=3.1.6,<4.0.0)
Requires-Dist: fastobo (>=0.12.3,<0.13.0)
Requires-Dist: gemmi (>=0.6.7,<0.7.0)
Requires-Dist: goatools (>=1.3.11,<2.0.0)
Requires-Dist: h5py (>=3.12.1,<4.0.0)
Requires-Dist: matplotlib (>=3.9.0,<4.0.0)
Requires-Dist: mini3di (>=0.1.1,<0.2.0)
Requires-Dist: networkx (>=3.3,<4.0)
Requires-Dist: obonet (>=1.0.0,<2.0.0)
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: pgvector (>=0.4,<0.5)
Requires-Dist: pika (>=1.3.2,<2.0.0)
Requires-Dist: protein-metamorphisms-is (>=4.2.0,<5.0.0)
Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0)
Requires-Dist: py-cdhit (>=0.8.0,<0.9.0)
Requires-Dist: pyarrow (>=15.0.0,<16.0.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: rcsb-api (>=0.5.0,<0.6.0)
Requires-Dist: rcsbsearchapi (>=2.0.0,<3.0.0)
Requires-Dist: responses (>=0.25.3,<0.26.0)
Requires-Dist: retry (>=0.9.2,<0.10.0)
Requires-Dist: scikit-learn (>=1.5.0,<2.0.0)
Requires-Dist: sentencepiece (>=0.2.0,<0.3.0)
Requires-Dist: sphinx-copybutton (>=0.5.2,<0.6.0)
Requires-Dist: sqlalchemy (>=2.0.40,<3.0.0)
Requires-Dist: tokenizer (>=3.4.3,<4.0.0)
Requires-Dist: torch (>=2.3.0,<3.0.0)
Requires-Dist: transformers (>=4.41.1,<5.0.0)
Requires-Dist: zstd (==1.5.6.1)
Description-Content-Type: text/markdown

[![PyPI - Version](https://img.shields.io/pypi/v/metamorphic_multifunction_search)](https://pypi.org/project/metamorphic_multifunction_search/)
[![Documentation Status](https://readthedocs.org/metamorphic_multifunction_search/badge/?version=latest)](https://metamorphic_multifunction_search.readthedocs.io/en/latest/?badge=latest)
![Linting Status](https://github.com/CBBIO/metamorphic_multifunction_search/actions/workflows/test-lint.yml/badge.svg?branch=main)

# **Metamorphic & Multifunctional Protein Search**

## 🔬 Overview

**`metamorphic_multifunction_search`** is a systematic protocol for the **large-scale detection of structural metamorphisms and protein multifunctionality**, built on top of the Protein Information System (PIS).

The project combines structural alignments, functional GO annotations, and protein language models to uncover hidden relationships between structure and function across model and non-model organisms.

---

## 🧠 What Does This Protocol Do?

### 1. **Structural Metamorphism Detection**

* Aligns 3D protein structures with high sequence identity.
* Detects divergent conformations (i.e. metamorphisms) using metrics like RMSD or FC-score.
* Uses large-scale filtering (e.g., CD-HIT) and pairwise structural comparison.

### 2. **Functional Multifunctionality Analysis**

* Extracts Gene Ontology (GO) annotations per protein.
* Computes semantic distances between GO terms within each namespace (MF, BP, CC).
* Identifies the most divergent pair of terms per protein to quantify multifunctionality.

---

## ⚙️ Requirements

* Python 3.11.6
* RabbitMQ
* PostgreSQL with `pgvector` extension
* Docker (optional but recommended for deployment)

---

## 🚀 Quick Start

1. **Start PostgreSQL with `pgvector`:**

```bash
docker run -d --name pgvectorsql \
    -e POSTGRES_USER=user \
    -e POSTGRES_PASSWORD=password \
    -e POSTGRES_DB=BioData \
    -p 5432:5432 \
    pgvector/pgvector:pg16
```

2. **Start RabbitMQ:**

```bash
docker run -d --name rabbitmq \
    -p 15672:15672 \
    -p 5672:5672 \
    rabbitmq:management
```

3. **Run the main protocol:**

```bash
python main.py
```

This command executes the full pipeline: data extraction, structural filtering, alignment, functional analysis, and metric computation.

---

## ⚒️ Customization

You can tailor the pipeline by editing the `config.yaml` file or modifying `main.py` to:

* Switch embedding models
* Apply taxonomy-based filters
* Add new annotation types or similarity metrics

---

## 📚 Related Projects

* 🔗 [Protein Information System (PIS)](https://github.com/CBBIO/ProteinInformationSystem)
* 🔗 [FANTASIA: Functional Annotation Toolkit](https://github.com/CBBIO/FANTASIA)

---

Let me know if you'd like me to overwrite your current `README.md` with this version.

