gschottlender commited on
Commit
9db7bc0
·
1 Parent(s): 85ff58b

modified database structure

Browse files
.gitattributes CHANGED
@@ -1,59 +1,5 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.lz4 filter=lfs diff=lfs merge=lfs -text
12
- *.mds filter=lfs diff=lfs merge=lfs -text
13
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
- *.model filter=lfs diff=lfs merge=lfs -text
15
- *.msgpack filter=lfs diff=lfs merge=lfs -text
16
- *.npy filter=lfs diff=lfs merge=lfs -text
17
- *.npz filter=lfs diff=lfs merge=lfs -text
18
- *.onnx filter=lfs diff=lfs merge=lfs -text
19
- *.ot filter=lfs diff=lfs merge=lfs -text
20
  *.parquet filter=lfs diff=lfs merge=lfs -text
21
- *.pb filter=lfs diff=lfs merge=lfs -text
22
- *.pickle filter=lfs diff=lfs merge=lfs -text
23
  *.pkl filter=lfs diff=lfs merge=lfs -text
24
- *.pt filter=lfs diff=lfs merge=lfs -text
25
- *.pth filter=lfs diff=lfs merge=lfs -text
26
- *.rar filter=lfs diff=lfs merge=lfs -text
27
- *.safetensors filter=lfs diff=lfs merge=lfs -text
28
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
- *.tar.* filter=lfs diff=lfs merge=lfs -text
30
- *.tar filter=lfs diff=lfs merge=lfs -text
31
- *.tflite filter=lfs diff=lfs merge=lfs -text
32
- *.tgz filter=lfs diff=lfs merge=lfs -text
33
- *.wasm filter=lfs diff=lfs merge=lfs -text
34
- *.xz filter=lfs diff=lfs merge=lfs -text
35
- *.zip filter=lfs diff=lfs merge=lfs -text
36
- *.zst filter=lfs diff=lfs merge=lfs -text
37
- *tfevents* filter=lfs diff=lfs merge=lfs -text
38
- # Audio files - uncompressed
39
- *.pcm filter=lfs diff=lfs merge=lfs -text
40
- *.sam filter=lfs diff=lfs merge=lfs -text
41
- *.raw filter=lfs diff=lfs merge=lfs -text
42
- # Audio files - compressed
43
- *.aac filter=lfs diff=lfs merge=lfs -text
44
- *.flac filter=lfs diff=lfs merge=lfs -text
45
- *.mp3 filter=lfs diff=lfs merge=lfs -text
46
- *.ogg filter=lfs diff=lfs merge=lfs -text
47
- *.wav filter=lfs diff=lfs merge=lfs -text
48
- # Image files - uncompressed
49
- *.bmp filter=lfs diff=lfs merge=lfs -text
50
- *.gif filter=lfs diff=lfs merge=lfs -text
51
- *.png filter=lfs diff=lfs merge=lfs -text
52
- *.tiff filter=lfs diff=lfs merge=lfs -text
53
- # Image files - compressed
54
- *.jpg filter=lfs diff=lfs merge=lfs -text
55
- *.jpeg filter=lfs diff=lfs merge=lfs -text
56
- *.webp filter=lfs diff=lfs merge=lfs -text
57
- # Video files - compressed
58
- *.mp4 filter=lfs diff=lfs merge=lfs -text
59
- *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  *.parquet filter=lfs diff=lfs merge=lfs -text
2
+ *.dat filter=lfs diff=lfs merge=lfs -text
3
+ *.npy filter=lfs diff=lfs merge=lfs -text
4
  *.pkl filter=lfs diff=lfs merge=lfs -text
5
+ *.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -1,71 +1,63 @@
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
- ### 4. Organism-Specific Datasets
 
 
 
 
61
 
62
- ReverseLigQ integrates multiple organisms, each identified by an integer key.
63
- The files in this section provide organism-level ligand lists, protein descriptions, and Pfam-based protein families.
64
 
65
- Organism keys and corresponding species:
66
 
67
  | Key | Organism |
68
- |-----|----------|
69
  | 1 | *Bartonella bacilliformis* |
70
  | 2 | *Klebsiella pneumoniae* |
71
  | 3 | *Mycobacterium tuberculosis* |
@@ -80,98 +72,8 @@ Organism keys and corresponding species:
80
  | 12 | SARS-CoV-2 |
81
  | 13 | *Homo sapiens* |
82
 
83
- #### Files:
84
-
85
- - **`ligand_lists.pkl`**
86
- Python dictionary containing the **list of ligands associated with each organism** included in the platform.
87
- Keys correspond to organism indices (1–13), and values are lists of ligand identifiers.
88
-
89
- - **`prot_descriptions.pkl`**
90
- Python dictionary containing **protein descriptions** (annotations, functional summaries, etc.) for each protein present in the integrated organisms.
91
-
92
- - **`fam_prot_dict.pkl`**
93
- Python dictionary mapping each organism to its **proteins grouped by Pfam families**.
94
- For each organism key, the value is another dictionary where:
95
- - keys are Pfam domain identifiers, and
96
- - values are lists of proteins belonging to that domain family.
97
-
98
- These files enable ReverseLigQ to perform organism-specific ligand searches, identify relevant targets, and reconstruct ligand–domain landscapes across diverse pathogens and host species.
99
-
100
- ---
101
-
102
- ## Usage Notes
103
-
104
- - The **internal index** (`idx`) is the key that ties together:
105
- - rows in `comps_embs.npy`
106
- - rows in `comps_fps.npy`
107
- - entries in `id_to_idx.pkl` / `idx_to_id.pkl`
108
- - The **Pfam-domain dictionaries** (`ligs_fams_curated.pkl` and `ligs_fams_possible.pkl`) can be used to:
109
- - build training or evaluation sets for ligand–target or ligand–domain prediction,
110
- - separate high-confidence from ambiguous associations,
111
- - benchmark methods that infer protein targets from ligand similarity.
112
- - The **organism-level dictionaries** (`ligand_lists.pkl`, `prot_descriptions.pkl`, `fam_prot_dict.pkl`) support:
113
- - organism-specific prioritization of targets,
114
- - analyses of Pfam family distribution across species,
115
- - integration of ligand knowledge with genomic and proteomic data.
116
-
117
- ---
118
-
119
- ## Example 1 (Python)
120
-
121
- ```python
122
- import numpy as np
123
- import pickle
124
-
125
- # Load embeddings and fingerprints
126
- embs = np.load("comps_embs.npy")
127
- fps = np.load("comps_fps.npy")
128
-
129
- # Load mappings
130
- with open("id_to_idx.pkl", "rb") as f:
131
- id_to_idx = pickle.load(f)
132
-
133
- with open("idx_to_id.pkl", "rb") as f:
134
- idx_to_id = pickle.load(f)
135
-
136
- # Load curated ligand–Pfam associations
137
- with open("ligs_fams_curated.pkl", "rb") as f:
138
- ligs_fams_curated = pickle.load(f)
139
-
140
- # Example: get embedding for a given ligand ID
141
- lig_id = "CHEMBL123456"
142
- idx = id_to_idx[lig_id]
143
- lig_emb = embs[idx]
144
- lig_fp = fps[idx]
145
- ```
146
-
147
- ## Example 2 (Python)
148
-
149
- ```python
150
- import pickle
151
-
152
- # Load curated and possible ligand–Pfam associations
153
- with open("ligs_fams_curated.pkl", "rb") as f:
154
- ligs_fams_curated = pickle.load(f)
155
-
156
- with open("ligs_fams_possible.pkl", "rb") as f:
157
- ligs_fams_possible = pickle.load(f)
158
-
159
- lig_id = "CHEMBL123456"
160
-
161
- # High-confidence binding domains (if available)
162
- curated_domains = ligs_fams_curated.get(lig_id, [])
163
-
164
- # Possible (ambiguous) domains
165
- possible_domains = ligs_fams_possible.get(lig_id, [])
166
-
167
- print("Curated Pfam domains:", curated_domains)
168
- print("Possible Pfam domains:", possible_domains)
169
- ```
170
-
171
  ## Citation
172
 
173
  If you use these datasets, please cite:
174
 
175
- Schottlender G, Prieto JM, Palumbo MC, Castello FA, Serral F, Sosa EJ, Turjanski AG, Martí MA and Fernández Do Porto D (2022).
176
- From drugs to targets: Reverse engineering the virtual screening process on a proteomic scale.
177
- Front. Drug. Discov. 2:969983. doi: 10.3389/fddsv.2022.969983
 
1
+ # ReverseLigQ dataset (Hugging Face)
 
 
2
 
3
+ This repository contains the **ReverseLigQ** dataset files in a simplified layout designed to be loaded with a `LigandStore`/`Representation` interface (compound representations) plus organism-level auxiliary tables (ReverseLigQ metadata).
4
 
5
+ ## Directory layout
6
 
7
+ ```
8
+ compound_data/
9
+ pdb_chembl/
10
+ ligands.parquet
11
+ reps/
12
+ chemberta_zinc_base_768.dat
13
+ chemberta_zinc_base_768.meta.json
14
+ morgan_1024_r2.dat
15
+ morgan_1024_r2.meta.json
16
+
17
+ rev_ligq/
18
+ fam_prot_dict.pkl
19
+ ligand_lists.pkl
20
+ ligs_fams_curated.pkl
21
+ ligs_fams_possible.pkl
22
+ prot_descriptions.pkl
23
+ ```
 
 
24
 
25
+ ## Compound data (`compound_data/pdb_chembl/`)
 
 
26
 
27
+ ### `ligands.parquet`
28
+ Canonical ligand index table with a **dense integer index** (`lig_idx`) used to align all representations on disk.
 
 
29
 
30
+ Typical columns:
31
+ - `chem_comp_id`: unified ligand ID (PDB CCD or ChEMBL)
32
+ - `smiles`: canonical SMILES
33
+ - `inchikey`: optional (may be missing)
34
+ - `lig_idx`: dense index **0..N-1** (row order for the `.dat` matrices)
35
 
36
+ ### Representations (`reps/`)
37
+ Each representation is stored as:
38
+ - `<rep_name>.dat`: memory-mapped matrix on disk
39
+ - `<rep_name>.meta.json`: metadata (dtype, dim, packed_bits, etc.)
40
 
41
+ Available representations:
42
+ - `chemberta_zinc_base_768`: ChemBERTa embeddings (dim=768), dense float matrix.
43
+ - `morgan_1024_r2`: Morgan fingerprints (1024 bits, radius=2), stored with `packed_bits=true`.
 
 
 
 
44
 
45
+ ## Organism-specific tables (`rev_ligq/`)
 
 
 
 
 
 
46
 
47
+ These files provide organism-level ligand lists, Pfam-based protein families, and optional protein descriptions used to project ligand-level similarity hits into candidate protein targets.
48
 
49
+ - `ligand_lists.pkl`: dict `{organism_key (str): [chem_comp_id, ...]}`
50
+ - `ligs_fams_curated.pkl`: dict `{chem_comp_id: [pfam_id, ...]}` (curated evidence)
51
+ - `ligs_fams_possible.pkl`: dict `{chem_comp_id: [pfam_id, ...]}` (possible/uncurated evidence)
52
+ - `fam_prot_dict.pkl`: nested dict `{organism_key: {pfam_id: [uniprot_id, ...]}}`
53
+ - `prot_descriptions.pkl`: protein descriptions (when available)
54
 
55
+ ### Organism keys
 
56
 
57
+ ReverseLigQ integrates multiple organisms, each identified by an integer key:
58
 
59
  | Key | Organism |
60
+ |---:|---|
61
  | 1 | *Bartonella bacilliformis* |
62
  | 2 | *Klebsiella pneumoniae* |
63
  | 3 | *Mycobacterium tuberculosis* |
 
72
  | 12 | SARS-CoV-2 |
73
  | 13 | *Homo sapiens* |
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  ## Citation
76
 
77
  If you use these datasets, please cite:
78
 
79
+ Schottlender G, Prieto JM, Palumbo MC, Castello FA, Serral F, Sosa EJ, Turjanski AG, Martí MA and Fernández Do Porto D (2022). *From drugs to targets: Reverse engineering the virtual screening process on a proteomic scale.* Front. Drug. Discov. 2:969983. doi: 10.3389/fddsv.2022.969983
 
 
comps_smiles.pkl → compound_data/pdb_chembl/ligands.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ec36aebd331dfe25dfe23edfedc5d1c7f2d81ee17fb1e30aa45136773b790862
3
- size 40481808
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25aed4e04b4511006b86340fe8c9e8d577247ba8b4fa138f740a95c888cccf5e
3
+ size 55410421
comps_fps.npy → compound_data/pdb_chembl/reps/chemberta_zinc_base_768.dat RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e4ca1da0225466d89cab952b08d2e54584c995a383a8ab6a55a5fc1efaa15fa5
3
- size 509630592
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6fa24602f2f0346325e1eff59d2183a5eb35d9eb4498663430783674573167b
3
+ size 1531736064
idx_to_id.pkl → compound_data/pdb_chembl/reps/chemberta_zinc_base_768.meta.json RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:748841ac4bad3ba204a88dc828e1ae5171c719c6bbcc37eaa114a615a0f904d5
3
- size 7595477
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd4ec1159a18802b365e211d06f03d7c1497b814cb5688d1e47e29cf9df2fc5a
3
+ size 284
comps_embs.npy → compound_data/pdb_chembl/reps/morgan_1024_r2.dat RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:89f99649c8f6eb5fe5f8bafb414a5447d834da1381e55f983288d3bc3bd98c0e
3
- size 764445824
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36dd64e4285c70f9b555f56be3b1681f34c07cbe7a16cedc1f5e850542799759
3
+ size 127644672
ligs_fams_curated.pkl → compound_data/pdb_chembl/reps/morgan_1024_r2.meta.json RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c8426f43872cae26908aa3cadca6e7d3c4583619b4bfcfbe655ac79b50f0227e
3
- size 8551407
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:090714ccad6ce77a3f84de46a23070e2397a90ce04f996c8ab0953d47e32cb4a
3
+ size 179
fam_prot_dict.pkl → rev_ligq/fam_prot_dict.pkl RENAMED
File without changes
ligand_lists.pkl → rev_ligq/ligand_lists.pkl RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0e22d8bd30818dbf1c7b1aa491c2623ef3b66915664c3e71ede02477b51ff0ab
3
- size 39096633
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ff1c803617f14b1c7cd23c3716f47d8c236f99e6b14aeeb2db9897d8efad66d
3
+ size 36075926
id_to_idx.pkl → rev_ligq/ligs_fams_curated.pkl RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5d179e09608b99f6cd82304f1c22eb82faa89793eec88e7757ec8126fe7759a2
3
- size 9952903
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f8c52c4dc860c302a94acf68fd5bc90603245be9e7fb3aae8b7934632983921
3
+ size 16545203
ligs_fams_possible.pkl → rev_ligq/ligs_fams_possible.pkl RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d2f4468669dff0808b5c8a1d207a9e7e20eb1585217584ad2375c23cd9e50fe2
3
- size 9145930
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0dc58000499d514814f12c188ac2a9b4a02bdce45a1409f8d75888cfe5cb44bc
3
+ size 12026534
prot_descriptions.pkl → rev_ligq/prot_descriptions.pkl RENAMED
File without changes