File size: 17,125 Bytes
4e3b836
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f880234
4e3b836
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "c47a32d8-c857-41de-a70a-cec48046df12",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "e0c6bd53-3417-44bd-b1b4-81802b37fbfc",
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv('binding_moad/every.csv',header=None,skiprows=2)\n",
    "df = df.rename(columns={2:'pdb',3: 'ligand_name', 4: 'ligand_valid', 7: 'affinity_val', 8: 'affinity_unit', 9:'smiles'})\n",
    "#df = df[df['ligand_valid']!='invalid'].copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "e40b1ddc-9a98-4a3b-b8a6-45e3940a3ea2",
   "metadata": {},
   "outputs": [],
   "source": [
    "df['is_sep'] = df[1] == 'Family. Representative Entry is '"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "4f00a0d1-78db-4f32-9d12-5e035b70ef98",
   "metadata": {},
   "outputs": [],
   "source": [
    "df['cum_sum'] = df['is_sep'].cumsum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "52c0c66c-1eb0-415b-b019-bc77419ccbd7",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pint import UnitRegistry\n",
    "ureg = UnitRegistry()\n",
    "\n",
    "def to_uM(affinity_unit):\n",
    "    try:\n",
    "        val = ureg(str(affinity_unit[0])+str(affinity_unit[1]))\n",
    "        return val.m_as(ureg.uM)\n",
    "    except Exception:\n",
    "        pass\n",
    "    \n",
    "    try:\n",
    "        val = ureg(str(affinity_unit[0])+str(affinity_unit[1]))\n",
    "        return 1/val.m_as(1/ureg.uM)\n",
    "    except Exception:\n",
    "        pass"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "e5b4dd41-1389-408d-bee6-6dbeefc1d5c7",
   "metadata": {},
   "outputs": [],
   "source": [
    "groupby = df.groupby('cum_sum')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "id": "61b8276c-54fe-4989-af5f-723994e1df7e",
   "metadata": {},
   "outputs": [],
   "source": [
    "def group(df):\n",
    "    pdb = df[df['is_sep']]['pdb'].values\n",
    "    if len(pdb) > 0:\n",
    "        pdb = pdb[0]\n",
    "        df['pdb_ref'] = pdb\n",
    "    return df[df['ligand_valid']=='valid']\n",
    "df_expand = groupby.apply(group).reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "id": "8bb2dfac-5f11-455c-9dee-3607b47b4232",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_expand['affinity_uM'] = df_expand[['affinity_val','affinity_unit']].apply(to_uM,axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "id": "0dc39f62-5b18-4a86-9a44-17d1925da2ad",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_complex = pd.read_parquet('data/moad_complex.parquet')\n",
    "df_complex['name'] = df_complex['name'].str.upper()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "6d158a41-64c6-4fa2-92d5-562aa11e8924",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_all = df_expand.merge(df_complex,left_on='pdb_ref',right_on='name')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "id": "901fe6c6-dc8c-4ce4-82c6-1fb0b718287a",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_all = df_all[~df_all['affinity_val'].isnull()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "id": "383f9a1c-ffc6-43da-ac5a-5bcb815be28b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>pdb</th>\n",
       "      <th>ligand_name</th>\n",
       "      <th>ligand_valid</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>affinity_val</th>\n",
       "      <th>affinity_unit</th>\n",
       "      <th>smiles</th>\n",
       "      <th>10</th>\n",
       "      <th>is_sep</th>\n",
       "      <th>cum_sum</th>\n",
       "      <th>pdb_ref</th>\n",
       "      <th>affinity_uM</th>\n",
       "      <th>name</th>\n",
       "      <th>seq</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2PA:C:613</td>\n",
       "      <td>valid</td>\n",
       "      <td>Ki</td>\n",
       "      <td>=</td>\n",
       "      <td>0.62</td>\n",
       "      <td>nM</td>\n",
       "      <td>NP(=O)(N)O</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>6H8J</td>\n",
       "      <td>0.000620</td>\n",
       "      <td>6H8J</td>\n",
       "      <td>NYIVPGEYRVAEGEIEINAGREKTTIRVSNTGDRPIQVGSHIHFVE...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>HAE:C:800</td>\n",
       "      <td>valid</td>\n",
       "      <td>Ki</td>\n",
       "      <td>=</td>\n",
       "      <td>2.60</td>\n",
       "      <td>uM</td>\n",
       "      <td>CC(=O)NO</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>1</td>\n",
       "      <td>6H8J</td>\n",
       "      <td>2.600000</td>\n",
       "      <td>6H8J</td>\n",
       "      <td>NYIVPGEYRVAEGEIEINAGREKTTIRVSNTGDRPIQVGSHIHFVE...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>43W:A:902</td>\n",
       "      <td>valid</td>\n",
       "      <td>ic50</td>\n",
       "      <td>=</td>\n",
       "      <td>580.00</td>\n",
       "      <td>nM</td>\n",
       "      <td>C#CCCOP(=O)(O)OP(=O)(O)O</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>2</td>\n",
       "      <td>4S3F</td>\n",
       "      <td>0.580000</td>\n",
       "      <td>4S3F</td>\n",
       "      <td>MEGMRRPTPTVYVGRVPIGGAHPIAVQSMTNTPTRDVEATTAQVLE...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0CG:A:902</td>\n",
       "      <td>valid</td>\n",
       "      <td>ic50</td>\n",
       "      <td>=</td>\n",
       "      <td>770.00</td>\n",
       "      <td>nM</td>\n",
       "      <td>C#CCOP(=O)(O)OP(=O)(O)O</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>2</td>\n",
       "      <td>4S3F</td>\n",
       "      <td>0.770000</td>\n",
       "      <td>4S3F</td>\n",
       "      <td>MEGMRRPTPTVYVGRVPIGGAHPIAVQSMTNTPTRDVEATTAQVLE...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>ADN:A:901</td>\n",
       "      <td>valid</td>\n",
       "      <td>Kd</td>\n",
       "      <td>=</td>\n",
       "      <td>15.00</td>\n",
       "      <td>uM</td>\n",
       "      <td>c1nc(c2c(n1)n(cn2)[C@H]3[C@@H]([C@@H]([C@H](O3...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>5</td>\n",
       "      <td>2GL0</td>\n",
       "      <td>15.000000</td>\n",
       "      <td>2GL0</td>\n",
       "      <td>MTDMSIKFELIDVPIPQGTNVIIGQAHFIKTVEDLYEALVTSVPGV...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51900</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>MAN NAG:G:1</td>\n",
       "      <td>valid</td>\n",
       "      <td>Ka</td>\n",
       "      <td>=</td>\n",
       "      <td>7860.00</td>\n",
       "      <td>M^-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>10499</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>127.226463</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51901</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>MAN NAG:F:1</td>\n",
       "      <td>valid</td>\n",
       "      <td>Ka</td>\n",
       "      <td>=</td>\n",
       "      <td>7860.00</td>\n",
       "      <td>M^-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>10499</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>127.226463</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51902</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NGA NAG:F:1</td>\n",
       "      <td>valid</td>\n",
       "      <td>Ka</td>\n",
       "      <td>=</td>\n",
       "      <td>5910.00</td>\n",
       "      <td>M^-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>10499</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>169.204738</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51903</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NGA NAG:E:1</td>\n",
       "      <td>valid</td>\n",
       "      <td>Ka</td>\n",
       "      <td>=</td>\n",
       "      <td>5910.00</td>\n",
       "      <td>M^-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>10499</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>169.204738</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51904</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NGA NAG:H:1</td>\n",
       "      <td>valid</td>\n",
       "      <td>Ka</td>\n",
       "      <td>=</td>\n",
       "      <td>5910.00</td>\n",
       "      <td>M^-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>10499</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>169.204738</td>\n",
       "      <td>2WDB</td>\n",
       "      <td>MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>25425 rows × 17 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         0    1  pdb  ligand_name ligand_valid     5  6  affinity_val  \\\n",
       "0      NaN  NaN  NaN    2PA:C:613        valid    Ki  =          0.62   \n",
       "2      NaN  NaN  NaN    HAE:C:800        valid    Ki  =          2.60   \n",
       "7      NaN  NaN  NaN    43W:A:902        valid  ic50  =        580.00   \n",
       "16     NaN  NaN  NaN    0CG:A:902        valid  ic50  =        770.00   \n",
       "17     NaN  NaN  NaN    ADN:A:901        valid    Kd  =         15.00   \n",
       "...    ...  ...  ...          ...          ...   ... ..           ...   \n",
       "51900  NaN  NaN  NaN  MAN NAG:G:1        valid    Ka  =       7860.00   \n",
       "51901  NaN  NaN  NaN  MAN NAG:F:1        valid    Ka  =       7860.00   \n",
       "51902  NaN  NaN  NaN  NGA NAG:F:1        valid    Ka  =       5910.00   \n",
       "51903  NaN  NaN  NaN  NGA NAG:E:1        valid    Ka  =       5910.00   \n",
       "51904  NaN  NaN  NaN  NGA NAG:H:1        valid    Ka  =       5910.00   \n",
       "\n",
       "      affinity_unit                                             smiles  10  \\\n",
       "0                nM                                         NP(=O)(N)O NaN   \n",
       "2                uM                                           CC(=O)NO NaN   \n",
       "7                nM                           C#CCCOP(=O)(O)OP(=O)(O)O NaN   \n",
       "16               nM                            C#CCOP(=O)(O)OP(=O)(O)O NaN   \n",
       "17               uM  c1nc(c2c(n1)n(cn2)[C@H]3[C@@H]([C@@H]([C@H](O3... NaN   \n",
       "...             ...                                                ...  ..   \n",
       "51900          M^-1                                                NaN NaN   \n",
       "51901          M^-1                                                NaN NaN   \n",
       "51902          M^-1                                                NaN NaN   \n",
       "51903          M^-1                                                NaN NaN   \n",
       "51904          M^-1                                                NaN NaN   \n",
       "\n",
       "       is_sep  cum_sum pdb_ref  affinity_uM  name  \\\n",
       "0       False        1    6H8J     0.000620  6H8J   \n",
       "2       False        1    6H8J     2.600000  6H8J   \n",
       "7       False        2    4S3F     0.580000  4S3F   \n",
       "16      False        2    4S3F     0.770000  4S3F   \n",
       "17      False        5    2GL0    15.000000  2GL0   \n",
       "...       ...      ...     ...          ...   ...   \n",
       "51900   False    10499    2WDB   127.226463  2WDB   \n",
       "51901   False    10499    2WDB   127.226463  2WDB   \n",
       "51902   False    10499    2WDB   169.204738  2WDB   \n",
       "51903   False    10499    2WDB   169.204738  2WDB   \n",
       "51904   False    10499    2WDB   169.204738  2WDB   \n",
       "\n",
       "                                                     seq  \n",
       "0      NYIVPGEYRVAEGEIEINAGREKTTIRVSNTGDRPIQVGSHIHFVE...  \n",
       "2      NYIVPGEYRVAEGEIEINAGREKTTIRVSNTGDRPIQVGSHIHFVE...  \n",
       "7      MEGMRRPTPTVYVGRVPIGGAHPIAVQSMTNTPTRDVEATTAQVLE...  \n",
       "16     MEGMRRPTPTVYVGRVPIGGAHPIAVQSMTNTPTRDVEATTAQVLE...  \n",
       "17     MTDMSIKFELIDVPIPQGTNVIIGQAHFIKTVEDLYEALVTSVPGV...  \n",
       "...                                                  ...  \n",
       "51900  MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...  \n",
       "51901  MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...  \n",
       "51902  MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...  \n",
       "51903  MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...  \n",
       "51904  MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...  \n",
       "\n",
       "[25425 rows x 17 columns]"
      ]
     },
     "execution_count": 130,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_all"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "id": "bebc962b-10f7-478c-8e23-e2d3722e875c",
   "metadata": {},
   "outputs": [],
   "source": [
    "df_all[['pdb','ligand_name','smiles','name','affinity_uM','seq']].to_parquet('data/moad.parquet')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6ceb8706-273c-4a83-8cda-c7e33fc87e38",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}