1.2 Patterns DREBIOP - Disease 2 (Pathway-based treated disease).ipynb 10.6 KB
Newer Older
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
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
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "from sqlalchemy import create_engine\n",
    "from sklearn import preprocessing\n",
    "import mysql.connector\n",
    "from pandas import DataFrame"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# data"
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
28
   "execution_count": 2,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
29 30 31
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
32 33
    "triplets_total = pd.read_excel('./Data/Input/DISNET/triples_drebiop_final_dos.xlsx',engine='openpyxl')\n",
    "triplets_total = triplets_total.drop(columns=['Unnamed: 0'])"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
34 35 36 37 38 39 40 41 42 43 44 45 46
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "triplets_total = triplets_total.drop_duplicates()"
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
47
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
48 49 50
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
51
    "disease_two = triplets_total[[\"disease_id\"]]"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
52 53 54 55
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
56
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
57 58 59
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
60
    "# genes"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
61 62 63 64
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
65
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
66 67 68
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
69 70
    "genes = pd.read_excel((\"./Data/Input/DISNET/dis_gen.xlsx\"),engine='openpyxl')\n",
    "genes = gen.drop([\"Unnamed: 0\"],axis=1)"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
71 72 73 74
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
75
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
76 77 78
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
79
    "dis_gene = disease_two.merge(genes, how= \"inner\", on= \"disease_id\")"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
80 81 82 83
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
84
   "execution_count": 20,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
85 86 87 88 89 90 91 92
   "metadata": {},
   "outputs": [],
   "source": [
    "dis_gen_num_gen = dis_gen.groupby(['disease_id']).count()"
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
93
   "execution_count": 13,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107
   "metadata": {},
   "outputs": [],
   "source": [
    "dis_gen_num_gen = dis_gen_num_gen.reset_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
108 109 110 111 112 113 114 115
       "count      6.000000\n",
       "mean     423.666667\n",
       "std      372.215350\n",
       "min        3.000000\n",
       "25%      104.500000\n",
       "50%      428.500000\n",
       "75%      687.250000\n",
       "max      912.000000\n",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
116 117 118
       "Name: gene_id, dtype: float64"
      ]
     },
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
119
     "execution_count": 15,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
120 121 122 123 124 125 126 127 128 129
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dis_gen_num_gen[\"gene_id\"].describe()"
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
130
   "execution_count": 16,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
131 132 133 134 135 136 137 138
   "metadata": {},
   "outputs": [],
   "source": [
    "#### pw via gene"
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
139
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
140 141 142
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
143
    "pw_gene = pd.read_csv('./Data/Input/DISNET/pathways_genes.tsv', sep='\\t')"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
144 145 146 147
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
148
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
149 150 151
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
152
    "dis_pw_gen = disease_two.merge(pw_gene, how= \"inner\", on= \"disease_id\")"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
153 154 155 156
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
157
   "execution_count": 24,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
158 159 160
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
161
    "dis_pw_gen = dis_pw_gen.groupby(['disease_id']).count()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
162 163 164 165 166 167 168 169
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
170
    "dis_pw_gen = dis_gen_pw.reset_index()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
171 172 173 174 175 176 177 178 179 180
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
181 182 183 184 185 186 187 188 189
       "count       6.000000\n",
       "mean     1568.000000\n",
       "std      1344.291337\n",
       "min         3.000000\n",
       "25%       415.000000\n",
       "50%      1745.500000\n",
       "75%      2380.000000\n",
       "max      3351.000000\n",
       "Name: pathway_id, dtype: float64"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
190 191 192 193 194 195 196 197
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
198
    "dis_gen_pw[\"pathway_id\"].describe()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
199 200 201 202 203 204
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
205
   "outputs": [],
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
206
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
207
    "#### pw direct"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
208 209 210 211
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
212
   "execution_count": 26,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
213 214 215
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
216
    "dis_path_direct = pd.read_csv('./Data/Input/DISNET/disease_pathway.tsv', sep='\\t')"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
217 218 219 220
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
221
   "execution_count": 28,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
222
   "metadata": {},
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
223
   "outputs": [],
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
224
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
225
    "dr_pw = disease_two.merge(dis_path_direct,on=\"disease_id\",how= \"inner\")"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
226 227 228 229
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
230
   "execution_count": 28,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
231 232 233
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
234
    "dr_pw = dr_pw.groupby(['disease_id']).count()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
235 236 237 238
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
239
   "execution_count": 29,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
240 241 242
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
243
    "dr_pw = dr_pw.reset_index()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
244 245 246 247
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "25.833333333333332"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dr_pw[\"pathway_id\"].mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
269 270 271
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
272
    "### drug"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
273 274 275 276
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
277
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
278 279 280
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
281
    "drug = pd.read_csv('./Data/Input/DISNET/drugs.tsv', sep='\\t')"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
282 283 284 285
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
286
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
287 288 289
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
    "dis_drug = disease_two.merge(drug, how= \"inner\", on= \"disease_id\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "dis_drug = dis_drug.groupby(['disease_id']).count()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "dis_drug = dis_drug.reset_index()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
309 310 311 312
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
313
   "execution_count": 35,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
314 315 316 317 318
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
319
       "657.3333333333334"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
320 321
      ]
     },
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
322
     "execution_count": 35,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
323 324 325 326 327
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
328
    "dis_drug[\"drug_id\"].mean()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
329 330 331 332
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
333
   "execution_count": 36,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
334 335 336
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
337
    "### symptom"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
338 339 340 341
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
342
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
343 344 345
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
346 347
    "sint = pd.read_csv('./Data/Input/DISNET/sint_all.tsv', sep='\\t')\n",
    "sint = sint.drop([\"Unnamed: 0\"],axis=1)"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
348 349 350 351
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
352
   "execution_count": null,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
353 354 355
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
356
    "dis_sint = disease_two.merge(sint, how= \"inner\", on= \"disease_id\")"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
357 358 359 360
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
361
   "execution_count": 39,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
362 363 364
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
365
    "dis_sint = dis_sint.groupby(['disease_id']).count()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
366 367 368 369
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
370
   "execution_count": 40,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
371 372 373
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
374
    "dis_sint = dis_sint.reset_index()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
375 376 377 378
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
379
   "execution_count": 41,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
380 381 382 383 384
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
385
       "106.66666666666667"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
386 387
      ]
     },
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
388
     "execution_count": 41,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
389 390 391 392 393
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
394 395 396 397 398 399 400 401
    "dis_sint[\"symptom\"].mean()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Pathways_type"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
402 403 404 405
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
406
   "execution_count": 2,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
407 408 409
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
410 411 412
    "drebiop_repodb = pd.read_excel((\"./Data/Input/DISNET/debriop_repodb_pws_info.xlsx\"),engine='openpyxl')\n",
    "drebiop_repodb = drebiop_repodb.drop(columns=['Unnamed: 0'])\n",
    "drebiop_repodb = drebiop_repodb.drop_duplicates()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
413 414 415 416
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
417
   "execution_count": 3,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
418 419 420
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
421 422 423
    "drebiop_repodb_flip = pd.read_excel((\"./Data/Input/DISNET/debriop_repodb_flip_pws_info.xlsx\"),engine='openpyxl')\n",
    "drebiop_repodb_flip = drebiop_repodb_flip.drop(columns=['Unnamed: 0'])\n",
    "drebiop_repodb_flip = drebiop_repodb_flip.drop_duplicates()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
424 425 426 427
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
428
   "execution_count": 4,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
429 430 431
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
432
    "drebiop_repodb_flip = drebiop_repodb_flip.rename(columns={\"disease2\": \"disease1\"})"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
433 434 435 436
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
437
   "execution_count": 5,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
438 439 440
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
441 442 443
    "drebiop_csbj = pd.read_excel((\"./Data/Input/DISNET/debriop_csbj_pws_info.xlsx\"),engine='openpyxl')\n",
    "drebiop_csbj = drebiop_csbj.drop(columns=['Unnamed: 0'])\n",
    "drebiop_csbj = drebiop_csbj.drop_duplicates()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
444 445 446 447
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
448 449 450 451 452 453 454 455 456 457
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "drebiop_csbj = drebiop_csbj.rename(columns={\"Original Condition CUI\": \"disease1\"})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
458 459 460
   "metadata": {},
   "outputs": [],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
    "pws_all_triples_drebiop = pd.concat([drebiop_repodb,drebiop_repodb_flip,drebiop_csbj])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "60"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(pws_all_triples_drebiop)"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
482 483 484 485
   ]
  },
  {
   "cell_type": "code",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
486
   "execution_count": 11,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
487 488 489 490 491
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
492 493 494 495 496 497 498
       "WP554     18\n",
       "WP1531    18\n",
       "WP4756     9\n",
       "WP2371     6\n",
       "WP3303     6\n",
       "WP1533     3\n",
       "Name: pathway_id, dtype: int64"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
499 500
      ]
     },
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
501
     "execution_count": 11,
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
502 503 504 505 506
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
507
    "pws_all_triples_drebiop[\"pathway_id\"].value_counts()"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
508 509 510 511 512
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
513
   "display_name": "Python 3 (ipykernel)",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
514 515 516 517 518 519 520 521 522 523 524 525 526
   "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",
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
527
   "version": "3.9.13"
Belen Otero Carrasco's avatar
Belen Otero Carrasco committed
528 529 530 531 532
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}