{ "cells": [ { "cell_type": "code", "execution_count": 2, "id": "95bd761a-fe51-4a8e-bc70-1365260ba5f8", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 84, "id": "b0859483-5e19-4280-9f53-0d00a6f22d34", "metadata": {}, "outputs": [], "source": [ "df_pdbbind = pd.read_parquet('data/pdbbind.parquet')\n", "df_pdbbind = df_pdbbind[['seq','smiles','affinity_uM']]" ] }, { "cell_type": "code", "execution_count": 85, "id": "f30732b7-7444-47ad-84e7-566e7a6f2f8e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
seqsmilesaffinity_uM
0MTVPDRSEIAGKWYVVALASNTEFFLREKDKMKMAMARISFLGEDE...CCCCCCCCCCCCCCCCCCC[C-](=O)=O0.026
1APQTITELCSEYRNTQIYTINDKILSYTESMAGKREMVIITFKSGE...OC[C@H]1O[C@H](Oc2cccc(c2)N(=O)=O)[C@@H]([C@H]...500.000
2VETFAFQAEIAQLMSLIINTFYSNKEIFLRELISNSSDALDKIRYE...COc1ccc(cc1)c1c(onc1c1cc(C(C)C)c(cc1O)O)NC(=O)...0.023
3AAPFDKSKNVAQSIDQLIGQTPALYLNKLNNTKAKVVLKMECENPM...OC[C@@H](C(=O)N[C@@H]([C@H](CC)C)[C-](=O)=O)NC...6.430
4GSFVEMVDNLRGKSGQGYYVEMTVGSPPQTLNILVDTGSSNFAVGA...O=[C-](=O)[C@@H](NC1=NC(C)(C)Cc2c1cccc2)Cc1ccccc127.200
\n", "
" ], "text/plain": [ " seq \\\n", "0 MTVPDRSEIAGKWYVVALASNTEFFLREKDKMKMAMARISFLGEDE... \n", "1 APQTITELCSEYRNTQIYTINDKILSYTESMAGKREMVIITFKSGE... \n", "2 VETFAFQAEIAQLMSLIINTFYSNKEIFLRELISNSSDALDKIRYE... \n", "3 AAPFDKSKNVAQSIDQLIGQTPALYLNKLNNTKAKVVLKMECENPM... \n", "4 GSFVEMVDNLRGKSGQGYYVEMTVGSPPQTLNILVDTGSSNFAVGA... \n", "\n", " smiles affinity_uM \n", "0 CCCCCCCCCCCCCCCCCCC[C-](=O)=O 0.026 \n", "1 OC[C@H]1O[C@H](Oc2cccc(c2)N(=O)=O)[C@@H]([C@H]... 500.000 \n", "2 COc1ccc(cc1)c1c(onc1c1cc(C(C)C)c(cc1O)O)NC(=O)... 0.023 \n", "3 OC[C@@H](C(=O)N[C@@H]([C@H](CC)C)[C-](=O)=O)NC... 6.430 \n", "4 O=[C-](=O)[C@@H](NC1=NC(C)(C)Cc2c1cccc2)Cc1ccccc1 27.200 " ] }, "execution_count": 85, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_pdbbind.head()" ] }, { "cell_type": "code", "execution_count": 119, "id": "2787b9fd-3d6f-4ae3-a3ad-d3539b72782b", "metadata": {}, "outputs": [], "source": [ "from rdkit import Chem\n", "from rdkit.Chem import MACCSkeys\n", "import numpy as np\n", "\n", "def get_maccs(smi):\n", " try:\n", " mol = Chem.MolFromSmiles(smi)\n", " arr = np.packbits([0 if c=='0' else 1 for c in MACCSkeys.GenMACCSKeys(mol).ToBitString()])\n", " return np.pad(arr,(0,3)).view(np.uint32)\n", " except Exception:\n", " pass" ] }, { "cell_type": "code", "execution_count": 120, "id": "84f522d5-aee8-4d0f-9186-2d90bfc62342", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
seqsmilesaffinity_uM
0PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...COc1cc2c(Nc3ccc(Br)cc3F)ncnc2cc1OCC1CCN(C)CC10.00024
1PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(C\\C=C\\c2cn...0.00025
2PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(CC2CC2)C(=...0.00041
3PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...OCCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@...0.00080
4PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...OCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@H...0.00099
............
4453MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE...CC(C)C[C@H](NC(=O)N1CCC(CC1)C(=O)Nc1ccc(cc1)-c...0.00940
4454MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE...CC(C)C[C@H](NC(=O)[C@H](Cc1ccccc1)NC(=O)c1cncc...0.01100
4455MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE...CC(C)C[C@H](NC(=O)N1CCCC(C1)C(=O)Nc1cnccn1)C(=...0.35500
4456MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE...COc1ccc(NC(=O)N2CCC(CC2)C(=O)N[C@@H](CC(C)C)C(...0.01700
4457MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE...CC(C)C[C@H](NC(=O)C1CCN(CC1)C(=O)Nc1cnccn1)C(=...0.07600
\n", "

2389700 rows × 3 columns

\n", "
" ], "text/plain": [ " seq \\\n", "0 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "1 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "2 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "3 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "4 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "... ... \n", "4453 MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE... \n", "4454 MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE... \n", "4455 MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE... \n", "4456 MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE... \n", "4457 MSYDRAITVFSPDGHLFQVEYAQEAVKKGSTAVGVRGRDIVVLGVE... \n", "\n", " smiles affinity_uM \n", "0 COc1cc2c(Nc3ccc(Br)cc3F)ncnc2cc1OCC1CCN(C)CC1 0.00024 \n", "1 O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(C\\C=C\\c2cn... 0.00025 \n", "2 O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(CC2CC2)C(=... 0.00041 \n", "3 OCCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@... 0.00080 \n", "4 OCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@H... 0.00099 \n", "... ... ... \n", "4453 CC(C)C[C@H](NC(=O)N1CCC(CC1)C(=O)Nc1ccc(cc1)-c... 0.00940 \n", "4454 CC(C)C[C@H](NC(=O)[C@H](Cc1ccccc1)NC(=O)c1cncc... 0.01100 \n", "4455 CC(C)C[C@H](NC(=O)N1CCCC(C1)C(=O)Nc1cnccn1)C(=... 0.35500 \n", "4456 COc1ccc(NC(=O)N2CCC(CC2)C(=O)N[C@@H](CC(C)C)C(... 0.01700 \n", "4457 CC(C)C[C@H](NC(=O)C1CCN(CC1)C(=O)Nc1cnccn1)C(=... 0.07600 \n", "\n", "[2389700 rows x 3 columns]" ] }, "execution_count": 120, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_bindingdb" ] }, { "cell_type": "code", "execution_count": 88, "id": "d1abe1c8-ac66-4289-8964-367a5b18528d", "metadata": {}, "outputs": [], "source": [ "df_bindingdb = pd.read_parquet('data/bindingdb.parquet')\n", "df_bindingdb = df_bindingdb[['seq','Ligand SMILES','affinity_uM']].rename(columns={'Ligand SMILES': 'smiles'})" ] }, { "cell_type": "code", "execution_count": 89, "id": "988bab9c-5147-44e2-92ef-902eaf3c5a90", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
seqsmilesaffinity_uM
0PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...COc1cc2c(Nc3ccc(Br)cc3F)ncnc2cc1OCC1CCN(C)CC10.00024
1PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(C\\C=C\\c2cn...0.00025
2PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(CC2CC2)C(=...0.00041
3PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...OCCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@...0.00080
4PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM...OCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@H...0.00099
\n", "
" ], "text/plain": [ " seq \\\n", "0 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "1 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "2 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "3 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "4 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMSLPGRWKPKM... \n", "\n", " smiles affinity_uM \n", "0 COc1cc2c(Nc3ccc(Br)cc3F)ncnc2cc1OCC1CCN(C)CC1 0.00024 \n", "1 O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(C\\C=C\\c2cn... 0.00025 \n", "2 O[C@@H]1[C@@H](O)[C@@H](Cc2ccccc2)N(CC2CC2)C(=... 0.00041 \n", "3 OCCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@... 0.00080 \n", "4 OCCCCCN1[C@H](Cc2ccccc2)[C@H](O)[C@@H](O)[C@@H... 0.00099 " ] }, "execution_count": 89, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_bindingdb.head()" ] }, { "cell_type": "code", "execution_count": 93, "id": "d7bfee2a-c4e6-48c9-b0c6-52f6a69c7453", "metadata": {}, "outputs": [], "source": [ "df_moad = pd.read_parquet('data/moad.parquet')\n", "df_moad = df_moad[['seq','smiles','affinity_uM']]" ] }, { "cell_type": "code", "execution_count": 94, "id": "25553199-1715-40fb-9260-427bdd6c3706", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
seqsmilesaffinity_uM
0NYIVPGEYRVAEGEIEINAGREKTTIRVSNTGDRPIQVGSHIHFVE...NP(=O)(N)O0.000620
2NYIVPGEYRVAEGEIEINAGREKTTIRVSNTGDRPIQVGSHIHFVE...CC(=O)NO2.600000
7MEGMRRPTPTVYVGRVPIGGAHPIAVQSMTNTPTRDVEATTAQVLE...C#CCCOP(=O)(O)OP(=O)(O)O0.580000
16MEGMRRPTPTVYVGRVPIGGAHPIAVQSMTNTPTRDVEATTAQVLE...C#CCOP(=O)(O)OP(=O)(O)O0.770000
17MTDMSIKFELIDVPIPQGTNVIIGQAHFIKTVEDLYEALVTSVPGV...c1nc(c2c(n1)n(cn2)[C@H]3[C@@H]([C@@H]([C@H](O3...15.000000
............
51900MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...None127.226463
51901MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...None127.226463
51902MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...None169.204738
51903MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...None169.204738
51904MGSSHHHHHHSSGLVPRGSHMASNPSLIRSESWQVYEGNEANLLDG...None169.204738
\n", "

25425 rows × 3 columns

\n", "
" ], "text/plain": [ " 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", " smiles affinity_uM \n", "0 NP(=O)(N)O 0.000620 \n", "2 CC(=O)NO 2.600000 \n", "7 C#CCCOP(=O)(O)OP(=O)(O)O 0.580000 \n", "16 C#CCOP(=O)(O)OP(=O)(O)O 0.770000 \n", "17 c1nc(c2c(n1)n(cn2)[C@H]3[C@@H]([C@@H]([C@H](O3... 15.000000 \n", "... ... ... \n", "51900 None 127.226463 \n", "51901 None 127.226463 \n", "51902 None 169.204738 \n", "51903 None 169.204738 \n", "51904 None 169.204738 \n", "\n", "[25425 rows x 3 columns]" ] }, "execution_count": 94, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_moad" ] }, { "cell_type": "code", "execution_count": 97, "id": "b2c936bc-cdc8-4bc1-b92d-f8755fd65f0a", "metadata": {}, "outputs": [], "source": [ "df_biolip = pd.read_parquet('data/biolip.parquet')\n", "df_biolip = df_biolip[['seq','smiles','affinity_uM']]" ] }, { "cell_type": "code", "execution_count": 98, "id": "cee93018-601d-458b-af44-bd978da7a2bc", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
seqsmilesaffinity_uM
38PYTVVYFPVRGRCAALRMLLADQGQSWKEEVVTVETWQEGSLKASC...CC[C@H](C(=O)c1ccc(c(c1Cl)Cl)OCC(=O)O)C1.500
43MPPYTVVYFPVRGRCAALRMLLADQGQSWKEEVVTVETWQEGSLKA...OC(=O)c1cc(/N=N/c2ccc(cc2)S(=O)(=O)Nc2ccccn2)c...24.000
53EKKSINECDLKGKKVLIRVDFNVPVKNGKITNDYRIRSALPTLKKV...O[C@@H]1[C@@H](CO[P@](=O)(O[P@@](=O)(C(CCCC(P(...NaN
54MPPYTVVYFPVRGRCAALRMLLADQGQSWKEEVVTVETWQEGSLKA...CCCCCCSC[C@@H](C(=O)NCC(=O)O)NC(=O)CC[C@@H](C(...10.000
55MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSEL...c1ccccc1175.000
............
105118PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMNLPGRWKPKM...O[C@@H]([C@H](Cc1ccccc1)NC(=O)[C@H](C(C)C)NC(=...NaN
105119PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMNLPGRWKPKM...O[C@@H]([C@H](Cc1ccccc1)NC(=O)[C@H](C(C)C)NC(=...NaN
105124SKVVVPAQGKKITLQNGKLNVPENPIIPYIEGDGIGVDVTPAMLKV...O[C@@H]1[C@@H](COP(=O)(O)O)O[C@H]([C@@H]1OP(=O...125.000
105133ANIVGGIEYSINNASLCSVGFSVTRGATKGFVTAGHCGTVNATARI...CC(C[C@@H](B(O)O)NC(=O)[C@@H]1CCCN1C(=O)[C@@H]...NaN
105138KFPRVKNWELGSITYDTLCAQSQQDGPCTPRRCLGSLVLPRKLQTR...CC[Se]C(=N)N0.039
\n", "

13645 rows × 3 columns

\n", "
" ], "text/plain": [ " seq \\\n", "38 PYTVVYFPVRGRCAALRMLLADQGQSWKEEVVTVETWQEGSLKASC... \n", "43 MPPYTVVYFPVRGRCAALRMLLADQGQSWKEEVVTVETWQEGSLKA... \n", "53 EKKSINECDLKGKKVLIRVDFNVPVKNGKITNDYRIRSALPTLKKV... \n", "54 MPPYTVVYFPVRGRCAALRMLLADQGQSWKEEVVTVETWQEGSLKA... \n", "55 MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSEL... \n", "... ... \n", "105118 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMNLPGRWKPKM... \n", "105119 PQITLWQRPLVTIKIGGQLKEALLDTGADDTVLEEMNLPGRWKPKM... \n", "105124 SKVVVPAQGKKITLQNGKLNVPENPIIPYIEGDGIGVDVTPAMLKV... \n", "105133 ANIVGGIEYSINNASLCSVGFSVTRGATKGFVTAGHCGTVNATARI... \n", "105138 KFPRVKNWELGSITYDTLCAQSQQDGPCTPRRCLGSLVLPRKLQTR... \n", "\n", " smiles affinity_uM \n", "38 CC[C@H](C(=O)c1ccc(c(c1Cl)Cl)OCC(=O)O)C 1.500 \n", "43 OC(=O)c1cc(/N=N/c2ccc(cc2)S(=O)(=O)Nc2ccccn2)c... 24.000 \n", "53 O[C@@H]1[C@@H](CO[P@](=O)(O[P@@](=O)(C(CCCC(P(... NaN \n", "54 CCCCCCSC[C@@H](C(=O)NCC(=O)O)NC(=O)CC[C@@H](C(... 10.000 \n", "55 c1ccccc1 175.000 \n", "... ... ... \n", "105118 O[C@@H]([C@H](Cc1ccccc1)NC(=O)[C@H](C(C)C)NC(=... NaN \n", "105119 O[C@@H]([C@H](Cc1ccccc1)NC(=O)[C@H](C(C)C)NC(=... NaN \n", "105124 O[C@@H]1[C@@H](COP(=O)(O)O)O[C@H]([C@@H]1OP(=O... 125.000 \n", "105133 CC(C[C@@H](B(O)O)NC(=O)[C@@H]1CCCN1C(=O)[C@@H]... NaN \n", "105138 CC[Se]C(=N)N 0.039 \n", "\n", "[13645 rows x 3 columns]" ] }, "execution_count": 98, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_biolip" ] }, { "cell_type": "code", "execution_count": 134, "id": "195f92db-fe06-4d03-8500-8d6c310a3347", "metadata": {}, "outputs": [], "source": [ "df_all = pd.concat([df_pdbbind,df_bindingdb,df_moad,df_biolip]).reset_index()" ] }, { "cell_type": "code", "execution_count": 135, "id": "d25c1e24-6566-4944-a0b4-944b3c8dbc6f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2446422" ] }, "execution_count": 135, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(df_all)" ] }, { "cell_type": "code", "execution_count": 105, "id": "c8287da2-cfdf-4d89-b175-f4c6b38ff8ac", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "INFO: Pandarallel will run on 32 workers.\n", "INFO: Pandarallel will use Memory file system to transfer data between the main process and workers.\n" ] } ], "source": [ "from pandarallel import pandarallel\n", "pandarallel.initialize()" ] }, { "cell_type": "code", "execution_count": null, "id": "de5ffc4a-afb7-4a26-8d57-509c2278d750", "metadata": {}, "outputs": [], "source": [ "df_all['maccs'] = df_all['smiles'].parallel_apply(get_maccs)" ] }, { "cell_type": "code", "execution_count": 108, "id": "59a6706d-dab9-4ee0-8ef6-33537a3622a4", "metadata": {}, "outputs": [], "source": [ "df_all.to_parquet('data/all_maccs.parquet')" ] }, { "cell_type": "code", "execution_count": 6, "id": "4ccf2ee5-d369-4c0e-bb91-792765d661bf", "metadata": {}, "outputs": [], "source": [ "import numpy as np" ] }, { "cell_type": "code", "execution_count": 14, "id": "8a4bbb18-e62f-4774-ac6b-8a1be68204c1", "metadata": {}, "outputs": [], "source": [ "df_all = pd.read_parquet('data/all_maccs.parquet')\n", "df_all = df_all.dropna().reset_index(drop=True)" ] }, { "cell_type": "code", "execution_count": 15, "id": "d210fe56-a7eb-4adc-a77a-14c0c6d0034e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2430135" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(df_all)" ] }, { "cell_type": "code", "execution_count": 16, "id": "d12b365d-98bd-4b61-b836-1a08d2e55418", "metadata": {}, "outputs": [], "source": [ "maccs = df_all['maccs'].to_numpy()\n", "#df_reindex[df_reindex.duplicated(keep='first')].reset_index()" ] }, { "cell_type": "code", "execution_count": 17, "id": "80c15210-1af3-436e-970b-f81fc596fb41", "metadata": {}, "outputs": [], "source": [ "df_maccs = pd.DataFrame(np.vstack(maccs))" ] }, { "cell_type": "code", "execution_count": 18, "id": "30c314b8-8fe7-48ae-a2b8-149de1471b0c", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0 int64\n", "1 int64\n", "2 int64\n", "3 int64\n", "4 int64\n", "5 int64\n", "dtype: object" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_maccs.dtypes" ] }, { "cell_type": "code", "execution_count": 19, "id": "70a0a820-4d0c-4472-af96-9c301c0ab204", "metadata": {}, "outputs": [], "source": [ "df_expand = pd.concat([df_all[['seq','smiles','affinity_uM']],df_maccs],axis=1)" ] }, { "cell_type": "code", "execution_count": 21, "id": "13d092fa-5625-40d0-b7ec-e3405ea20279", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
seqsmilesaffinity_uM012345
0APQTITELCSEYRNTQIYTINDKILSYTESMAGKREMVIITFKSGE...OC[C@H]1O[C@H](Oc2cccc(c2)N(=O)=O)[C@@H]([C@H]...500.0002147483648324259020819147325479941167063748288829124
1VETFAFQAEIAQLMSLIINTFYSNKEIFLRELISNSSDALDKIRYE...COc1ccc(cc1)c1c(onc1c1cc(C(C)C)c(cc1O)O)NC(=O)...0.0231310721109655552212337696134773408822951175957252
2GMRVYLGADHAGYELKQRIIEHLKQTGHEPIDCGALRYDADDDYPA...O[C@H]1O[C@H](CO[P](=O)(=O)=O)[C@H]([C@H]([C@H...6300.0006710886410825236481879080960461382690357635512828
3SMENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVP...OCC[C@@H]1CCCCN1c1cc(NCC2=CC=CN(C2)O)n2c(n1)c(...0.21021474846723617689885066477339784791021599828989252
4EFSEWFHNILEEAEIIDQRYPVKGMHVWMPHGFMIRKNTLKILRRI...O[C@@H]1[C@@H](COS(=O)(=O)NC(=O)[C@@H]2CCC[NH2...0.05001858306115422345659640185958224282121085124
..............................
2430130IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL...O=C[C@@H](NC(=O)[C@H](Cc1ccc(cc1)OS(O)(O)O)NC(...8.0000612865025310772968421468702344286578680252
2430131IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL...CC(C[C@@H](C(=O)N1C=CC[C@H]1C(=O)N)NC(=O)[C@@H...8.0000136194102539033616126800882071973584252
2430132RWEQTHLTYRIENYTPDLPRADVDHAIEKAFQLWSNVTPLTFTKVS...ONC(=O)CC1(CCOCC1)S(=O)(=O)c1ccc(cc1)Oc1ccccc10.0232147483648208148889631249368932646689624286183928124
2430133SKVVVPAQGKKITLQNGKLNVPENPIIPYIEGDGIGVDVTPAMLKV...O[C@@H]1[C@@H](COP(=O)(O)O)O[C@H]([C@@H]1OP(=O...125.000671088641115688962177186950840184317183744193341124
2430134KFPRVKNWELGSITYDTLCAQSQQDGPCTPRRCLGSLVLPRKLQTR...CC[Se]C(=N)N0.03916614453739673621708801510015504192
\n", "

2430135 rows × 9 columns

\n", "
" ], "text/plain": [ " seq \\\n", "0 APQTITELCSEYRNTQIYTINDKILSYTESMAGKREMVIITFKSGE... \n", "1 VETFAFQAEIAQLMSLIINTFYSNKEIFLRELISNSSDALDKIRYE... \n", "2 GMRVYLGADHAGYELKQRIIEHLKQTGHEPIDCGALRYDADDDYPA... \n", "3 SMENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVP... \n", "4 EFSEWFHNILEEAEIIDQRYPVKGMHVWMPHGFMIRKNTLKILRRI... \n", "... ... \n", "2430130 IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL... \n", "2430131 IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL... \n", "2430132 RWEQTHLTYRIENYTPDLPRADVDHAIEKAFQLWSNVTPLTFTKVS... \n", "2430133 SKVVVPAQGKKITLQNGKLNVPENPIIPYIEGDGIGVDVTPAMLKV... \n", "2430134 KFPRVKNWELGSITYDTLCAQSQQDGPCTPRRCLGSLVLPRKLQTR... \n", "\n", " smiles affinity_uM \\\n", "0 OC[C@H]1O[C@H](Oc2cccc(c2)N(=O)=O)[C@@H]([C@H]... 500.000 \n", "1 COc1ccc(cc1)c1c(onc1c1cc(C(C)C)c(cc1O)O)NC(=O)... 0.023 \n", "2 O[C@H]1O[C@H](CO[P](=O)(=O)=O)[C@H]([C@H]([C@H... 6300.000 \n", "3 OCC[C@@H]1CCCCN1c1cc(NCC2=CC=CN(C2)O)n2c(n1)c(... 0.210 \n", "4 O[C@@H]1[C@@H](COS(=O)(=O)NC(=O)[C@@H]2CCC[NH2... 0.050 \n", "... ... ... \n", "2430130 O=C[C@@H](NC(=O)[C@H](Cc1ccc(cc1)OS(O)(O)O)NC(... 8.000 \n", "2430131 CC(C[C@@H](C(=O)N1C=CC[C@H]1C(=O)N)NC(=O)[C@@H... 8.000 \n", "2430132 ONC(=O)CC1(CCOCC1)S(=O)(=O)c1ccc(cc1)Oc1ccccc1 0.023 \n", "2430133 O[C@@H]1[C@@H](COP(=O)(O)O)O[C@H]([C@@H]1OP(=O... 125.000 \n", "2430134 CC[Se]C(=N)N 0.039 \n", "\n", " 0 1 2 3 4 5 \n", "0 2147483648 3242590208 1914732547 994116706 3748288829 124 \n", "1 131072 1109655552 2123376961 3477340882 2951175957 252 \n", "2 67108864 1082523648 1879080960 461382690 3576355128 28 \n", "3 2147484672 36176898 850664773 3978479102 1599828989 252 \n", "4 0 1858306115 4223456596 4018595822 4282121085 124 \n", "... ... ... ... ... ... ... \n", "2430130 0 612865025 3107729684 2146870234 4286578680 252 \n", "2430131 0 136194 1025390336 1612680088 2071973584 252 \n", "2430132 2147483648 2081488896 3124936893 264668962 4286183928 124 \n", "2430133 67108864 1115688962 1771869508 4018431718 3744193341 124 \n", "2430134 16 6144 537396736 2170880 1510015504 192 \n", "\n", "[2430135 rows x 9 columns]" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_expand" ] }, { "cell_type": "code", "execution_count": 22, "id": "30f7fff7-3cfe-41c8-97c9-666f3e256222", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index(['seq', 'smiles', 'affinity_uM', 0, 1, 2, 3, 4, 5], dtype='object')" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_expand.columns" ] }, { "cell_type": "code", "execution_count": 23, "id": "16d2b26e-984f-4c71-af19-a3e711ed9ca2", "metadata": {}, "outputs": [], "source": [ "df_reindex = df_expand.set_index([0,1,2,3,4,5,'seq'])" ] }, { "cell_type": "code", "execution_count": 24, "id": "27fa2150-8152-444b-ba5b-24bea39fc098", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index(['smiles', 'affinity_uM'], dtype='object')" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_reindex.columns" ] }, { "cell_type": "code", "execution_count": 67, "id": "89edacbc-52f3-4a76-90b0-95273f5e53b3", "metadata": {}, "outputs": [], "source": [ "df_nr = df_reindex[~df_reindex.duplicated(keep='first')].reset_index()\n", "df_nr = df_nr.drop(columns=[0,1,2,3,4,5])" ] }, { "cell_type": "code", "execution_count": 68, "id": "6a704c5e-68a6-418f-bcad-8688a13ca1d6", "metadata": {}, "outputs": [], "source": [ "# final sanity checks" ] }, { "cell_type": "code", "execution_count": 69, "id": "0cad3882-975d-4693-aad1-63ec26646bd0", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/ccs/proj/stf006/glaser/conda-envs/bio/lib/python3.9/site-packages/pandas/core/arraylike.py:358: RuntimeWarning: divide by zero encountered in log\n", " result = getattr(ufunc, method)(*inputs, **kwargs)\n" ] } ], "source": [ "df_nr['neg_log10_affinity_M'] = 6-np.log(df_nr['affinity_uM'])/np.log(10)" ] }, { "cell_type": "code", "execution_count": 70, "id": "c200e29a-3f14-41f4-b620-ccce0eb0d5ce", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
seqsmilesaffinity_uMneg_log10_affinity_M
0APQTITELCSEYRNTQIYTINDKILSYTESMAGKREMVIITFKSGE...OC[C@H]1O[C@H](Oc2cccc(c2)N(=O)=O)[C@@H]([C@H]...500.0003.301030
1VETFAFQAEIAQLMSLIINTFYSNKEIFLRELISNSSDALDKIRYE...COc1ccc(cc1)c1c(onc1c1cc(C(C)C)c(cc1O)O)NC(=O)...0.0237.638272
2GMRVYLGADHAGYELKQRIIEHLKQTGHEPIDCGALRYDADDDYPA...O[C@H]1O[C@H](CO[P](=O)(=O)=O)[C@H]([C@H]([C@H...6300.0002.200659
3SMENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVP...OCC[C@@H]1CCCCN1c1cc(NCC2=CC=CN(C2)O)n2c(n1)c(...0.2106.677781
4EFSEWFHNILEEAEIIDQRYPVKGMHVWMPHGFMIRKNTLKILRRI...O[C@@H]1[C@@H](COS(=O)(=O)NC(=O)[C@@H]2CCC[NH2...0.0507.301030
...............
1849400KQISVRGLAGVENVTELKKNFNRHLHFTLVKDRNVATPRDYYFALA...O[C@@H]1[C@H](O)[C@H](O[C@H]1n1cnc2c1ncnc2N)CO...250.0003.602060
1849401IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL...O=C[C@@H](NC(=O)[C@H](Cc1ccc(cc1)OS(O)(O)O)NC(...8.0005.096910
1849402IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL...CC(C[C@@H](C(=O)N1C=CC[C@H]1C(=O)N)NC(=O)[C@@H...8.0005.096910
1849403SKVVVPAQGKKITLQNGKLNVPENPIIPYIEGDGIGVDVTPAMLKV...O[C@@H]1[C@@H](COP(=O)(O)O)O[C@H]([C@@H]1OP(=O...125.0003.903090
1849404KFPRVKNWELGSITYDTLCAQSQQDGPCTPRRCLGSLVLPRKLQTR...CC[Se]C(=N)N0.0397.408935
\n", "

1849405 rows × 4 columns

\n", "
" ], "text/plain": [ " seq \\\n", "0 APQTITELCSEYRNTQIYTINDKILSYTESMAGKREMVIITFKSGE... \n", "1 VETFAFQAEIAQLMSLIINTFYSNKEIFLRELISNSSDALDKIRYE... \n", "2 GMRVYLGADHAGYELKQRIIEHLKQTGHEPIDCGALRYDADDDYPA... \n", "3 SMENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVP... \n", "4 EFSEWFHNILEEAEIIDQRYPVKGMHVWMPHGFMIRKNTLKILRRI... \n", "... ... \n", "1849400 KQISVRGLAGVENVTELKKNFNRHLHFTLVKDRNVATPRDYYFALA... \n", "1849401 IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL... \n", "1849402 IVEGSDAEIGMSPWQVMLFRKSPQELLCGASLISDRWVLTAAHCLL... \n", "1849403 SKVVVPAQGKKITLQNGKLNVPENPIIPYIEGDGIGVDVTPAMLKV... \n", "1849404 KFPRVKNWELGSITYDTLCAQSQQDGPCTPRRCLGSLVLPRKLQTR... \n", "\n", " smiles affinity_uM \\\n", "0 OC[C@H]1O[C@H](Oc2cccc(c2)N(=O)=O)[C@@H]([C@H]... 500.000 \n", "1 COc1ccc(cc1)c1c(onc1c1cc(C(C)C)c(cc1O)O)NC(=O)... 0.023 \n", "2 O[C@H]1O[C@H](CO[P](=O)(=O)=O)[C@H]([C@H]([C@H... 6300.000 \n", "3 OCC[C@@H]1CCCCN1c1cc(NCC2=CC=CN(C2)O)n2c(n1)c(... 0.210 \n", "4 O[C@@H]1[C@@H](COS(=O)(=O)NC(=O)[C@@H]2CCC[NH2... 0.050 \n", "... ... ... \n", "1849400 O[C@@H]1[C@H](O)[C@H](O[C@H]1n1cnc2c1ncnc2N)CO... 250.000 \n", "1849401 O=C[C@@H](NC(=O)[C@H](Cc1ccc(cc1)OS(O)(O)O)NC(... 8.000 \n", "1849402 CC(C[C@@H](C(=O)N1C=CC[C@H]1C(=O)N)NC(=O)[C@@H... 8.000 \n", "1849403 O[C@@H]1[C@@H](COP(=O)(O)O)O[C@H]([C@@H]1OP(=O... 125.000 \n", "1849404 CC[Se]C(=N)N 0.039 \n", "\n", " neg_log10_affinity_M \n", "0 3.301030 \n", "1 7.638272 \n", "2 2.200659 \n", "3 6.677781 \n", "4 7.301030 \n", "... ... \n", "1849400 3.602060 \n", "1849401 5.096910 \n", "1849402 5.096910 \n", "1849403 3.903090 \n", "1849404 7.408935 \n", "\n", "[1849405 rows x 4 columns]" ] }, "execution_count": 70, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_nr" ] }, { "cell_type": "code", "execution_count": 72, "id": "7f4027a2-0a5f-47bf-8a34-0c6a73b9b112", "metadata": {}, "outputs": [], "source": [ "df = df_nr[np.isfinite(df_nr['neg_log10_affinity_M'])]" ] }, { "cell_type": "code", "execution_count": 86, "id": "c558f3f6-9fe7-4361-8272-23a54368fdda", "metadata": {}, "outputs": [], "source": [ "df.to_parquet('data/all.parquet')" ] }, { "cell_type": "code", "execution_count": 3, "id": "4e2d89f7-f6ea-41de-a13b-4a184b4fd580", "metadata": {}, "outputs": [], "source": [ "df = pd.read_parquet('data/all.parquet')" ] }, { "cell_type": "code", "execution_count": 5, "id": "d91c0d91-474c-4ab2-9a5e-3b7861f7a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"needs_background": "light" }, "output_type": "display_data" } ], "source": [ "ax = df['neg_log10_affinity_M'].hist(bins=100,density=True)\n", "ax.set_xlabel('-$\\log_{10}$ affinity[M]',fontsize=16)\n", "ax.set_ylabel('probability',fontsize=16)\n", "ax.figure.savefig('affinity.pdf')" ] }, { "cell_type": "code", "execution_count": 6, "id": "11571486-901c-474b-a8ec-215ec5c9e661", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1848949" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(df)" ] }, { "cell_type": "code", "execution_count": 7, "id": "9ca8df46-15d3-40f9-b304-dd6e5597be5e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "5.142857142857143" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1.8/0.35" ] }, { "cell_type": "code", "execution_count": null, "id": "88cf855d-704f-4ed4-827e-9f4e3288b3a0", "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.9.4" } }, "nbformat": 4, "nbformat_minor": 5 }