|
53 | 53 | "id": "-BBDAd3jwjDd" |
54 | 54 | } |
55 | 55 | }, |
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 | | - }, |
110 | 56 | { |
111 | 57 | "cell_type": "code", |
112 | 58 | "source": [ |
113 | | - "#@title 1.b Install the B2BTools Package\n", |
| 59 | + "#@title 1.a Install the B2BTools Package\n", |
114 | 60 | "%%capture\n", |
115 | | - "!pip install b2bTools==3.0.7 ipympl hmmer\n", |
| 61 | + "!pip install b2bTools==3.0.8b3 ipympl hmmer\n", |
116 | 62 | "#@markdown Please be patient, this can take several minutes...\n", |
117 | 63 | "\n", |
118 | 64 | "#@markdown ⚠️ Once installed, please restart the session and run step 1.c directly, without rerunning the first step." |
|
121 | 67 | "cellView": "form", |
122 | 68 | "id": "Pay97KNHiL_E" |
123 | 69 | }, |
124 | | - "execution_count": 4, |
| 70 | + "execution_count": null, |
125 | 71 | "outputs": [] |
126 | 72 | }, |
127 | 73 | { |
128 | 74 | "cell_type": "code", |
129 | 75 | "source": [ |
130 | | - "#@title 1.c Install the dependencies\n", |
| 76 | + "#@title 1.b Install the dependencies\n", |
131 | 77 | "%%capture\n", |
132 | 78 | "import math\n", |
133 | 79 | "import Bio\n", |
|
147 | 93 | "cellView": "form", |
148 | 94 | "id": "LuFTJyt2jE49" |
149 | 95 | }, |
150 | | - "execution_count": 1, |
| 96 | + "execution_count": null, |
151 | 97 | "outputs": [] |
152 | 98 | }, |
153 | 99 | { |
154 | 100 | "cell_type": "code", |
155 | 101 | "source": [ |
156 | | - "#@title 1.d Upload your MSA file\n", |
| 102 | + "#@title 1.c Upload your MSA file\n", |
157 | 103 | "\n", |
158 | 104 | "#@markdown Execute this cell to upload your MSA file from your computer.\n", |
159 | 105 | "\n", |
|
278 | 224 | "cellView": "form", |
279 | 225 | "id": "jVbBi3NHj_L8" |
280 | 226 | }, |
281 | | - "execution_count": 3, |
| 227 | + "execution_count": null, |
282 | 228 | "outputs": [] |
283 | 229 | }, |
284 | 230 | { |
|
367 | 313 | "cellView": "form", |
368 | 314 | "id": "13vD_D2rmxWj" |
369 | 315 | }, |
370 | | - "execution_count": 5, |
| 316 | + "execution_count": null, |
371 | 317 | "outputs": [] |
372 | 318 | }, |
373 | 319 | { |
|
457 | 403 | "cellView": "form", |
458 | 404 | "id": "Ko2mHtQWm7CW" |
459 | 405 | }, |
460 | | - "execution_count": 6, |
| 406 | + "execution_count": null, |
461 | 407 | "outputs": [] |
462 | 408 | }, |
463 | 409 | { |
|
612 | 558 | "cellView": "form", |
613 | 559 | "id": "iVXazSQInABW" |
614 | 560 | }, |
615 | | - "execution_count": 7, |
| 561 | + "execution_count": null, |
616 | 562 | "outputs": [] |
617 | 563 | }, |
618 | 564 | { |
|
728 | 674 | "cellView": "form", |
729 | 675 | "id": "68uRbfpMnFpy" |
730 | 676 | }, |
731 | | - "execution_count": 8, |
| 677 | + "execution_count": null, |
732 | 678 | "outputs": [] |
733 | 679 | }, |
734 | 680 | { |
|
895 | 841 | "cellView": "form", |
896 | 842 | "id": "rRdPAR0snMdz" |
897 | 843 | }, |
898 | | - "execution_count": 9, |
| 844 | + "execution_count": null, |
899 | 845 | "outputs": [] |
900 | 846 | }, |
901 | 847 | { |
|
1057 | 1003 | "cellView": "form", |
1058 | 1004 | "id": "80hzPgLSnVcv" |
1059 | 1005 | }, |
1060 | | - "execution_count": 10, |
| 1006 | + "execution_count": null, |
1061 | 1007 | "outputs": [] |
1062 | 1008 | }, |
1063 | 1009 | { |
|
1247 | 1193 | "cellView": "form", |
1248 | 1194 | "id": "60AQ3g96negH" |
1249 | 1195 | }, |
1250 | | - "execution_count": 11, |
| 1196 | + "execution_count": null, |
1251 | 1197 | "outputs": [] |
1252 | 1198 | }, |
1253 | 1199 | { |
1254 | 1200 | "cell_type": "code", |
1255 | 1201 | "source": [ |
1256 | 1202 | "#@title 6. Get the Gaussian Mixture Model (GMM) scores\n", |
1257 | | - "%%capture\n", |
1258 | 1203 | "#@markdown Once this cell has been executed, the GMM scores will be computed and the most different residues will be shown.\n", |
1259 | 1204 | "#@markdown The results are also saved in the Results folder.\n", |
1260 | 1205 | "\n", |
|
1319 | 1264 | "\n", |
1320 | 1265 | " # Ensure 'predictions_single_seq' exists and is correctly defined\n", |
1321 | 1266 | " 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", |
1324 | 1270 | " else:\n", |
1325 | 1271 | " raise KeyError(\"predictions_single_seq not found in the global scope\")\n", |
1326 | 1272 | "\n", |
|
1409 | 1355 | "cellView": "form", |
1410 | 1356 | "id": "eOq1COBVnjkA" |
1411 | 1357 | }, |
1412 | | - "execution_count": 12, |
| 1358 | + "execution_count": null, |
1413 | 1359 | "outputs": [] |
1414 | 1360 | }, |
1415 | 1361 | { |
|
0 commit comments