Skip to content

Commit ec16b99

Browse files
authored
Update B2B_Tools_MSA_Example_In_function_of_a_protein's_behavior.ipynb
Update to version b2btools v3.0.8b3
1 parent a86a234 commit ec16b99

File tree

1 file changed

+18
-72
lines changed

1 file changed

+18
-72
lines changed

B2B_Tools_MSA_Example_In_function_of_a_protein's_behavior.ipynb

Lines changed: 18 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -53,66 +53,12 @@
5353
"id": "-BBDAd3jwjDd"
5454
}
5555
},
56-
{
57-
"cell_type": "markdown",
58-
"source": [
59-
"# 1.a Install the Pomegranate Package"
60-
],
61-
"metadata": {
62-
"id": "KAHMTKzMfvMc"
63-
}
64-
},
65-
{
66-
"cell_type": "code",
67-
"source": [
68-
"\n",
69-
"#@title First step : install the cython and scipy dependencies\n",
70-
"%%capture\n",
71-
"!pip install \"cython~=0.29.14\" \"scipy>=0.17.0\""
72-
],
73-
"metadata": {
74-
"cellView": "form",
75-
"id": "FaTJZBwucDyu"
76-
},
77-
"execution_count": 1,
78-
"outputs": []
79-
},
80-
{
81-
"cell_type": "code",
82-
"execution_count": 2,
83-
"metadata": {
84-
"cellView": "form",
85-
"id": "FpnQ_Uwsa0vE"
86-
},
87-
"outputs": [],
88-
"source": [
89-
"#@title Second step : Search the pomegranate package on Github\n",
90-
"%%capture\n",
91-
"!git clone -b v0.14.9 --single-branch https://github.com/jmschrei/pomegranate.git"
92-
]
93-
},
94-
{
95-
"cell_type": "code",
96-
"source": [
97-
"#@title Last step : Install the pomegranate package\n",
98-
"%%capture\n",
99-
"#@markdown Please be patient, this can take several minutes...\n",
100-
"%cd pomegranate\n",
101-
"!python setup.py install"
102-
],
103-
"metadata": {
104-
"cellView": "form",
105-
"id": "U7PAH0hxa_cx"
106-
},
107-
"execution_count": 3,
108-
"outputs": []
109-
},
11056
{
11157
"cell_type": "code",
11258
"source": [
113-
"#@title 1.b Install the B2BTools Package\n",
59+
"#@title 1.a Install the B2BTools Package\n",
11460
"%%capture\n",
115-
"!pip install b2bTools==3.0.7 ipympl hmmer\n",
61+
"!pip install b2bTools==3.0.8b3 ipympl hmmer\n",
11662
"#@markdown Please be patient, this can take several minutes...\n",
11763
"\n",
11864
"#@markdown ⚠️ Once installed, please restart the session and run step 1.c directly, without rerunning the first step."
@@ -121,13 +67,13 @@
12167
"cellView": "form",
12268
"id": "Pay97KNHiL_E"
12369
},
124-
"execution_count": 4,
70+
"execution_count": null,
12571
"outputs": []
12672
},
12773
{
12874
"cell_type": "code",
12975
"source": [
130-
"#@title 1.c Install the dependencies\n",
76+
"#@title 1.b Install the dependencies\n",
13177
"%%capture\n",
13278
"import math\n",
13379
"import Bio\n",
@@ -147,13 +93,13 @@
14793
"cellView": "form",
14894
"id": "LuFTJyt2jE49"
14995
},
150-
"execution_count": 1,
96+
"execution_count": null,
15197
"outputs": []
15298
},
15399
{
154100
"cell_type": "code",
155101
"source": [
156-
"#@title 1.d Upload your MSA file\n",
102+
"#@title 1.c Upload your MSA file\n",
157103
"\n",
158104
"#@markdown Execute this cell to upload your MSA file from your computer.\n",
159105
"\n",
@@ -278,7 +224,7 @@
278224
"cellView": "form",
279225
"id": "jVbBi3NHj_L8"
280226
},
281-
"execution_count": 3,
227+
"execution_count": null,
282228
"outputs": []
283229
},
284230
{
@@ -367,7 +313,7 @@
367313
"cellView": "form",
368314
"id": "13vD_D2rmxWj"
369315
},
370-
"execution_count": 5,
316+
"execution_count": null,
371317
"outputs": []
372318
},
373319
{
@@ -457,7 +403,7 @@
457403
"cellView": "form",
458404
"id": "Ko2mHtQWm7CW"
459405
},
460-
"execution_count": 6,
406+
"execution_count": null,
461407
"outputs": []
462408
},
463409
{
@@ -612,7 +558,7 @@
612558
"cellView": "form",
613559
"id": "iVXazSQInABW"
614560
},
615-
"execution_count": 7,
561+
"execution_count": null,
616562
"outputs": []
617563
},
618564
{
@@ -728,7 +674,7 @@
728674
"cellView": "form",
729675
"id": "68uRbfpMnFpy"
730676
},
731-
"execution_count": 8,
677+
"execution_count": null,
732678
"outputs": []
733679
},
734680
{
@@ -895,7 +841,7 @@
895841
"cellView": "form",
896842
"id": "rRdPAR0snMdz"
897843
},
898-
"execution_count": 9,
844+
"execution_count": null,
899845
"outputs": []
900846
},
901847
{
@@ -1057,7 +1003,7 @@
10571003
"cellView": "form",
10581004
"id": "80hzPgLSnVcv"
10591005
},
1060-
"execution_count": 10,
1006+
"execution_count": null,
10611007
"outputs": []
10621008
},
10631009
{
@@ -1247,14 +1193,13 @@
12471193
"cellView": "form",
12481194
"id": "60AQ3g96negH"
12491195
},
1250-
"execution_count": 11,
1196+
"execution_count": null,
12511197
"outputs": []
12521198
},
12531199
{
12541200
"cell_type": "code",
12551201
"source": [
12561202
"#@title 6. Get the Gaussian Mixture Model (GMM) scores\n",
1257-
"%%capture\n",
12581203
"#@markdown Once this cell has been executed, the GMM scores will be computed and the most different residues will be shown.\n",
12591204
"#@markdown The results are also saved in the Results folder.\n",
12601205
"\n",
@@ -1319,8 +1264,9 @@
13191264
"\n",
13201265
" # Ensure 'predictions_single_seq' exists and is correctly defined\n",
13211266
" if 'predictions_single_seq' in globals():\n",
1322-
" for prot in predictions_single_seq[\"sequence\"].keys():\n",
1323-
" sequences[prot] = predictions_single_seq[\"sequence\"][prot]\n",
1267+
" for prot_index, prot in enumerate(predictions_single_seq.keys()):\n",
1268+
" assert prot == msaSuite.seqs[prot_index][0]\n",
1269+
" sequences[prot] = msaSuite.seqs[prot_index][1]\n",
13241270
" else:\n",
13251271
" raise KeyError(\"predictions_single_seq not found in the global scope\")\n",
13261272
"\n",
@@ -1409,7 +1355,7 @@
14091355
"cellView": "form",
14101356
"id": "eOq1COBVnjkA"
14111357
},
1412-
"execution_count": 12,
1358+
"execution_count": null,
14131359
"outputs": []
14141360
},
14151361
{

0 commit comments

Comments
 (0)