Skip to content

Commit a7238ab

Browse files
chores: verify lowest common ancestors case in the notebook
1 parent 85bd8fa commit a7238ab

1 file changed

Lines changed: 42 additions & 1 deletion

File tree

notebooks/chebi_mix_ontology.ipynb

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,52 @@
228228
"source": [
229229
"a = swiss_onto.get_mapping_lut()"
230230
]
231+
},
232+
{
233+
"cell_type": "code",
234+
"execution_count": null,
235+
"id": "18",
236+
"metadata": {},
237+
"outputs": [],
238+
"source": [
239+
"# Siblings\n",
240+
"\"CHEBI:57654\"\n",
241+
"\"CHEBI:60392\"\n",
242+
"\n",
243+
"# Term in another branch\n",
244+
"\"CHEBI:138375\""
245+
]
246+
},
247+
{
248+
"cell_type": "code",
249+
"execution_count": null,
250+
"id": "19",
251+
"metadata": {},
252+
"outputs": [],
253+
"source": [
254+
"list_terms = [\"CHEBI:57654\",\"CHEBI:60392\",\"CHEBI:138375\"]\n",
255+
"\n",
256+
"terms_translated = translate_ids(\n",
257+
" mapping_lut=swiss_onto.get_mapping_lut(),\n",
258+
" terms_id=list_terms,\n",
259+
"\n",
260+
")\n",
261+
"\n",
262+
"swiss_onto.get_terms(list(swiss_onto.get_lowest_common_ancestors(terms_translated)))"
263+
]
264+
},
265+
{
266+
"cell_type": "code",
267+
"execution_count": null,
268+
"id": "20",
269+
"metadata": {},
270+
"outputs": [],
271+
"source": []
231272
}
232273
],
233274
"metadata": {
234275
"kernelspec": {
235-
"display_name": "ontograph (3.10.18)",
276+
"display_name": "ontograph",
236277
"language": "python",
237278
"name": "python3"
238279
},

0 commit comments

Comments
 (0)