|
284 | 284 | "cell_type": "code", |
285 | 285 | "execution_count": null, |
286 | 286 | "metadata": {}, |
287 | | - "outputs": [ |
288 | | - { |
289 | | - "name": "stdout", |
290 | | - "output_type": "stream", |
291 | | - "text": [ |
292 | | - "Added to sys.path: /home/edwin/SSC-Projects/b_REPOSITORIES/ontograph\n" |
293 | | - ] |
294 | | - } |
295 | | - ], |
| 287 | + "outputs": [], |
296 | 288 | "source": [ |
297 | 289 | "import sys\n", |
298 | 290 | "import os\n", |
|
308 | 300 | }, |
309 | 301 | { |
310 | 302 | "cell_type": "code", |
311 | | - "execution_count": 3, |
| 303 | + "execution_count": null, |
312 | 304 | "metadata": {}, |
313 | | - "outputs": [ |
314 | | - { |
315 | | - "name": "stderr", |
316 | | - "output_type": "stream", |
317 | | - "text": [ |
318 | | - "Downloading data from 'http://purl.obolibrary.org/obo/go.obo' to file '/home/edwin/.ontograph_cache/go.obo'.\n", |
319 | | - "SHA256 hash of downloaded file: 0908af70601dd41f2c55f664ca5d5959e939162362e9a5573c6794b5d850e601\n", |
320 | | - "Use this value as the 'known_hash' argument of 'pooch.retrieve' to ensure that the file hasn't changed if it is downloaded again in the future.\n" |
321 | | - ] |
322 | | - }, |
323 | | - { |
324 | | - "name": "stdout", |
325 | | - "output_type": "stream", |
326 | | - "text": [ |
327 | | - "{'name': 'go', 'version': 'releases/2025-06-01', 'format': '1.2'}\n" |
328 | | - ] |
329 | | - }, |
330 | | - { |
331 | | - "ename": "AttributeError", |
332 | | - "evalue": "'Ontology' object has no attribute 'roots'", |
333 | | - "output_type": "error", |
334 | | - "traceback": [ |
335 | | - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
336 | | - "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", |
337 | | - "Cell \u001b[0;32mIn[3], line 7\u001b[0m\n\u001b[1;32m 4\u001b[0m gene_ontology \u001b[38;5;241m=\u001b[39m client\u001b[38;5;241m.\u001b[39mload(name_id\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mgo\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;28mformat\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mobo\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28mprint\u001b[39m(gene_ontology\u001b[38;5;241m.\u001b[39mmetadata())\n\u001b[0;32m----> 7\u001b[0m \u001b[38;5;28mprint\u001b[39m([root\u001b[38;5;241m.\u001b[39mid \u001b[38;5;28;01mfor\u001b[39;00m root \u001b[38;5;129;01min\u001b[39;00m \u001b[43mgene_ontology\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mroots\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m])\n", |
338 | | - "File \u001b[0;32m~/SSC-Projects/b_REPOSITORIES/ontograph/ontograph/api/client.py:51\u001b[0m, in \u001b[0;36mOntologyWrapper.roots\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21mroots\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[0;32m---> 51\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mlist\u001b[39m(\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43montology\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mroots\u001b[49m())\n", |
339 | | - "\u001b[0;31mAttributeError\u001b[0m: 'Ontology' object has no attribute 'roots'" |
340 | | - ] |
341 | | - } |
342 | | - ], |
| 305 | + "outputs": [], |
343 | 306 | "source": [ |
344 | 307 | "from ontograph.api.client import OntologyClient\n", |
345 | 308 | "\n", |
|
0 commit comments