Update Readme.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,131 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# ReverseLigQ Datasets
|
| 6 |
+
|
| 7 |
+
This repository contains the curated datasets used by **ReverseLigQ**, a platform designed to search for potential protein targets (molecular targets) of bioactive compounds.
|
| 8 |
+
|
| 9 |
+
The data stored here includes ligand representations, mappings between internal indices and compound identifiers, and curated associations between ligands and Pfam domains derived from structural and sequence information.
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## Contents
|
| 14 |
+
|
| 15 |
+
### 1. Embeddings and Fingerprints
|
| 16 |
+
|
| 17 |
+
- **`comps_embs.npy`**
|
| 18 |
+
NumPy array containing **ChemBERTa embeddings** for ligands derived from **PDB** and **ChEMBL**.
|
| 19 |
+
Each row corresponds to a ligand, and the position in the array is linked to the internal index (`idx`) used throughout ReverseLigQ.
|
| 20 |
+
|
| 21 |
+
- **`comps_fps.npy`**
|
| 22 |
+
NumPy array containing **Morgan fingerprints** (circular fingerprints, ECFP-like) for the same set of ligands from **PDB** and **ChEMBL**.
|
| 23 |
+
As with `comps_embs.npy`, rows are aligned with the internal ligand index (`idx`).
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
### 2. Index–Identifier Mappings
|
| 28 |
+
|
| 29 |
+
- **`id_to_idx.pkl`**
|
| 30 |
+
Python dictionary mapping **ligand identifiers** (e.g., from PDB or ChEMBL) to the **internal index** (`idx`) used in the arrays `comps_embs.npy` and `comps_fps.npy`.
|
| 31 |
+
This mapping allows you to go from an external ligand ID to the corresponding row in the embedding and fingerprint matrices.
|
| 32 |
+
|
| 33 |
+
- **`idx_to_id.pkl`**
|
| 34 |
+
Inverse mapping of `id_to_idx.pkl`.
|
| 35 |
+
It is a Python dictionary mapping the internal index (`idx`) back to the **original ligand identifier**.
|
| 36 |
+
This is useful, for example, when retrieving nearest neighbors in embedding space by index and then needing to recover the original IDs.
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
### 3. Ligand–Pfam Domain Associations
|
| 41 |
+
|
| 42 |
+
- **`ligs_fams_curated.pkl`**
|
| 43 |
+
Python dictionary mapping ligands to **Pfam domains they are known to bind**, based on **curated, high-confidence evidence**.
|
| 44 |
+
This curated set includes ligands whose associated domain can be determined unambiguously from:
|
| 45 |
+
- a **resolved 3D structure** (e.g., a PDB complex where the domain is clearly defined),
|
| 46 |
+
- a **protein with a single domain**, or
|
| 47 |
+
- **strong structural similarity** to another ligand whose interaction has been experimentally confirmed in a solved 3D structure.
|
| 48 |
+
This file represents the **high-confidence (curated) ligand–domain associations** used by ReverseLigQ.
|
| 49 |
+
|
| 50 |
+
- **`ligs_fams_possible.pkl`**
|
| 51 |
+
Python dictionary mapping ligands to **possible Pfam domains they may bind**, in cases where the specific domain cannot be determined with certainty.
|
| 52 |
+
Here, the reference protein:
|
| 53 |
+
- often contains **multiple domains**,
|
| 54 |
+
- does **not** have a resolved 3D structure for the ligand–protein complex, and therefore
|
| 55 |
+
- it is unclear which of the possible domains is the true binding site.
|
| 56 |
+
This file therefore represents **putative or ambiguous ligand–domain associations**, complementing the curated set.
|
| 57 |
+
|
| 58 |
+
---
|
| 59 |
+
|
| 60 |
+
## Usage Notes
|
| 61 |
+
|
| 62 |
+
- The **internal index** (`idx`) is the key that ties together:
|
| 63 |
+
- rows in `comps_embs.npy`
|
| 64 |
+
- rows in `comps_fps.npy`
|
| 65 |
+
- entries in `id_to_idx.pkl` / `idx_to_id.pkl`
|
| 66 |
+
- The **Pfam-domain dictionaries** (`ligs_fams_curated.pkl` and `ligs_fams_possible.pkl`) can be used to:
|
| 67 |
+
- build training or evaluation sets for ligand–target or ligand–domain prediction,
|
| 68 |
+
- separate high-confidence from ambiguous associations,
|
| 69 |
+
- benchmark methods that infer protein targets from ligand similarity.
|
| 70 |
+
|
| 71 |
+
---
|
| 72 |
+
|
| 73 |
+
## Example (Python)
|
| 74 |
+
|
| 75 |
+
```python
|
| 76 |
+
import numpy as np
|
| 77 |
+
import pickle
|
| 78 |
+
|
| 79 |
+
# Load embeddings and fingerprints
|
| 80 |
+
embs = np.load("comps_embs.npy")
|
| 81 |
+
fps = np.load("comps_fps.npy")
|
| 82 |
+
|
| 83 |
+
# Load mappings
|
| 84 |
+
with open("id_to_idx.pkl", "rb") as f:
|
| 85 |
+
id_to_idx = pickle.load(f)
|
| 86 |
+
|
| 87 |
+
with open("idx_to_id.pkl", "rb") as f:
|
| 88 |
+
idx_to_id = pickle.load(f)
|
| 89 |
+
|
| 90 |
+
# Load curated ligand–Pfam associations
|
| 91 |
+
with open("ligs_fams_curated.pkl", "rb") as f:
|
| 92 |
+
ligs_fams_curated = pickle.load(f)
|
| 93 |
+
|
| 94 |
+
# Example: get embedding for a given ligand ID
|
| 95 |
+
lig_id = "CHEMBL123456"
|
| 96 |
+
idx = id_to_idx[lig_id]
|
| 97 |
+
lig_emb = embs[idx]
|
| 98 |
+
lig_fp = fps[idx]
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
## Example 2 (Python)
|
| 102 |
+
|
| 103 |
+
```python
|
| 104 |
+
import pickle
|
| 105 |
+
|
| 106 |
+
# Load curated and possible ligand–Pfam associations
|
| 107 |
+
with open("ligs_fams_curated.pkl", "rb") as f:
|
| 108 |
+
ligs_fams_curated = pickle.load(f)
|
| 109 |
+
|
| 110 |
+
with open("ligs_fams_possible.pkl", "rb") as f:
|
| 111 |
+
ligs_fams_possible = pickle.load(f)
|
| 112 |
+
|
| 113 |
+
lig_id = "CHEMBL123456"
|
| 114 |
+
|
| 115 |
+
# High-confidence binding domains (if available)
|
| 116 |
+
curated_domains = ligs_fams_curated.get(lig_id, [])
|
| 117 |
+
|
| 118 |
+
# Possible (ambiguous) domains
|
| 119 |
+
possible_domains = ligs_fams_possible.get(lig_id, [])
|
| 120 |
+
|
| 121 |
+
print("Curated Pfam domains:", curated_domains)
|
| 122 |
+
print("Possible Pfam domains:", possible_domains)
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
## Citation
|
| 126 |
+
|
| 127 |
+
If you use these datasets, please cite:
|
| 128 |
+
|
| 129 |
+
Schottlender G, Prieto JM, Palumbo MC, Castello FA, Serral F, Sosa EJ, Turjanski AG, Martí MA and Fernández Do Porto D (2022).
|
| 130 |
+
From drugs to targets: Reverse engineering the virtual screening process on a proteomic scale.
|
| 131 |
+
Front. Drug. Discov. 2:969983. doi: 10.3389/fddsv.2022.969983
|