trrt8 commited on
Commit
4d1a63f
1 Parent(s): 87bf904

filtered data, combined dataset

Browse files
.gitattributes CHANGED
@@ -66,3 +66,6 @@ davis-filter.csv filter=lfs diff=lfs merge=lfs -text
66
  bindingdb-ki.csv filter=lfs diff=lfs merge=lfs -text
67
  glaser.csv filter=lfs diff=lfs merge=lfs -text
68
  pdbbind-2020-combined.csv filter=lfs diff=lfs merge=lfs -text
 
 
 
 
66
  bindingdb-ki.csv filter=lfs diff=lfs merge=lfs -text
67
  glaser.csv filter=lfs diff=lfs merge=lfs -text
68
  pdbbind-2020-combined.csv filter=lfs diff=lfs merge=lfs -text
69
+ affinity-data-combined.parquet filter=lfs diff=lfs merge=lfs -text
70
+ bindingdb-kd-filtered.csv filter=lfs diff=lfs merge=lfs -text
71
+ davis-filtered.csv filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ env/
affinity-data-combined.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a564ab56f845c9c4849d2c55e173e0ad53e873bdffc5c438eea064941663ea89
3
+ size 1787700177
bindingdb-kd-filtered.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:541f7d1392c64a8b74f51bc08dbc5f8c619d832cb1a982f6f5d45837890adef7
3
+ size 29878994
combine_data.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+
3
+ def combine_csv_files(csv_file_list):
4
+ # Read and combine all CSV files into a single dataframe
5
+ combined_df = pd.concat([pd.read_csv(file) for file in csv_file_list], ignore_index=True)
6
+
7
+ # Remove duplicate rows
8
+ combined_df = combined_df.drop_duplicates()
9
+
10
+ # Sort by neg_log10_affinity_M
11
+ combined_df = combined_df.sort_values('neg_log10_affinity_M', ascending=False)
12
+
13
+ return combined_df
14
+
15
+ combined_df = combine_csv_files(['glaser.csv', 'davis-filtered.csv', 'pdbbind-2020-combined.csv', 'bindingdb-kd-filtered.csv', 'bindingdb-ki.csv', 'bindingdb-ic50.csv'])
16
+ combined_df.to_parquet('affinity-data-combined.parquet', index=False)
data_sources.md CHANGED
@@ -1,8 +1,9 @@
1
- davis-filter.csv: https://www.kaggle.com/datasets/christang0002/davis-and-kiba
2
  bindingdb-ic50.csv: https://tdcommons.ai/ (tdc python package)
3
  bindingdb-kd.csv: https://tdcommons.ai/ (tdc python package)
 
4
  bindingdb-ki.csv: https://tdcommons.ai/ (tdc python package)
5
  davis.csv: https://tdcommons.ai/ (tdc python package)
 
6
  kiba.csv: https://tdcommons.ai/ (tdc python package)
7
  pdbbind-2020-combined.csv: https://www.pdbbind.org.cn/
8
  pdbbind-2020-refined.csv: https://www.pdbbind.org.cn/
 
 
1
  bindingdb-ic50.csv: https://tdcommons.ai/ (tdc python package)
2
  bindingdb-kd.csv: https://tdcommons.ai/ (tdc python package)
3
+ bindingdb-kd-filtered.csv: filtered manually (see standardize_data.ipynb)
4
  bindingdb-ki.csv: https://tdcommons.ai/ (tdc python package)
5
  davis.csv: https://tdcommons.ai/ (tdc python package)
6
+ davis-filtered.csv: https://www.kaggle.com/datasets/christang0002/davis-and-kiba
7
  kiba.csv: https://tdcommons.ai/ (tdc python package)
8
  pdbbind-2020-combined.csv: https://www.pdbbind.org.cn/
9
  pdbbind-2020-refined.csv: https://www.pdbbind.org.cn/
davis-filter.csv → davis-filtered.csv RENAMED
File without changes
standardize_data.ipynb ADDED
@@ -0,0 +1,355 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "## Standardizing Datasets"
8
+ ]
9
+ },
10
+ {
11
+ "cell_type": "code",
12
+ "execution_count": null,
13
+ "metadata": {},
14
+ "outputs": [],
15
+ "source": [
16
+ "import pandas as pd\n",
17
+ "from rdkit import Chem\n",
18
+ "from rdkit.Chem import MolToSmiles\n",
19
+ "from scipy.stats import zscore\n",
20
+ "from tqdm import tqdm\n",
21
+ "import numpy as np\n",
22
+ "\n",
23
+ "def load_binding_affinity_dataset(csv_path, \n",
24
+ " protein_col_idx, \n",
25
+ " smiles_col_idx, \n",
26
+ " affinity_col_idx, \n",
27
+ " is_log10_affinity=True, \n",
28
+ " canonicalize_smiles=True, \n",
29
+ " affinity_unit=\"uM\",\n",
30
+ " delimiter=','):\n",
31
+ " \"\"\"\n",
32
+ " Load a protein-ligand binding affinity dataset and preprocess it.\n",
33
+ "\n",
34
+ " Args:\n",
35
+ " csv_path (str): Path to the CSV file.\n",
36
+ " protein_col_idx (int): Column index containing protein sequences.\n",
37
+ " smiles_col_idx (int): Column index containing molecule SMILES.\n",
38
+ " affinity_col_idx (int): Column index containing binding affinities.\n",
39
+ " is_log10_affinity (bool): Whether affinities are in log10. Default is True.\n",
40
+ " canonicalize_smiles (bool): Whether to canonicalize SMILES. Default is True.\n",
41
+ " delimiter (str): Delimiter for the CSV file. Default is ','.\n",
42
+ "\n",
43
+ " Returns:\n",
44
+ " pd.DataFrame: Processed DataFrame with columns \"seq\", \"smiles_can\",\n",
45
+ " \"affinity_uM\", \"neg_log10_affinity_M\", and \"affinity_norm\".\n",
46
+ " \"\"\"\n",
47
+ " # Load dataset\n",
48
+ " df = pd.read_csv(csv_path, delimiter=delimiter)\n",
49
+ "\n",
50
+ " # Extract relevant columns\n",
51
+ " df = df.iloc[:, [protein_col_idx, smiles_col_idx, affinity_col_idx]]\n",
52
+ " df.columns = [\"seq\", \"smiles\", \"affinity\"]\n",
53
+ "\n",
54
+ " # Canonicalize SMILES\n",
55
+ " if canonicalize_smiles:\n",
56
+ " def canonicalize(smiles):\n",
57
+ " try:\n",
58
+ " mol = Chem.MolFromSmiles(smiles)\n",
59
+ " return MolToSmiles(mol, canonical=True) if mol else None\n",
60
+ " except:\n",
61
+ " return None\n",
62
+ "\n",
63
+ " from tqdm import tqdm\n",
64
+ " tqdm.pandas()\n",
65
+ " df[\"smiles_can\"] = df[\"smiles\"].progress_apply(canonicalize)\n",
66
+ " df = df[df[\"smiles_can\"].notna()]\n",
67
+ " else:\n",
68
+ " df[\"smiles_can\"] = df[\"smiles\"]\n",
69
+ "\n",
70
+ " # Process affinities\n",
71
+ " if not is_log10_affinity:\n",
72
+ " # Convert plain Kd value to neg log10(M)\n",
73
+ " df[\"affinity_uM\"] = df[\"affinity\"]/(1e3 if affinity_unit == \"nM\" else 1)\n",
74
+ " \n",
75
+ " df[\"neg_log10_affinity_M\"] = -df[\"affinity_uM\"].apply(lambda x: np.log10(x/1e6) if x > 0 else np.nan)\n",
76
+ " else:\n",
77
+ " # Convert log10 values to plain uM for clarity\n",
78
+ " df[\"neg_log10_affinity_M\"] = df[\"affinity\"]\n",
79
+ " df[\"affinity_uM\"] = df[\"neg_log10_affinity_M\"].apply(lambda x: (10**(-x))*1e6)\n",
80
+ "\n",
81
+ " df.dropna(inplace=True)\n",
82
+ "\n",
83
+ " # Z-score normalization\n",
84
+ " df[\"affinity_norm\"] = zscore(df[\"neg_log10_affinity_M\"])\n",
85
+ "\n",
86
+ " # Select and reorder columns\n",
87
+ " df = df[[\"seq\", \"smiles_can\", \"affinity_uM\", \"neg_log10_affinity_M\", \"affinity_norm\"]]\n",
88
+ "\n",
89
+ " # Add normalization parameters as columns for reference\n",
90
+ " df[\"affinity_mean\"] = df[\"neg_log10_affinity_M\"].mean()\n",
91
+ " df[\"affinity_std\"] = df[\"neg_log10_affinity_M\"].std()\n",
92
+ "\n",
93
+ " return df.sort_values(by=\"affinity_norm\", ascending=False)\n",
94
+ "\n",
95
+ "dataset = load_binding_affinity_dataset(\n",
96
+ " csv_path=\"data/raw_data/bindingdb_ic50.csv\",\n",
97
+ " protein_col_idx=3,\n",
98
+ " smiles_col_idx=1,\n",
99
+ " affinity_col_idx=4,\n",
100
+ " is_log10_affinity=False, # Specify if Kd values are plain\n",
101
+ " canonicalize_smiles=True,\n",
102
+ " affinity_unit=\"nM\",\n",
103
+ " delimiter=\",\"\n",
104
+ ")\n",
105
+ "dataset.to_csv(\"data/bindingdb-ic50.csv\", index=False)\n"
106
+ ]
107
+ },
108
+ {
109
+ "cell_type": "markdown",
110
+ "metadata": {},
111
+ "source": [
112
+ "## TDC Data"
113
+ ]
114
+ },
115
+ {
116
+ "cell_type": "code",
117
+ "execution_count": null,
118
+ "metadata": {},
119
+ "outputs": [],
120
+ "source": [
121
+ "import pandas as pd\n",
122
+ "from rdkit import Chem\n",
123
+ "from tdc.multi_pred import DTI\n",
124
+ "\n",
125
+ "def process_dataset(name):\n",
126
+ " data = DTI(name=name)\n",
127
+ " data.harmonize_affinities(mode='mean')\n",
128
+ " data.convert_to_log()\n",
129
+ " df = data.get_data()\n",
130
+ " df['smiles_can'] = df['Drug'].apply(lambda s: Chem.MolToSmiles(Chem.MolFromSmiles(s), isomericSmiles=True, canonical=True) if Chem.MolFromSmiles(s) else None)\n",
131
+ " return df[['smiles_can', 'Target', 'Y']].dropna(subset=['smiles_can']).rename(columns={'Target': 'seq', 'Y': 'neg_log_10_affinity'})\n",
132
+ "\n",
133
+ "datasets = ['BindingDB_Ki', 'BindingDB_Kd', 'BindingDB_IC50', 'DAVIS', 'KIBA']\n",
134
+ "processed_data = [process_dataset(name) for name in datasets]\n",
135
+ "\n",
136
+ "binding_db = pd.concat(processed_data[:3]).drop_duplicates().reset_index(drop=True)\n",
137
+ "binding_db.to_csv(\"data/bindingdb.csv\", index=False)\n",
138
+ "processed_data[3].to_csv(\"data/davis.csv\", index=False)\n",
139
+ "processed_data[4].to_csv(\"data/kiba.csv\", index=False)\n"
140
+ ]
141
+ },
142
+ {
143
+ "cell_type": "markdown",
144
+ "metadata": {},
145
+ "source": [
146
+ "## PDBbind"
147
+ ]
148
+ },
149
+ {
150
+ "cell_type": "code",
151
+ "execution_count": null,
152
+ "metadata": {},
153
+ "outputs": [],
154
+ "source": [
155
+ "import os\n",
156
+ "from pathlib import Path\n",
157
+ "from Bio import PDB\n",
158
+ "from Bio.PDB.Polypeptide import PPBuilder\n",
159
+ "from rdkit import Chem\n",
160
+ "from rdkit.Chem import AllChem\n",
161
+ "import pandas as pd\n",
162
+ "from tqdm import tqdm\n",
163
+ "\n",
164
+ "ppb = PPBuilder()\n",
165
+ "\n",
166
+ "def get_protein_sequence(structure):\n",
167
+ " \"\"\"Extract protein sequence from a PDB structure.\"\"\"\n",
168
+ " sequence = \"\"\n",
169
+ " for pp in ppb.build_peptides(structure):\n",
170
+ " sequence += str(pp.get_sequence())\n",
171
+ " return sequence\n",
172
+ "\n",
173
+ "def get_canonical_smiles(mol):\n",
174
+ " \"\"\"Convert RDKit molecule to canonical SMILES.\"\"\"\n",
175
+ " return Chem.MolToSmiles(mol, isomericSmiles=True, canonical=True)\n",
176
+ "\n",
177
+ "def process_pdbbind_data(pdbbind_dir, index_file):\n",
178
+ " pdbbind_dir = Path(pdbbind_dir).expanduser()\n",
179
+ " parser = PDB.PDBParser(QUIET=True)\n",
180
+ " data = []\n",
181
+ "\n",
182
+ " # Read the index file\n",
183
+ " df_index = pd.read_csv(index_file, sep='\\s+', header=None, comment= \"#\", usecols=[0,1,2,3,4,6,7],\n",
184
+ " names=['PDB_ID', 'Resolution', 'Release_Year', '-logKd/Ki', 'Kd/Ki', 'Reference', 'Ligand_Name'])\n",
185
+ "\n",
186
+ " # Get the total number of entries for progress tracking\n",
187
+ " total_entries = len(df_index)\n",
188
+ "\n",
189
+ " # Use tqdm for progress tracking\n",
190
+ " with tqdm(total=total_entries, desc=\"Processing PDBbind data\") as pbar:\n",
191
+ " for _, row in df_index.iterrows():\n",
192
+ " pdb_id = row['PDB_ID']\n",
193
+ " subdir = pdbbind_dir / pdb_id\n",
194
+ "\n",
195
+ " if subdir.is_dir():\n",
196
+ " # Process protein\n",
197
+ " protein_file = subdir / f\"{pdb_id}_protein.pdb\"\n",
198
+ " if protein_file.exists():\n",
199
+ " structure = parser.get_structure(pdb_id, protein_file)\n",
200
+ " sequence = get_protein_sequence(structure)\n",
201
+ "\n",
202
+ " # Process ligand\n",
203
+ " ligand_file = subdir / f\"{pdb_id}_ligand.mol2\"\n",
204
+ " if ligand_file.exists():\n",
205
+ " mol = Chem.MolFromMol2File(str(ligand_file))\n",
206
+ " if mol is not None:\n",
207
+ " smiles = get_canonical_smiles(mol)\n",
208
+ "\n",
209
+ " # Get binding affinity\n",
210
+ " neg_log_10_affinity = row['-logKd/Ki']\n",
211
+ "\n",
212
+ " # Add to data list\n",
213
+ " data.append({\n",
214
+ " 'smiles_can': smiles,\n",
215
+ " 'seq': sequence,\n",
216
+ " 'neg_log_10_affinity_M': neg_log_10_affinity\n",
217
+ " })\n",
218
+ "\n",
219
+ " pbar.update(1)\n",
220
+ "\n",
221
+ " return pd.DataFrame(data)\n",
222
+ "\n",
223
+ "# Process data from PDBbind refined set\n",
224
+ "pdbbind_refined_dir = \"~/Data/PDBBind/PDBbind_v2020_refined\"\n",
225
+ "index_refined_file = \"/home/tyler/Data/PDBBind/index/INDEX_refined_data.2020\"\n",
226
+ "df_refined = process_pdbbind_data(pdbbind_refined_dir, index_refined_file)\n",
227
+ "\n",
228
+ "# Process data from PDBbind general set\n",
229
+ "pdbbind_general_dir = \"~/Data/PDBBind/PDBbind_v2020_other_PL\"\n",
230
+ "index_general_file = \"/home/tyler/Data/PDBBind/index/INDEX_general_PL_data.2020\"\n",
231
+ "df_general = process_pdbbind_data(pdbbind_general_dir, index_general_file)\n",
232
+ "\n",
233
+ "# Combine dataframes\n",
234
+ "df_combined = pd.concat([df_refined, df_general], ignore_index=True)\n",
235
+ "\n",
236
+ "# Remove duplicates (if any) and reset index\n",
237
+ "df_combined = df_combined.drop_duplicates().reset_index(drop=True)\n",
238
+ "\n",
239
+ "# Save to CSV\n",
240
+ "output_file = \"data/pdbbind_2020_combined.csv\"\n",
241
+ "df_combined.to_csv(output_file, index=False)\n",
242
+ "print(f\"Saved {len(df_combined)} entries to {output_file}\")"
243
+ ]
244
+ },
245
+ {
246
+ "cell_type": "markdown",
247
+ "metadata": {},
248
+ "source": [
249
+ "## Filtering bindingdb-kd"
250
+ ]
251
+ },
252
+ {
253
+ "cell_type": "code",
254
+ "execution_count": 40,
255
+ "metadata": {},
256
+ "outputs": [
257
+ {
258
+ "data": {
259
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjkAAAGzCAYAAADNKAZOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/GU6VOAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA4YElEQVR4nO3dfVgVdf7/8RegHBA9x7w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KlavXq17rnnHj3xxBP68MMPlZaWpk8//VTr169329ahQ4c0YcIEPfLII3rooYfUvXt3ff/99xo6dKj+85//6JFHHlGnTp20Y8cOzZ07V998840WL158yX2tqKjQt99+6zbPz89PLVu2vOS6Q4YM0WOPPaZXXnlFTz75pHr27ClJ5p9//vOflZCQoLi4OL3wwgv6/vvvtXz5ct166636+OOP3YLGuXPnFBcXp1tvvVW/+93v1KJFi4tuOyMjQ6dOndIjjzwiLy8vLVq0SHfffbe++OIL8+xPZmamxo0bp4iICKWlpenkyZNKTEzUz372s0vuG9DkGAAsbdWqVYakapPNZjPS09Pdav/xj38Ykow333zTbX5WVla1+QkJCUZAQIBbXUFBgSHJmDp1qtv8X/3qV4YkY8uWLea8zp07G5KMrKwst9pnn33WCAgIMP7973+7zU9NTTV8fHyMwsLCi+7v0KFDa9zfhIQEwzAMY8GCBcZPf/R17tzZXG4YhrFu3TpDkrF161a3ulOnThmtW7c2HnroIbf5TqfTcDgcbvMTEhIMSUZqamq1HhMSEozOnTubn48cOWJIMtq2bWt899135vx3333XkGS899575ryIiAijY8eOxqlTp8x527ZtMyS5jQnAMLhcBTQRy5YtU3Z2trKzs/V///d/Gj58uKZOnap33nnHrFm3bp0cDod+/vOf69tvvzWnqKgotWzZUlu3br3oNv72t79JkpKTk93mP/HEE5J+PAtxvrCwMMXFxbnNW7dunQYPHqzrrrvOrYfY2FhVVFRo+/btl9zXLl26mPtaNc2ZM+eS611Kdna2iouLNWHCBLfefHx8FB0dXePxefTRRy97/HHjxum6664zPw8ePFiS9MUXX0iSjh07pn379umBBx5wOys1dOhQRURE1HW3AMvichXQRAwYMMDtxuMJEybopptu0vTp0zV69Gj5+vrq8OHDKikpUWBgYI1jHD9+/KLb+PLLL+Xt7a1u3bq5zQ8ODlbr1q315Zdfus0PCwurNsbhw4e1d+9etW/fvk49SFJAQIBiY2MvWVdbhw8fliTddtttNS632+1un5s1a6aOHTte9vidOnVy+1wVeKruh6o6fj89vlXz9uzZc9nbApoCQg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zJAYBG5OjRo4qNjdX999+vkJAQHTx4UCtWrJDD4dD+/fvVtm1bT7cIXDO4JwcAGpHrrrtOUVFRev3113XixAkFBAQoPj5ezz//PAEH+AnO5AAAAEuq1T05y5cvV58+fWS322W32xUTE6NNmzaZy4cNGyYvLy+3adq0aW5jFBYWKj4+Xi1atFBgYKBmz55d4/Xlm2++WTabTd26dVN6enq1XpYtW6YuXbrIz89P0dHR2rVrV212BQAAWFytQk7Hjh31/PPPKz8/Xx999JFuu+023XXXXW6PLT700EP65ptvzGnRokXmsoqKCsXHx+vs2bPasWOHVq9erfT0dLdHW48cOaL4+HgNHz5cBQUFmjlzpqZOner2YrA1a9YoOTlZCxYs0J49e9S3b1/FxcVd1nfaAACApuGKL1e1adNGL774ohITEzVs2DBFRkZWe9tplU2bNmn06NE6duyYgoKCJP34To6UlBSdOHFCvr6+SklJUWZmpvbv32+uN378eBUXFysrK0uSFB0drf79+5sv3aqsrFRoaKhmzJih1NTUy+69srJSx44dU6tWrS77u3YAAIBnGYahU6dOKSQk5OLfD2fU0blz54y33nrL8PX1NQ4cOGAYhmEMHTrUaNeundG2bVujV69eRmpqqlFaWmqu89RTTxl9+/Z1G+eLL74wJBl79uwxDMMwBg8ebDz++ONuNf/7v/9r2O12wzAMo6yszPDx8THWr1/vVvPAAw8Yv/jFLy7a85kzZ4ySkhJz+uSTTwxJTExMTExMTI1w+uqrry76e7/WT1ft27dPMTExOnPmjFq2bKn169crPDxcknTfffepc+fOCgkJ0d69e5WSkqJDhw7pnXfekSQ5nU7zDE6Vqs9Op/OiNS6XSz/88INOnjypioqKGmuqXll/IWlpaXr66aerzf/qq6/M19oDAIBrm8vlUmhoqFq1anXRulqHnO7du6ugoEAlJSV6++23lZCQoNzcXIWHh+vhhx826yIiItShQweNGDFCn3/+ufntvZ40d+5cJScnm5+rDlLVjdQAAKDxuNStJrUOOb6+vurWrZskKSoqSrt379aSJUv02muvVauNjo6WJH322Wfq2rWrgoODqz0FVVRUJOnH74qp+rNq3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lpqaZMmVKPhwYAADRmtQo5x48f1wMPPKBvvvlGDodDffr00ebNm/Xzn/9ckvTyyy/L29tbY8eOVVlZmeLi4vTqq6+a6/v4+Gjjxo169NFHFRMTo4CAACUkJOiZZ54xa8LCwpSZmalZs2ZpyZIl6tixo15//XXFxcWZNePGjdOJEyc0f/58OZ1ORUZGKisrq9rNyAAAoOm64vfkNGaX+5w9rl28JwcAmp4Gf08OAADAtYyQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALImQAwAALKlWISctLU39+/dXq1atFBgYqDFjxujQoUNuNcOGDZOXl5fbNG3aNLeawsJCxcfHq0WLFgoMDNTs2bN17tw5t5pt27bp5ptvls1mU7du3ZSenl6tn2XLlqlLly7y8/NTdHS0du3aVZvdAQAAFlarkJObm6ukpCTt3LlT2dnZKi8v18iRI1VaWupW99BDD+mbb74xp0WLFpnLKioqFB8fr7Nnz2rHjh1avXq10tPTNX/+fLPmyJEjio+P1/Dhw1VQUKCZM2dq6tSp2rx5s1mzZs0aJScna8GCBdqzZ4/69u2ruLg4HT9+vK7HAgAAWIiXYRhGXVc+ceKEAgMDlZubqyFDhkj68UxOZGSkFi9eXOM6mzZt0ujRo3Xs2DEFBQVJklasWKGUlBSdOHFCvr6+SklJUWZmpvbv32+uN378eBUXFysrK0uSFB0drf79+2vp0qWSpMrKSoWGhmrGjBlKTU29rP5dLpccDodKSkpkt9vrehjgQYnpu+u87huT+9djJwCAq+Vyf39f0T05JSUlkqQ2bdq4zX/zzTfVrl079e7dW3PnztX3339vLsvLy1NERIQZcCQpLi5OLpdLBw4cMGtiY2PdxoyLi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I8//lhjxozRmDFjtH///truEgAAsCAvwzCMOq/s5aX169drzJgx5rzJkyeruLi42hmeKp9++qnCw8O1e/du9evXT5KUlZWlUaNG6euvv1ZISIiWL1+uX//613I6nfL19ZUkpaamasOGDTp48KAkady4cSotLdXGjRvNsQcOHKjIyEitWLHisvp3uVxyOBwqKSmR3W6vwxGApyWm767zum9M7l+PnQAArpbL/f3dIPfkbNu2TYGBgerevbseffRR/fe//zWX5eXlqXXr1mbAkaTY2Fh5e3vrww8/NGuGDBliBhxJiouL06FDh3Ty5EmzJjY21m27cXFxysvLu2BfZWVlcrlcbhMAALCmeg85t99+u/70pz8pJydHL7zwgnJzc3XHHXeooqJCkuR0OhUYGOi2TrNmzdSmTRs5nU6zJigoyK2m6vOlaqqW1yQtLU0Oh8OcQkNDr2xnAQDANatZfQ84fvx48+8RERHq06ePunbtqm3btmnEiBH1vblamTt3rpKTk83PLpeLoAMAgEU1+CPk119/vdq1a6fPPvtMkhQcHKzjx4+71Zw7d07fffedgoODzZqioiK3mqrPl6qpWl4Tm80mu93uNgEAAGtq8JDz9ddf67///a86dOggSYqJiVFxcbHy8/PNmi1btqiyslLR0dFmzfbt21VeXm7WZGdnq3v37rruuuvMmpycHLdtZWdnKyYmpqF3CQAANAK1DjmnT59WQUGBCgoKJElHjhxRQUGBCgsLdfr0ac2ePVs7d+7U0aNHlZOTo7vuukvdunVTXFycJKlnz566/fbb9dBDD2nXrl365z//qenTp2v8+PEKCQmRJN13333y9fVVYmKiDhw4oDVr1mjJkiVul5oef/xxZWVl6aWXXtLBgwe1cOFCffTRR5o+fXo9HBYAANDY1TrkfPTRR7rpppt00003SZKSk5N10003af78+fLx8dHevXv1i1/8QjfeeKMSExMVFRWlf/zjH7LZbOYYb775pnr06KERI0Zo1KhRuvXWW93egeNwOPT+++/ryJEjioqK0hNPPKH58+e7vUvnlltuUUZGhlauXKm+ffvq7bff1oYNG9S7d+8rOR4AAMAirug9OY0d78lp/HhPDgA0PR59Tw4AAICnEXIAAI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AADQSTerpqrlz56qkpMScvvrqK0+3BAAAGki9hpzg4GBJUlFRkdv8oqIic1lwcLCOHz/utvzcuXP67rvv3GpqGuP8bVyopmp5TWw2m+x2u9sEAACsqV5DTlhYmIKDg5WTk2POc7lc+vDDDxUTEyNJiomJUXFxsfLz882aLVu2qLKyUtHR0WbN9u3bVV5ebtZkZ2ere/fuuu6668ya87dTVVO1HQAA0LTVOuScPn1aBQUFKigokPTjzcYFBQUqLCyUl5eXZs6cqd/85jf661//qn379umBBx5QSEiI+QRWz549dfvtt+uhhx7Srl279M9//lPTp0/X+PHjFRISIkm677775Ovrq8TERB04cEBr1qzRkiVLlJycbPbx+OOPKysrSy+99JIOHjyohQsX6qOPPtL06dOv/KgAAIBGr1ltV/joo480fPhw83NV8EhISFB6errmzJmj0tJSPfzwwyouLtatt96qrKws+fn5meu8+eabmj59ukaMGCFvb2+NHTtWr7zyirnc4XDo/fffV1JSkqKiotSuXTvNnz/f7V06t9xyizIyMjRv3jw9+eSTuuGGG7Rhwwb17t27TgcCAABYyxW9J6ex4z05jR/vyQGApscj78kBAAC4VhByAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJdV7yFm4cKG8vLzcph49epjLz5w5o6SkJLVt21YtW7bU2LFjVVRU5DZGYWGh4uPj1aJFCwUGBmr27Nk6d+6cW822bdt08803y2azqVu3bkpPT6/vXQEAAI1Yg5zJ6dWrl7755htz+uCDD8xls2bN0nvvvad169YpNzdXx44d0913320ur6ioUHx8vM6ePasdO3Zo9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1Idx8Rdo35PDgAAwIU02ntyAAAALoaQAwAALImQAwAALImQAwAALImQAwAALImQU4/S0tLUv39/tWrVSoGBgRozZowOHTrk6bauKc8//7y8vLw0c+ZMT7fiUf/5z390//33q23btvL391dERIQ++ugjT7flURUVFXrqqacUFhYmf39/de3aVc8+++wlv4DPSrZv364777xTISEh8vLy0oYNG9yWG4ah+fPnq0OHDvL391dsbKwOHz7smWavoosdl/LycqWkpCgiIkIBAQEKCQnRAw88oGPHjnmu4avgUv9Wzjdt2jR5eXlp8eLFV62/awUhpx7l5uYqKSlJO3fuVHZ2tsrLyzVy5EiVlpZ6urVrwu7du/Xaa6+pT58+nm7Fo06ePKlBgwapefPm2rRpkz755BO99NJLuu666zzdmke98MILWr58uZYuXapPP/1UL7zwghYtWqQ//OEPnm7tqiktLVXfvn21bNmyGpcvWrRIr7zyilasWKEPP/xQAQEBiouL05kzZ65yp1fXxY7L999/rz179uipp57Snj179M477+jQoUP6xS9+4YFOr55L/Vupsn79eu3cufOS3/FkWQYazPHjxw1JRm5urqdb8bhTp04ZN9xwg5GdnW0MHTrUePzxxz3dksekpKQYt956q6fbuObEx8cbDz74oNu8u+++25g4caKHOvIsScb69evNz5WVlUZwcLDx4osvmvOKi4sNm81mvPXWWx7o0DN+elxqsmvXLkOS8eWXX16dpjzsQsfk66+/Nn72s58Z+/fvNzp37my8/PLLV703T+NMTgMqKSmRJLVp08bDnXheUlKS4uPjFRsb6+lWPO6vf/2r+vXrp1/+8pcKDAzUTTfdpD/+8Y+ebsvjbrnlFuXk5Ojf//63JOlf//qXPvjgA91xxx0e7uzacOTIETmdTrf/hhwOh6Kjo5WXl+fBzq49JSUl8vLyatAvYL7WVVZWatKkSZo9e7Z69erl6XY8plF/rcO1rLKyUjNnztSgQYPUu3dvT7fjUX/5y1+0Z88e7d6929OtXBO++OILLV++XMnJyXryySe1e/duPfbYY/L19VVCQoKn2/OY1NRUuVwu9ejRQz4+PqqoqNBvf/tbTZw40dOtXROcTqckVfvamqCg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cuTIBX/2bt261dOtN5hL/Vv5qab6CLmXYTSh14kCAIAmgxuPAQCAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJRFyAACAJf1/v9yt/o6IlNoAAAAASUVORK5CYII=",
260
+ "text/plain": [
261
+ "<Figure size 640x480 with 1 Axes>"
262
+ ]
263
+ },
264
+ "metadata": {},
265
+ "output_type": "display_data"
266
+ },
267
+ {
268
+ "name": "stdout",
269
+ "output_type": "stream",
270
+ "text": [
271
+ "Mode of neg_log10_affinity_M in BindingDB IC50 dataset: 5.00\n"
272
+ ]
273
+ },
274
+ {
275
+ "data": {
276
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGzCAYAAAAxPS2EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/GU6VOAAAACXBIWXMAAA9hAAAPYQGoP6dpAAApY0lEQVR4nO3de1SVdb7H8c9GZIOXjWICkqKUTopieTtKNo0mI8chG1OP2TEStTwamsicNE9espmGck7eyqSyiZrB8bKOOqWjDssLTSMp4tDxkqTrcNQyQC3ZXsHgOX+02KcdeAGRhx++X2vtteJ5fvvZ372XydtnPxsclmVZAgAAMIiP3QMAAABUFwEDAACMQ8AAAADjEDAAAMA4BAwAADAOAQMAAIxDwAAAAOMQMAAAwDgEDAAAMA4BA8DjD3/4gzp37qzGjRurRYsWdo9zVR06dFBCQoLn6507d8rhcGjnzp11NoPD4dCLL75YZ48HwBsBA9wm3nzzTTkcDvXt27fK/YcPH1ZCQoLuvvtuvfPOO3r77bd18eJFvfjii3UaBv/7v/8rh8NR5a1fv343fJyVK1dq8eLFt25QALbytXsAAHUjPT1dHTp00J49e3T06FF17NjRa//OnTtVXl6uJUuWePadPn1a8+fPlyQNGDCgTud9/PHH9Ytf/MJrW+vWrSVJeXl58vG59r+/Vq5cqQMHDigpKemWzHfp0iX5+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z32mFatWqWysrIaHfObb77R9u3bNWrUKJ07d06nT5/W6dOndebMGcXGxurIkSP66quvvO7z9NNPq1GjRjf8GBMnTlRGRobX7d57763RvD+0du1adenSRZ07d/bMffr0aT300EOSpB07dnit/9nPfqbIyMgbPv6kSZO8vv7pT3+qM2fOyO12S5LnLahnnnnGa93UqVOr/VyA2xlvIQENWFlZmVatWqWBAwcqPz/fs71v37567bXXtG3bNg0ePLjaxz169Kgsy9KcOXM0Z86cKtcUFRXpzjvv9HwdERFRrcfo1KmTYmJiqj3b9Rw5ckSff/655/qeH6u4mLlCdecODw/3+rply5aSpG+//VYul0vHjh2Tj49PpeP++FNhAK6NgAEasO3bt+vrr7/WqlWrtGrVqkr709PTaxQw5eXlkqR///d/V2xsbJVrfvwNOSAgoNqPcyuUl5crKipKCxcurHJ/u3btvL6u7txXO8tkWVa1jgPg2ggYoAFLT09XcHCwli1bVmnfunXrtH79eqWmpl71m7TD4ahy+1133SVJaty48S05S1Ibrjb73Xffrc8++0yDBg266ppbqX379iovL1d+fr46derk2X706NE6nwUwGdfAAA3UpUuXtG7dOj388MMaOXJkpduUKVN07ty5Sh97/qEmTZpIks6ePeu1PTg4WAMGDNBbb72lr7/+utL9Tp06VavPpSaaNm2q4uLiSttHjRqlr776Su+8806lfZcuXbqhT0jdjIozVm+++abX9tdff/2WPi7Q0HAGBmigPvzwQ507d06PPPJIlfv79eun1q1bKz09XY899liVawICAhQZGanVq1frJz/5iYKCgtStWzd169ZNy5Yt0wMPPKCoqCg9/fTTuuuuu1RYWKisrCx9+eWX+uyzz27l07uuXr16afXq1UpOTlafPn3UrFkzDR06VPHx8VqzZo0mTZqkHTt2qH///iorK9Phw4e1Zs0abd26Vb17976lc40YMUKLFy/WmTNnPB+j/uKLLyRd/cwRAG8EDNBApaeny9/fXz//+c+r3O/j46O4uDilp6frzJkzVz3OihUrNHXqVE2fPl2lpaWaN2+eunXrpsjISO3du1fz589XWlqazpw5o+DgYPXo0UNz5869VU/rhj3zzDPKz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XpTJek6rxulTGa1IZr0nVGvrrcq0zLxXq5UW8fn5+6tWrl7Zt2+bZVl5erm3btik6OtrGyQAAQH1QL8/ASFJycrLGjh2r3r1765/+6Z+0ePFiXbhwQePGjbN7NAAAYLN6GzCPPfaYTp06pblz56qgoED33XeftmzZUunC3rrmdDo1b968Sm9X3e54XSrjNakar0tlvCaV8ZpUjdfl/zms631OCQAAoJ6pl9fAAAAAXAsBAwAAjEPAAAAA4xAwAADAOAQMAAAwDgFzg1JSUtSnTx81b95cwcHBGjZsmPLy8uweq1555ZVX5HA4lJSUZPcotvvqq6/0xBNPqFWrVgoICFBUVJT27t1r91i2KSsr05w5cxQREaGAgADdfffd+vWvf33dX9bW0Hz88ccaOnSowsLC5HA4tGHDBq/9lmVp7ty5atOmjQICAhQTE6MjR47YM2wdudZrcuXKFc2cOVNRUVFq2rSpwsLC9OSTT+rkyZP2DVwHrvfn5IcmTZokh8OhxYsX19l89QUBc4MyMzOVmJioTz/9VBkZGbpy5YoGDx6sCxcu2D1avZCdna233npL3bt3t3sU23377bfq37+/GjdurM2bN+vQoUN67bXX1LJlS7tHs82rr76q5cuX64033tDnn3+uV199VQsWLNDrr79u92h16sKFC7r33nu1bNmyKvcvWLBAS5cuVWpqqnbv3q2mTZsqNjZWly9fruNJ6861XpOLFy9q3759mjNnjvbt26d169YpLy9PjzzyiA2T1p3r/TmpsH79en366afX/Z1BDZaFGikqKrIkWZmZmXaPYrtz585ZnTp1sjIyMqyf/exn1rRp0+weyVYzZ860HnjgAbvHqFfi4uKs8ePHe20bPny4NWbMGJsmsp8ka/369Z6vy8vLrdDQUOt3v/udZ9vZs2ctp9Np/elPf7Jhwrr349ekKnv27LEkWceOHauboWx2tdfkyy+/tO68807rwIEDVvv27a1FixbV+Wx24wxMDRUXF0uSgoKCbJ7EfomJiYqLi1NMTIzdo9QLH374oXr37q1/+Zd/UXBwsHr06KF33nnH7rFsdf/992vbtm364osvJEmfffaZPvnkEw0ZMsTmyeqP/Px8FRQUeP1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KAg+fn52TX2LXW9Pyc/jrjGjRsrNDRU99xzT12Pai+7PwZlCklV3t577z27R6tX+Bj19z766COrW7dultPptDp37my9/fbbdo9kK7fbbU2bNs0KDw+3/P39rbvuust64YUXrJKSErtHq1M7duyo8u+RsWPHWpb1/Uep58yZY4WEhFhOp9MaNGiQlZeXZ+/Qt9i1XpP8/Pyr/t27Y8cOu0e/Za735+THbtePUTss6zb7UZgAAMB4XMQLAACMQ8AAAADjEDAAAMA4BAwAADAOAQMAAIxDwAAAAOMQMAAAwDgEDAAAMA4BAwAAjEPAAAAA4xAwAADAOP8HWX3tOENWsQQAAAAASUVORK5CYII=",
277
+ "text/plain": [
278
+ "<Figure size 640x480 with 1 Axes>"
279
+ ]
280
+ },
281
+ "metadata": {},
282
+ "output_type": "display_data"
283
+ },
284
+ {
285
+ "name": "stdout",
286
+ "output_type": "stream",
287
+ "text": [
288
+ "Number of entries after filtering: 35845\n"
289
+ ]
290
+ }
291
+ ],
292
+ "source": [
293
+ "import pandas as pd\n",
294
+ "import matplotlib.pyplot as plt\n",
295
+ "\n",
296
+ "from statistics import mode\n",
297
+ "# Read the bindingdb-ic50 dataset\n",
298
+ "bindingdb_df = pd.read_csv('bindingdb-kd.csv')\n",
299
+ "\n",
300
+ "# Calculate the mode of neg_log10_affinity_M\n",
301
+ "mode_affinity = mode([x for x in bindingdb_df['neg_log10_affinity_M'].tolist()])\n",
302
+ "# Visualize before filtering\n",
303
+ "plt.hist(bindingdb_df['neg_log10_affinity_M'], bins=30, alpha=0.7)\n",
304
+ "plt.title('Before Filtering')\n",
305
+ "plt.show()\n",
306
+ "\n",
307
+ "print(f\"Mode of neg_log10_affinity_M in BindingDB IC50 dataset: {mode_affinity:.2f}\")\n",
308
+ "\n",
309
+ "# set seed\n",
310
+ "np.random.seed(42)\n",
311
+ "# Filter out 90% of rows where neg_log10_affinity_M equals 5\n",
312
+ "mask_value_5 = bindingdb_df['neg_log10_affinity_M'] == 5\n",
313
+ "rows_to_keep = ~mask_value_5 | (mask_value_5 & (np.random.rand(len(bindingdb_df)) < 0.05))\n",
314
+ "bindingdb_df = bindingdb_df[rows_to_keep].reset_index(drop=True)\n",
315
+ "\n",
316
+ "# Visualize after filtering\n",
317
+ "plt.hist(bindingdb_df['neg_log10_affinity_M'], bins=30, alpha=0.7)\n",
318
+ "plt.title('After Filtering')\n",
319
+ "plt.show()\n",
320
+ "\n",
321
+ "print(f\"Number of entries after filtering: {len(bindingdb_df)}\")\n",
322
+ "\n",
323
+ "bindingdb_df.to_csv('bindingdb-kd-filtered.csv', index=False)\n"
324
+ ]
325
+ },
326
+ {
327
+ "cell_type": "code",
328
+ "execution_count": null,
329
+ "metadata": {},
330
+ "outputs": [],
331
+ "source": []
332
+ }
333
+ ],
334
+ "metadata": {
335
+ "kernelspec": {
336
+ "display_name": "env",
337
+ "language": "python",
338
+ "name": "python3"
339
+ },
340
+ "language_info": {
341
+ "codemirror_mode": {
342
+ "name": "ipython",
343
+ "version": 3
344
+ },
345
+ "file_extension": ".py",
346
+ "mimetype": "text/x-python",
347
+ "name": "python",
348
+ "nbconvert_exporter": "python",
349
+ "pygments_lexer": "ipython3",
350
+ "version": "3.11.11"
351
+ }
352
+ },
353
+ "nbformat": 4,
354
+ "nbformat_minor": 2
355
+ }
standardize_data.py DELETED
@@ -1,205 +0,0 @@
1
- import pandas as pd
2
- from rdkit import Chem
3
- from rdkit.Chem import MolToSmiles
4
- from scipy.stats import zscore
5
- from tqdm import tqdm
6
- import numpy as np
7
-
8
- def load_binding_affinity_dataset(csv_path,
9
- protein_col_idx,
10
- smiles_col_idx,
11
- affinity_col_idx,
12
- is_log10_affinity=True,
13
- canonicalize_smiles=True,
14
- affinity_unit="uM",
15
- delimiter=','):
16
- """
17
- Load a protein-ligand binding affinity dataset and preprocess it.
18
-
19
- Args:
20
- csv_path (str): Path to the CSV file.
21
- protein_col_idx (int): Column index containing protein sequences.
22
- smiles_col_idx (int): Column index containing molecule SMILES.
23
- affinity_col_idx (int): Column index containing binding affinities.
24
- is_log10_affinity (bool): Whether affinities are in log10. Default is True.
25
- canonicalize_smiles (bool): Whether to canonicalize SMILES. Default is True.
26
- delimiter (str): Delimiter for the CSV file. Default is ','.
27
-
28
- Returns:
29
- pd.DataFrame: Processed DataFrame with columns "seq", "smiles_can",
30
- "affinity_uM", "neg_log10_affinity_M", and "affinity_norm".
31
- """
32
- # Load dataset
33
- df = pd.read_csv(csv_path, delimiter=delimiter)
34
-
35
- # Extract relevant columns
36
- df = df.iloc[:, [protein_col_idx, smiles_col_idx, affinity_col_idx]]
37
- df.columns = ["seq", "smiles", "affinity"]
38
-
39
- # Canonicalize SMILES
40
- if canonicalize_smiles:
41
- def canonicalize(smiles):
42
- try:
43
- mol = Chem.MolFromSmiles(smiles)
44
- return MolToSmiles(mol, canonical=True) if mol else None
45
- except:
46
- return None
47
-
48
- from tqdm import tqdm
49
- tqdm.pandas()
50
- df["smiles_can"] = df["smiles"].progress_apply(canonicalize)
51
- df = df[df["smiles_can"].notna()]
52
- else:
53
- df["smiles_can"] = df["smiles"]
54
-
55
- # Process affinities
56
- if not is_log10_affinity:
57
- # Convert plain Kd value to neg log10(M)
58
- df["affinity_uM"] = df["affinity"]/(1e3 if affinity_unit == "nM" else 1)
59
-
60
- df["neg_log10_affinity_M"] = -df["affinity_uM"].apply(lambda x: np.log10(x/1e6) if x > 0 else np.nan)
61
- else:
62
- # Convert log10 values to plain uM for clarity
63
- df["neg_log10_affinity_M"] = df["affinity"]
64
- df["affinity_uM"] = df["neg_log10_affinity_M"].apply(lambda x: (10**(-x))*1e6)
65
-
66
- df.dropna(inplace=True)
67
-
68
- # Z-score normalization
69
- df["affinity_norm"] = zscore(df["neg_log10_affinity_M"])
70
-
71
- # Select and reorder columns
72
- df = df[["seq", "smiles_can", "affinity_uM", "neg_log10_affinity_M", "affinity_norm"]]
73
-
74
- # Add normalization parameters as columns for reference
75
- df["affinity_mean"] = df["neg_log10_affinity_M"].mean()
76
- df["affinity_std"] = df["neg_log10_affinity_M"].std()
77
-
78
- return df.sort_values(by="affinity_norm", ascending=False)
79
-
80
- dataset = load_binding_affinity_dataset(
81
- csv_path="data/raw_data/bindingdb_ic50.csv",
82
- protein_col_idx=3,
83
- smiles_col_idx=1,
84
- affinity_col_idx=4,
85
- is_log10_affinity=False, # Specify if Kd values are plain
86
- canonicalize_smiles=True,
87
- affinity_unit="nM",
88
- delimiter=","
89
- )
90
- dataset.to_csv("data/bindingdb-ic50.csv", index=False)
91
-
92
- # View processed dataset
93
- print(dataset.head())
94
-
95
-
96
- # Code for loading tdc data:
97
- # import pandas as pd
98
- # from rdkit import Chem
99
- # from tdc.multi_pred import DTI
100
-
101
- # def process_dataset(name):
102
- # data = DTI(name=name)
103
- # data.harmonize_affinities(mode='mean')
104
- # data.convert_to_log()
105
- # df = data.get_data()
106
- # df['smiles_can'] = df['Drug'].apply(lambda s: Chem.MolToSmiles(Chem.MolFromSmiles(s), isomericSmiles=True, canonical=True) if Chem.MolFromSmiles(s) else None)
107
- # return df[['smiles_can', 'Target', 'Y']].dropna(subset=['smiles_can']).rename(columns={'Target': 'seq', 'Y': 'neg_log_10_affinity'})
108
-
109
- # datasets = ['BindingDB_Ki', 'BindingDB_Kd', 'BindingDB_IC50', 'DAVIS', 'KIBA']
110
- # processed_data = [process_dataset(name) for name in datasets]
111
-
112
- # binding_db = pd.concat(processed_data[:3]).drop_duplicates().reset_index(drop=True)
113
- # binding_db.to_csv("data/bindingdb.csv", index=False)
114
- # processed_data[3].to_csv("data/davis.csv", index=False)
115
- # processed_data[4].to_csv("data/kiba.csv", index=False)
116
-
117
- # code for loading pdbbind data:
118
- # import os
119
- # from pathlib import Path
120
- # from Bio import PDB
121
- # from Bio.PDB.Polypeptide import PPBuilder
122
- # from rdkit import Chem
123
- # from rdkit.Chem import AllChem
124
- # import pandas as pd
125
- # from tqdm import tqdm
126
-
127
- # ppb = PPBuilder()
128
-
129
- # def get_protein_sequence(structure):
130
- # """Extract protein sequence from a PDB structure."""
131
- # sequence = ""
132
- # for pp in ppb.build_peptides(structure):
133
- # sequence += str(pp.get_sequence())
134
- # return sequence
135
-
136
- # def get_canonical_smiles(mol):
137
- # """Convert RDKit molecule to canonical SMILES."""
138
- # return Chem.MolToSmiles(mol, isomericSmiles=True, canonical=True)
139
-
140
- # def process_pdbbind_data(pdbbind_dir, index_file):
141
- # pdbbind_dir = Path(pdbbind_dir).expanduser()
142
- # parser = PDB.PDBParser(QUIET=True)
143
- # data = []
144
-
145
- # # Read the index file
146
- # df_index = pd.read_csv(index_file, sep='\s+', header=None, comment= "#", usecols=[0,1,2,3,4,6,7],
147
- # names=['PDB_ID', 'Resolution', 'Release_Year', '-logKd/Ki', 'Kd/Ki', 'Reference', 'Ligand_Name'])
148
-
149
- # # Get the total number of entries for progress tracking
150
- # total_entries = len(df_index)
151
-
152
- # # Use tqdm for progress tracking
153
- # with tqdm(total=total_entries, desc="Processing PDBbind data") as pbar:
154
- # for _, row in df_index.iterrows():
155
- # pdb_id = row['PDB_ID']
156
- # subdir = pdbbind_dir / pdb_id
157
-
158
- # if subdir.is_dir():
159
- # # Process protein
160
- # protein_file = subdir / f"{pdb_id}_protein.pdb"
161
- # if protein_file.exists():
162
- # structure = parser.get_structure(pdb_id, protein_file)
163
- # sequence = get_protein_sequence(structure)
164
-
165
- # # Process ligand
166
- # ligand_file = subdir / f"{pdb_id}_ligand.mol2"
167
- # if ligand_file.exists():
168
- # mol = Chem.MolFromMol2File(str(ligand_file))
169
- # if mol is not None:
170
- # smiles = get_canonical_smiles(mol)
171
-
172
- # # Get binding affinity
173
- # neg_log_10_affinity = row['-logKd/Ki']
174
-
175
- # # Add to data list
176
- # data.append({
177
- # 'smiles_can': smiles,
178
- # 'seq': sequence,
179
- # 'neg_log_10_affinity_M': neg_log_10_affinity
180
- # })
181
-
182
- # pbar.update(1)
183
-
184
- # return pd.DataFrame(data)
185
-
186
- # # Process data from PDBbind refined set
187
- # pdbbind_refined_dir = "~/Data/PDBBind/PDBbind_v2020_refined"
188
- # index_refined_file = "/home/tyler/Data/PDBBind/index/INDEX_refined_data.2020"
189
- # df_refined = process_pdbbind_data(pdbbind_refined_dir, index_refined_file)
190
-
191
- # # Process data from PDBbind general set
192
- # pdbbind_general_dir = "~/Data/PDBBind/PDBbind_v2020_other_PL"
193
- # index_general_file = "/home/tyler/Data/PDBBind/index/INDEX_general_PL_data.2020"
194
- # df_general = process_pdbbind_data(pdbbind_general_dir, index_general_file)
195
-
196
- # # Combine dataframes
197
- # df_combined = pd.concat([df_refined, df_general], ignore_index=True)
198
-
199
- # # Remove duplicates (if any) and reset index
200
- # df_combined = df_combined.drop_duplicates().reset_index(drop=True)
201
-
202
- # # Save to CSV
203
- # output_file = "data/pdbbind_2020_combined.csv"
204
- # df_combined.to_csv(output_file, index=False)
205
- # print(f"Saved {len(df_combined)} entries to {output_file}")