add covalent inhibitors split
Browse files- binding_affinity.py +9 -9
- combine_dbs.ipynb +104 -67
- data/cov.parquet +3 -0
binding_affinity.py
CHANGED
@@ -49,8 +49,8 @@ _LICENSE = "BSD two-clause"
|
|
49 |
_URL = "https://huggingface.co/datasets/jglaser/binding_affinity/resolve/main/"
|
50 |
_data_dir = "data/"
|
51 |
_file_names = {'default': _data_dir+'all.parquet',
|
52 |
-
'
|
53 |
-
'
|
54 |
|
55 |
_URLs = {name: _URL+_file_names[name] for name in _file_names}
|
56 |
|
@@ -124,22 +124,22 @@ class BindingAffinity(datasets.ArrowBasedBuilder):
|
|
124 |
'filepath': files["default"],
|
125 |
},
|
126 |
),
|
127 |
-
|
128 |
-
|
|
|
129 |
# These kwargs will be passed to _generate_examples
|
130 |
gen_kwargs={
|
131 |
-
"filepath": files["
|
132 |
},
|
133 |
-
),
|
134 |
|
135 |
datasets.SplitGenerator(
|
136 |
-
name='
|
137 |
# These kwargs will be passed to _generate_examples
|
138 |
gen_kwargs={
|
139 |
-
"filepath": files["
|
140 |
},
|
141 |
-
),
|
142 |
|
|
|
143 |
]
|
144 |
|
145 |
def _generate_tables(
|
|
|
49 |
_URL = "https://huggingface.co/datasets/jglaser/binding_affinity/resolve/main/"
|
50 |
_data_dir = "data/"
|
51 |
_file_names = {'default': _data_dir+'all.parquet',
|
52 |
+
'no_kras': _data_dir+'all_nokras.parquet',
|
53 |
+
'cov': _data_dir+'cov.parquet'}
|
54 |
|
55 |
_URLs = {name: _URL+_file_names[name] for name in _file_names}
|
56 |
|
|
|
124 |
'filepath': files["default"],
|
125 |
},
|
126 |
),
|
127 |
+
|
128 |
+
datasets.SplitGenerator(
|
129 |
+
name='no_kras',
|
130 |
# These kwargs will be passed to _generate_examples
|
131 |
gen_kwargs={
|
132 |
+
"filepath": files["no_kras"],
|
133 |
},
|
|
|
134 |
|
135 |
datasets.SplitGenerator(
|
136 |
+
name='covalent',
|
137 |
# These kwargs will be passed to _generate_examples
|
138 |
gen_kwargs={
|
139 |
+
"filepath": files["cov"],
|
140 |
},
|
|
|
141 |
|
142 |
+
),
|
143 |
]
|
144 |
|
145 |
def _generate_tables(
|
combine_dbs.ipynb
CHANGED
@@ -617,7 +617,7 @@
|
|
617 |
},
|
618 |
{
|
619 |
"cell_type": "code",
|
620 |
-
"execution_count":
|
621 |
"id": "4ccf2ee5-d369-4c0e-bb91-792765d661bf",
|
622 |
"metadata": {},
|
623 |
"outputs": [],
|
@@ -627,7 +627,7 @@
|
|
627 |
},
|
628 |
{
|
629 |
"cell_type": "code",
|
630 |
-
"execution_count":
|
631 |
"id": "8a4bbb18-e62f-4774-ac6b-8a1be68204c1",
|
632 |
"metadata": {},
|
633 |
"outputs": [],
|
@@ -638,7 +638,7 @@
|
|
638 |
},
|
639 |
{
|
640 |
"cell_type": "code",
|
641 |
-
"execution_count":
|
642 |
"id": "d210fe56-a7eb-4adc-a77a-14c0c6d0034e",
|
643 |
"metadata": {},
|
644 |
"outputs": [
|
@@ -648,7 +648,7 @@
|
|
648 |
"2568079"
|
649 |
]
|
650 |
},
|
651 |
-
"execution_count":
|
652 |
"metadata": {},
|
653 |
"output_type": "execute_result"
|
654 |
}
|
@@ -659,7 +659,7 @@
|
|
659 |
},
|
660 |
{
|
661 |
"cell_type": "code",
|
662 |
-
"execution_count":
|
663 |
"id": "d12b365d-98bd-4b61-b836-1a08d2e55418",
|
664 |
"metadata": {},
|
665 |
"outputs": [],
|
@@ -670,7 +670,7 @@
|
|
670 |
},
|
671 |
{
|
672 |
"cell_type": "code",
|
673 |
-
"execution_count":
|
674 |
"id": "80c15210-1af3-436e-970b-f81fc596fb41",
|
675 |
"metadata": {},
|
676 |
"outputs": [],
|
@@ -680,7 +680,7 @@
|
|
680 |
},
|
681 |
{
|
682 |
"cell_type": "code",
|
683 |
-
"execution_count":
|
684 |
"id": "30c314b8-8fe7-48ae-a2b8-149de1471b0c",
|
685 |
"metadata": {},
|
686 |
"outputs": [
|
@@ -696,7 +696,7 @@
|
|
696 |
"dtype: object"
|
697 |
]
|
698 |
},
|
699 |
-
"execution_count":
|
700 |
"metadata": {},
|
701 |
"output_type": "execute_result"
|
702 |
}
|
@@ -707,7 +707,7 @@
|
|
707 |
},
|
708 |
{
|
709 |
"cell_type": "code",
|
710 |
-
"execution_count":
|
711 |
"id": "70a0a820-4d0c-4472-af96-9c301c0ab204",
|
712 |
"metadata": {},
|
713 |
"outputs": [],
|
@@ -717,7 +717,7 @@
|
|
717 |
},
|
718 |
{
|
719 |
"cell_type": "code",
|
720 |
-
"execution_count":
|
721 |
"id": "13d092fa-5625-40d0-b7ec-e3405ea20279",
|
722 |
"metadata": {},
|
723 |
"outputs": [
|
@@ -934,7 +934,7 @@
|
|
934 |
"[2568079 rows x 9 columns]"
|
935 |
]
|
936 |
},
|
937 |
-
"execution_count":
|
938 |
"metadata": {},
|
939 |
"output_type": "execute_result"
|
940 |
}
|
@@ -945,7 +945,7 @@
|
|
945 |
},
|
946 |
{
|
947 |
"cell_type": "code",
|
948 |
-
"execution_count":
|
949 |
"id": "30f7fff7-3cfe-41c8-97c9-666f3e256222",
|
950 |
"metadata": {},
|
951 |
"outputs": [
|
@@ -955,7 +955,7 @@
|
|
955 |
"Index(['seq', 'smiles', 'affinity_uM', 0, 1, 2, 3, 4, 5], dtype='object')"
|
956 |
]
|
957 |
},
|
958 |
-
"execution_count":
|
959 |
"metadata": {},
|
960 |
"output_type": "execute_result"
|
961 |
}
|
@@ -966,7 +966,7 @@
|
|
966 |
},
|
967 |
{
|
968 |
"cell_type": "code",
|
969 |
-
"execution_count":
|
970 |
"id": "16d2b26e-984f-4c71-af19-a3e711ed9ca2",
|
971 |
"metadata": {},
|
972 |
"outputs": [],
|
@@ -976,7 +976,7 @@
|
|
976 |
},
|
977 |
{
|
978 |
"cell_type": "code",
|
979 |
-
"execution_count":
|
980 |
"id": "27fa2150-8152-444b-ba5b-24bea39fc098",
|
981 |
"metadata": {},
|
982 |
"outputs": [
|
@@ -986,7 +986,7 @@
|
|
986 |
"Index(['smiles', 'affinity_uM'], dtype='object')"
|
987 |
]
|
988 |
},
|
989 |
-
"execution_count":
|
990 |
"metadata": {},
|
991 |
"output_type": "execute_result"
|
992 |
}
|
@@ -997,7 +997,7 @@
|
|
997 |
},
|
998 |
{
|
999 |
"cell_type": "code",
|
1000 |
-
"execution_count":
|
1001 |
"id": "89edacbc-52f3-4a76-90b0-95273f5e53b3",
|
1002 |
"metadata": {},
|
1003 |
"outputs": [],
|
@@ -1250,7 +1250,7 @@
|
|
1250 |
},
|
1251 |
{
|
1252 |
"cell_type": "code",
|
1253 |
-
"execution_count":
|
1254 |
"id": "8f949038-d07d-4d3a-a47e-b825cc9018ca",
|
1255 |
"metadata": {},
|
1256 |
"outputs": [],
|
@@ -1260,7 +1260,7 @@
|
|
1260 |
},
|
1261 |
{
|
1262 |
"cell_type": "code",
|
1263 |
-
"execution_count":
|
1264 |
"id": "0c027988-0b44-4010-ad61-7d70eead1654",
|
1265 |
"metadata": {},
|
1266 |
"outputs": [],
|
@@ -1270,7 +1270,7 @@
|
|
1270 |
},
|
1271 |
{
|
1272 |
"cell_type": "code",
|
1273 |
-
"execution_count":
|
1274 |
"id": "6aeba020-b6ff-4633-902e-4df74463eb2f",
|
1275 |
"metadata": {},
|
1276 |
"outputs": [],
|
@@ -1280,7 +1280,7 @@
|
|
1280 |
},
|
1281 |
{
|
1282 |
"cell_type": "code",
|
1283 |
-
"execution_count":
|
1284 |
"id": "91196eee-5fd0-4aa4-927a-5c1a3f436ac8",
|
1285 |
"metadata": {},
|
1286 |
"outputs": [
|
@@ -1290,7 +1290,7 @@
|
|
1290 |
"(array([6.51286529]), array([2.4379995]))"
|
1291 |
]
|
1292 |
},
|
1293 |
-
"execution_count":
|
1294 |
"metadata": {},
|
1295 |
"output_type": "execute_result"
|
1296 |
}
|
@@ -1301,7 +1301,7 @@
|
|
1301 |
},
|
1302 |
{
|
1303 |
"cell_type": "code",
|
1304 |
-
"execution_count":
|
1305 |
"id": "56269dcb-e691-4759-949d-7bfdd02f5fd4",
|
1306 |
"metadata": {},
|
1307 |
"outputs": [],
|
@@ -1311,7 +1311,7 @@
|
|
1311 |
},
|
1312 |
{
|
1313 |
"cell_type": "code",
|
1314 |
-
"execution_count":
|
1315 |
"id": "c6c64066-4032-4247-a8b9-00388176cc7b",
|
1316 |
"metadata": {},
|
1317 |
"outputs": [],
|
@@ -1322,7 +1322,7 @@
|
|
1322 |
},
|
1323 |
{
|
1324 |
"cell_type": "code",
|
1325 |
-
"execution_count":
|
1326 |
"id": "469cf0dd-7b87-4245-973c-2a445e1fcca9",
|
1327 |
"metadata": {},
|
1328 |
"outputs": [
|
@@ -1334,7 +1334,7 @@
|
|
1334 |
" dtype='object')"
|
1335 |
]
|
1336 |
},
|
1337 |
-
"execution_count":
|
1338 |
"metadata": {},
|
1339 |
"output_type": "execute_result"
|
1340 |
}
|
@@ -1345,7 +1345,7 @@
|
|
1345 |
},
|
1346 |
{
|
1347 |
"cell_type": "code",
|
1348 |
-
"execution_count":
|
1349 |
"id": "d91c0d91-474c-4ab2-9a5e-3b7861f7a832",
|
1350 |
"metadata": {},
|
1351 |
"outputs": [
|
@@ -1371,7 +1371,7 @@
|
|
1371 |
},
|
1372 |
{
|
1373 |
"cell_type": "code",
|
1374 |
-
"execution_count":
|
1375 |
"id": "0e895ef5-1812-46c7-a4c2-dd6619b49157",
|
1376 |
"metadata": {},
|
1377 |
"outputs": [
|
@@ -1381,7 +1381,7 @@
|
|
1381 |
"1927202"
|
1382 |
]
|
1383 |
},
|
1384 |
-
"execution_count":
|
1385 |
"metadata": {},
|
1386 |
"output_type": "execute_result"
|
1387 |
}
|
@@ -1392,36 +1392,8 @@
|
|
1392 |
},
|
1393 |
{
|
1394 |
"cell_type": "code",
|
1395 |
-
"execution_count":
|
1396 |
-
"id": "
|
1397 |
-
"metadata": {},
|
1398 |
-
"outputs": [
|
1399 |
-
{
|
1400 |
-
"data": {
|
1401 |
-
"text/plain": [
|
1402 |
-
"{'with_mean': True,\n",
|
1403 |
-
" 'with_std': True,\n",
|
1404 |
-
" 'copy': True,\n",
|
1405 |
-
" 'n_features_in_': 1,\n",
|
1406 |
-
" 'n_samples_seen_': 1927202,\n",
|
1407 |
-
" 'mean_': array([6.51286529]),\n",
|
1408 |
-
" 'var_': array([2.4379995]),\n",
|
1409 |
-
" 'scale_': array([1.56140946])}"
|
1410 |
-
]
|
1411 |
-
},
|
1412 |
-
"execution_count": 25,
|
1413 |
-
"metadata": {},
|
1414 |
-
"output_type": "execute_result"
|
1415 |
-
}
|
1416 |
-
],
|
1417 |
-
"source": [
|
1418 |
-
"scaler.__dict__"
|
1419 |
-
]
|
1420 |
-
},
|
1421 |
-
{
|
1422 |
-
"cell_type": "code",
|
1423 |
-
"execution_count": 26,
|
1424 |
-
"id": "ec0ef8e2-c0e9-4c9b-bf3a-c98cc3889475",
|
1425 |
"metadata": {},
|
1426 |
"outputs": [
|
1427 |
{
|
@@ -1437,7 +1409,7 @@
|
|
1437 |
" 'scale_': array([1.56140946])}"
|
1438 |
]
|
1439 |
},
|
1440 |
-
"execution_count":
|
1441 |
"metadata": {},
|
1442 |
"output_type": "execute_result"
|
1443 |
}
|
@@ -1478,7 +1450,7 @@
|
|
1478 |
},
|
1479 |
{
|
1480 |
"cell_type": "code",
|
1481 |
-
"execution_count":
|
1482 |
"id": "8dec95dc-a014-4d39-ae51-8de981173573",
|
1483 |
"metadata": {},
|
1484 |
"outputs": [],
|
@@ -1489,7 +1461,7 @@
|
|
1489 |
},
|
1490 |
{
|
1491 |
"cell_type": "code",
|
1492 |
-
"execution_count":
|
1493 |
"id": "3f90eadd-d7e4-4104-961f-adaf5437e24b",
|
1494 |
"metadata": {},
|
1495 |
"outputs": [],
|
@@ -1499,7 +1471,7 @@
|
|
1499 |
},
|
1500 |
{
|
1501 |
"cell_type": "code",
|
1502 |
-
"execution_count":
|
1503 |
"id": "f5f5335a-8f28-4058-8647-fcc8f7d2f841",
|
1504 |
"metadata": {},
|
1505 |
"outputs": [
|
@@ -1509,7 +1481,7 @@
|
|
1509 |
"1926799"
|
1510 |
]
|
1511 |
},
|
1512 |
-
"execution_count":
|
1513 |
"metadata": {},
|
1514 |
"output_type": "execute_result"
|
1515 |
}
|
@@ -1528,10 +1500,75 @@
|
|
1528 |
"df_nokras.to_parquet('data/all_nokras.parquet')"
|
1529 |
]
|
1530 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1531 |
{
|
1532 |
"cell_type": "code",
|
1533 |
"execution_count": null,
|
1534 |
-
"id": "
|
1535 |
"metadata": {},
|
1536 |
"outputs": [],
|
1537 |
"source": []
|
@@ -1539,7 +1576,7 @@
|
|
1539 |
],
|
1540 |
"metadata": {
|
1541 |
"kernelspec": {
|
1542 |
-
"display_name": "Python 3
|
1543 |
"language": "python",
|
1544 |
"name": "python3"
|
1545 |
},
|
@@ -1553,7 +1590,7 @@
|
|
1553 |
"name": "python",
|
1554 |
"nbconvert_exporter": "python",
|
1555 |
"pygments_lexer": "ipython3",
|
1556 |
-
"version": "3.9.
|
1557 |
}
|
1558 |
},
|
1559 |
"nbformat": 4,
|
|
|
617 |
},
|
618 |
{
|
619 |
"cell_type": "code",
|
620 |
+
"execution_count": 7,
|
621 |
"id": "4ccf2ee5-d369-4c0e-bb91-792765d661bf",
|
622 |
"metadata": {},
|
623 |
"outputs": [],
|
|
|
627 |
},
|
628 |
{
|
629 |
"cell_type": "code",
|
630 |
+
"execution_count": 2,
|
631 |
"id": "8a4bbb18-e62f-4774-ac6b-8a1be68204c1",
|
632 |
"metadata": {},
|
633 |
"outputs": [],
|
|
|
638 |
},
|
639 |
{
|
640 |
"cell_type": "code",
|
641 |
+
"execution_count": 3,
|
642 |
"id": "d210fe56-a7eb-4adc-a77a-14c0c6d0034e",
|
643 |
"metadata": {},
|
644 |
"outputs": [
|
|
|
648 |
"2568079"
|
649 |
]
|
650 |
},
|
651 |
+
"execution_count": 3,
|
652 |
"metadata": {},
|
653 |
"output_type": "execute_result"
|
654 |
}
|
|
|
659 |
},
|
660 |
{
|
661 |
"cell_type": "code",
|
662 |
+
"execution_count": 4,
|
663 |
"id": "d12b365d-98bd-4b61-b836-1a08d2e55418",
|
664 |
"metadata": {},
|
665 |
"outputs": [],
|
|
|
670 |
},
|
671 |
{
|
672 |
"cell_type": "code",
|
673 |
+
"execution_count": 8,
|
674 |
"id": "80c15210-1af3-436e-970b-f81fc596fb41",
|
675 |
"metadata": {},
|
676 |
"outputs": [],
|
|
|
680 |
},
|
681 |
{
|
682 |
"cell_type": "code",
|
683 |
+
"execution_count": 9,
|
684 |
"id": "30c314b8-8fe7-48ae-a2b8-149de1471b0c",
|
685 |
"metadata": {},
|
686 |
"outputs": [
|
|
|
696 |
"dtype: object"
|
697 |
]
|
698 |
},
|
699 |
+
"execution_count": 9,
|
700 |
"metadata": {},
|
701 |
"output_type": "execute_result"
|
702 |
}
|
|
|
707 |
},
|
708 |
{
|
709 |
"cell_type": "code",
|
710 |
+
"execution_count": 10,
|
711 |
"id": "70a0a820-4d0c-4472-af96-9c301c0ab204",
|
712 |
"metadata": {},
|
713 |
"outputs": [],
|
|
|
717 |
},
|
718 |
{
|
719 |
"cell_type": "code",
|
720 |
+
"execution_count": 11,
|
721 |
"id": "13d092fa-5625-40d0-b7ec-e3405ea20279",
|
722 |
"metadata": {},
|
723 |
"outputs": [
|
|
|
934 |
"[2568079 rows x 9 columns]"
|
935 |
]
|
936 |
},
|
937 |
+
"execution_count": 11,
|
938 |
"metadata": {},
|
939 |
"output_type": "execute_result"
|
940 |
}
|
|
|
945 |
},
|
946 |
{
|
947 |
"cell_type": "code",
|
948 |
+
"execution_count": 12,
|
949 |
"id": "30f7fff7-3cfe-41c8-97c9-666f3e256222",
|
950 |
"metadata": {},
|
951 |
"outputs": [
|
|
|
955 |
"Index(['seq', 'smiles', 'affinity_uM', 0, 1, 2, 3, 4, 5], dtype='object')"
|
956 |
]
|
957 |
},
|
958 |
+
"execution_count": 12,
|
959 |
"metadata": {},
|
960 |
"output_type": "execute_result"
|
961 |
}
|
|
|
966 |
},
|
967 |
{
|
968 |
"cell_type": "code",
|
969 |
+
"execution_count": 13,
|
970 |
"id": "16d2b26e-984f-4c71-af19-a3e711ed9ca2",
|
971 |
"metadata": {},
|
972 |
"outputs": [],
|
|
|
976 |
},
|
977 |
{
|
978 |
"cell_type": "code",
|
979 |
+
"execution_count": 14,
|
980 |
"id": "27fa2150-8152-444b-ba5b-24bea39fc098",
|
981 |
"metadata": {},
|
982 |
"outputs": [
|
|
|
986 |
"Index(['smiles', 'affinity_uM'], dtype='object')"
|
987 |
]
|
988 |
},
|
989 |
+
"execution_count": 14,
|
990 |
"metadata": {},
|
991 |
"output_type": "execute_result"
|
992 |
}
|
|
|
997 |
},
|
998 |
{
|
999 |
"cell_type": "code",
|
1000 |
+
"execution_count": 15,
|
1001 |
"id": "89edacbc-52f3-4a76-90b0-95273f5e53b3",
|
1002 |
"metadata": {},
|
1003 |
"outputs": [],
|
|
|
1250 |
},
|
1251 |
{
|
1252 |
"cell_type": "code",
|
1253 |
+
"execution_count": 23,
|
1254 |
"id": "8f949038-d07d-4d3a-a47e-b825cc9018ca",
|
1255 |
"metadata": {},
|
1256 |
"outputs": [],
|
|
|
1260 |
},
|
1261 |
{
|
1262 |
"cell_type": "code",
|
1263 |
+
"execution_count": 24,
|
1264 |
"id": "0c027988-0b44-4010-ad61-7d70eead1654",
|
1265 |
"metadata": {},
|
1266 |
"outputs": [],
|
|
|
1270 |
},
|
1271 |
{
|
1272 |
"cell_type": "code",
|
1273 |
+
"execution_count": 25,
|
1274 |
"id": "6aeba020-b6ff-4633-902e-4df74463eb2f",
|
1275 |
"metadata": {},
|
1276 |
"outputs": [],
|
|
|
1280 |
},
|
1281 |
{
|
1282 |
"cell_type": "code",
|
1283 |
+
"execution_count": 26,
|
1284 |
"id": "91196eee-5fd0-4aa4-927a-5c1a3f436ac8",
|
1285 |
"metadata": {},
|
1286 |
"outputs": [
|
|
|
1290 |
"(array([6.51286529]), array([2.4379995]))"
|
1291 |
]
|
1292 |
},
|
1293 |
+
"execution_count": 26,
|
1294 |
"metadata": {},
|
1295 |
"output_type": "execute_result"
|
1296 |
}
|
|
|
1301 |
},
|
1302 |
{
|
1303 |
"cell_type": "code",
|
1304 |
+
"execution_count": 28,
|
1305 |
"id": "56269dcb-e691-4759-949d-7bfdd02f5fd4",
|
1306 |
"metadata": {},
|
1307 |
"outputs": [],
|
|
|
1311 |
},
|
1312 |
{
|
1313 |
"cell_type": "code",
|
1314 |
+
"execution_count": 50,
|
1315 |
"id": "c6c64066-4032-4247-a8b9-00388176cc7b",
|
1316 |
"metadata": {},
|
1317 |
"outputs": [],
|
|
|
1322 |
},
|
1323 |
{
|
1324 |
"cell_type": "code",
|
1325 |
+
"execution_count": 30,
|
1326 |
"id": "469cf0dd-7b87-4245-973c-2a445e1fcca9",
|
1327 |
"metadata": {},
|
1328 |
"outputs": [
|
|
|
1334 |
" dtype='object')"
|
1335 |
]
|
1336 |
},
|
1337 |
+
"execution_count": 30,
|
1338 |
"metadata": {},
|
1339 |
"output_type": "execute_result"
|
1340 |
}
|
|
|
1345 |
},
|
1346 |
{
|
1347 |
"cell_type": "code",
|
1348 |
+
"execution_count": 31,
|
1349 |
"id": "d91c0d91-474c-4ab2-9a5e-3b7861f7a832",
|
1350 |
"metadata": {},
|
1351 |
"outputs": [
|
|
|
1371 |
},
|
1372 |
{
|
1373 |
"cell_type": "code",
|
1374 |
+
"execution_count": 32,
|
1375 |
"id": "0e895ef5-1812-46c7-a4c2-dd6619b49157",
|
1376 |
"metadata": {},
|
1377 |
"outputs": [
|
|
|
1381 |
"1927202"
|
1382 |
]
|
1383 |
},
|
1384 |
+
"execution_count": 32,
|
1385 |
"metadata": {},
|
1386 |
"output_type": "execute_result"
|
1387 |
}
|
|
|
1392 |
},
|
1393 |
{
|
1394 |
"cell_type": "code",
|
1395 |
+
"execution_count": 34,
|
1396 |
+
"id": "3af855d3-a943-4574-985c-540d3f6b6f80",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1397 |
"metadata": {},
|
1398 |
"outputs": [
|
1399 |
{
|
|
|
1409 |
" 'scale_': array([1.56140946])}"
|
1410 |
]
|
1411 |
},
|
1412 |
+
"execution_count": 34,
|
1413 |
"metadata": {},
|
1414 |
"output_type": "execute_result"
|
1415 |
}
|
|
|
1450 |
},
|
1451 |
{
|
1452 |
"cell_type": "code",
|
1453 |
+
"execution_count": 35,
|
1454 |
"id": "8dec95dc-a014-4d39-ae51-8de981173573",
|
1455 |
"metadata": {},
|
1456 |
"outputs": [],
|
|
|
1461 |
},
|
1462 |
{
|
1463 |
"cell_type": "code",
|
1464 |
+
"execution_count": 36,
|
1465 |
"id": "3f90eadd-d7e4-4104-961f-adaf5437e24b",
|
1466 |
"metadata": {},
|
1467 |
"outputs": [],
|
|
|
1471 |
},
|
1472 |
{
|
1473 |
"cell_type": "code",
|
1474 |
+
"execution_count": 37,
|
1475 |
"id": "f5f5335a-8f28-4058-8647-fcc8f7d2f841",
|
1476 |
"metadata": {},
|
1477 |
"outputs": [
|
|
|
1481 |
"1926799"
|
1482 |
]
|
1483 |
},
|
1484 |
+
"execution_count": 37,
|
1485 |
"metadata": {},
|
1486 |
"output_type": "execute_result"
|
1487 |
}
|
|
|
1500 |
"df_nokras.to_parquet('data/all_nokras.parquet')"
|
1501 |
]
|
1502 |
},
|
1503 |
+
{
|
1504 |
+
"cell_type": "markdown",
|
1505 |
+
"id": "4838f164-aed7-4f2d-a047-df647dfb8ea6",
|
1506 |
+
"metadata": {},
|
1507 |
+
"source": [
|
1508 |
+
"**with covalently binding ligands only**"
|
1509 |
+
]
|
1510 |
+
},
|
1511 |
+
{
|
1512 |
+
"cell_type": "code",
|
1513 |
+
"execution_count": 40,
|
1514 |
+
"id": "c0d250a3-5680-446c-9c98-7d6623643304",
|
1515 |
+
"metadata": {},
|
1516 |
+
"outputs": [],
|
1517 |
+
"source": [
|
1518 |
+
"from rdkit.Chem import SDMolSupplier\n",
|
1519 |
+
"suppl = SDMolSupplier('data/CovPDB_ligands.sdf')\n"
|
1520 |
+
]
|
1521 |
+
},
|
1522 |
+
{
|
1523 |
+
"cell_type": "code",
|
1524 |
+
"execution_count": 44,
|
1525 |
+
"id": "0c7c0b26-1f2a-4b80-8117-f1e02719aac9",
|
1526 |
+
"metadata": {},
|
1527 |
+
"outputs": [
|
1528 |
+
{
|
1529 |
+
"name": "stderr",
|
1530 |
+
"output_type": "stream",
|
1531 |
+
"text": [
|
1532 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n",
|
1533 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n",
|
1534 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n",
|
1535 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n",
|
1536 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n",
|
1537 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n",
|
1538 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n",
|
1539 |
+
"RDKit WARNING: [19:54:53] Warning: molecule is tagged as 3D, but all Z coords are zero\n"
|
1540 |
+
]
|
1541 |
+
}
|
1542 |
+
],
|
1543 |
+
"source": [
|
1544 |
+
"from rdkit import Chem\n",
|
1545 |
+
"cov_smiles = [Chem.MolToSmiles(m) for m in suppl]"
|
1546 |
+
]
|
1547 |
+
},
|
1548 |
+
{
|
1549 |
+
"cell_type": "code",
|
1550 |
+
"execution_count": 63,
|
1551 |
+
"id": "258f593c-1cba-45cb-936e-8c1360075926",
|
1552 |
+
"metadata": {},
|
1553 |
+
"outputs": [],
|
1554 |
+
"source": [
|
1555 |
+
"df_cov = df[df['smiles'].isin(cov_smiles)]"
|
1556 |
+
]
|
1557 |
+
},
|
1558 |
+
{
|
1559 |
+
"cell_type": "code",
|
1560 |
+
"execution_count": 66,
|
1561 |
+
"id": "ee3fa0bc-9ad3-4ea7-9393-cbc7504f634c",
|
1562 |
+
"metadata": {},
|
1563 |
+
"outputs": [],
|
1564 |
+
"source": [
|
1565 |
+
"df_cov.reset_index(drop=True).to_parquet('data/cov.parquet')"
|
1566 |
+
]
|
1567 |
+
},
|
1568 |
{
|
1569 |
"cell_type": "code",
|
1570 |
"execution_count": null,
|
1571 |
+
"id": "b068dbaa-6d77-402d-ab9b-fb4f266dc854",
|
1572 |
"metadata": {},
|
1573 |
"outputs": [],
|
1574 |
"source": []
|
|
|
1576 |
],
|
1577 |
"metadata": {
|
1578 |
"kernelspec": {
|
1579 |
+
"display_name": "Python 3",
|
1580 |
"language": "python",
|
1581 |
"name": "python3"
|
1582 |
},
|
|
|
1590 |
"name": "python",
|
1591 |
"nbconvert_exporter": "python",
|
1592 |
"pygments_lexer": "ipython3",
|
1593 |
+
"version": "3.9.4"
|
1594 |
}
|
1595 |
},
|
1596 |
"nbformat": 4,
|
data/cov.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:17b5e84f7057d6716b9e1d01bbeb207d14e0f067368d964f8fd2d232b11f1e7e
|
3 |
+
size 98027
|