{ "cells": [ { "cell_type": "markdown", "id": "2ef77c1f", "metadata": {}, "source": [ "# Ubergraph Tutorial\n", "\n", "\n", "[Ubergraph](https://github.com/INCATools/ubergraph) is a SPARQL endpoint serving multiple OBO ontologies, pre-processed with:\n", "\n", " - relation-graph\n", " - information content scores\n", " - biolink categories\n", "\n", "This notebook demonstrates the use of OAK with the [ubergraph adapter](https://incatools.github.io/ontology-access-kit/implementations/ubergraph.html). Many of the same operations can be applied with other adapters. Advantages of ubergraph include:\n", "\n", "- multiple ontologies all joined together in one graph\n", "- complex sparql querying of multiple pieces of information, including entailed relationships\n", "\n", "First we set up a Jupyter alias for convenience:" ] }, { "cell_type": "code", "execution_count": 1, "id": "d2ba803e", "metadata": {}, "outputs": [], "source": [ "alias ubergraph runoak -i ubergraph:" ] }, { "cell_type": "markdown", "id": "b407a53d", "metadata": {}, "source": [ "First let's see the list of ontologies in Ubergraph. Note this list is ever growing and if you try this you may\n", "see more than is shown here:" ] }, { "cell_type": "code", "execution_count": 2, "id": "c862dfab", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "aism/aism-base.owl\r\n", "bspo.owl\r\n", "chebi.owl\r\n", "cl/cl-base.owl\r\n", "cob/cob-base.owl\r\n", "cob/components/cob-to-external.owl\r\n", "colao/colao-base.owl\r\n", "dpo/dpo-base.owl\r\n", "eco/eco-base.owl\r\n", "iao.owl\r\n", "ecto/ecto-base.owl\r\n", "emapa.owl\r\n", "envo/envo-base.owl\r\n", "fbbt/fbbt-base.owl\r\n", "fbcv/fbcv-base.owl\r\n", "fbdv/fbdv-base.owl\r\n", "fypo/fypo-base.owl\r\n", "go/extensions/go-bfo-bridge.owl\r\n", "go/go-base.owl\r\n", "hp/hp-base.owl\r\n", "lepao/lepao-base.owl\r\n", "ma.owl\r\n", "maxo/maxo-base.owl\r\n", "mi.owl\r\n", "mmo.owl\r\n", "mondo/mondo-base.owl\r\n", "ncbitaxon.owl\r\n", "ncit.owl\r\n", "mp/mp-base.owl\r\n", "nbo/nbo-base.owl\r\n", "oba/oba-base.owl\r\n", "obi/obi-base.owl\r\n", "so.owl\r\n", "pato/pato-base.owl\r\n", "pcl/pcl-base.owl\r\n", "pco/pco-base.owl\r\n", "ro/ro-base.owl\r\n", "uberon/bridge/cl-bridge-to-caro.owl\r\n", "uberon/bridge/cl-bridge-to-fbbt.owl\r\n", "uberon/bridge/uberon-bridge-to-caro.owl\r\n", "uberon/bridge/uberon-bridge-to-fbbt.owl\r\n", "uberon/uberon-base.owl\r\n", "wbbt/wbbt-base.owl\r\n", "wbls/wbls-base.owl\r\n", "wbphenotype/wbphenotype-base.owl\r\n", "zfa/zfa-base.owl\r\n", "https://w3id.org/orcidio/orcidio.owl\r\n", "pr/pr-asserted.owl\r\n", "po.owl\r\n", "https://raw.githubusercontent.com/PlantPhenoOntology/ppo/master/ppo.owl\r\n", "apo.owl\r\n", "mmusdv.owl\r\n", "foodon.owl\r\n", "to.owl\r\n", "peco.owl\r\n", "mro.owl\r\n", "hao.owl\r\n", "clao.owl\r\n", "oarcs.owl\r\n", "http://translator.renci.org/ubergraph-axioms.ofn\r\n" ] } ], "source": [ "ubergraph ontologies" ] }, { "cell_type": "markdown", "id": "bef0adc5", "metadata": {}, "source": [ "## Basic lookup\n", "\n", "We can use the OAK command to lookup various IDs" ] }, { "cell_type": "code", "execution_count": 24, "id": "e79e0714", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CL:0000540 ! neuron\n", "CL:0000679 ! glutamatergic neuron\n", "WARNING:root:Multiple labels for RO:0002100 = has_soma_location != has soma location\n", "WARNING:root:Multiple labels for RO:0002100 = has_soma_location != has soma location\n", "RO:0002100 ! has_soma_location\n", "UBERON:0002771 ! middle temporal gyrus\n" ] } ], "source": [ "ubergraph info CL:0000540 CL:0000679 RO:0002100 UBERON:0002771" ] }, { "cell_type": "markdown", "id": "a2a15d41", "metadata": {}, "source": [ "Note the annoying warning messages. OAK is telling us it couldn't find the \"definitive\" label for `RO:0002100`.\n", "One challenge for a merged graph like Ubergraph is that some sources may include stale imports with older labels\n", "and metadata - worse, some may \"inject\" triples onto objects that don't belong to them!\n", "\n", "In future, OAK may include more advanced ways of retrieving labels such that trusted graphs are relied on over\n", "secondary ones; and it's likely that some of these will be resolved in ubergraph.\n", "\n", "But for now you can just use `--quiet` to silence the warnings.\n", "\n", "Next let's try querying for `relationships`:" ] }, { "cell_type": "code", "execution_count": 22, "id": "6b72052e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "subject\tsubject_label\tpredicate\tpredicate_label\tobject\tobject_label\n", "CL:0000540\tneuron\tRO:0002215\tcapable of\tGO:0019226\ttransmission of nerve impulse\n", "CL:0000540\tneuron\tRO:0002216\tcapable of part of\tGO:0007154\tcell communication\n", "CL:0000540\tneuron\trdfs:subClassOf\tNone\tCL:0000393\telectrically responsive cell\n", "CL:0000540\tneuron\trdfs:subClassOf\tNone\tCL:0000404\telectrically signaling cell\n", "CL:0000540\tneuron\trdfs:subClassOf\tNone\tCL:0002319\tneural cell\n" ] } ], "source": [ "ubergraph --quiet relationships CL:0000540" ] }, { "cell_type": "markdown", "id": "5f684223", "metadata": {}, "source": [ "By default, only asserted relationships are shown. Use `--include-entailed` to show also entailed relationships (calculated ahead of time using relation-graph):" ] }, { "cell_type": "code", "execution_count": 25, "id": "ceb057d0", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "subject\tsubject_label\tpredicate\tpredicate_label\tobject\tobject_label\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tBFO:0000002\tcontinuant\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tBFO:0000004\tindependent continuant\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tBFO:0000040\tmaterial entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0000000\tanatomical entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0000003\tconnected anatomical structure\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0000006\tmaterial anatomical entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0030000\tbiological entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tNCBITaxon:131567\tcellular organisms\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tUBERON:0001016\tnervous system\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0001008\tNone\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0001010\torganism or virus or viroid\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0010004\torganism\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCOB:0000006\tmaterial entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCOB:0000021\tgross anatomical part\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCOB:0000022\torganism\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCOB:0000118\tcellular organism\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tOBI:0100026\torganism\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tUBERON:0000468\tmulticellular organism\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tUBERON:0010000\tmulticellular anatomical structure\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tUBERON:0001062\tanatomical entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0000012\tmulticellular organism\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tNCBITaxon:1\troot\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tBFO:0000001\tentity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tUBERON:0000061\tanatomical structure\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tUBERON:0000467\tanatomical system\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tUBERON:0000465\tmaterial anatomical entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tPCO:0000031\torganismal entity\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0010000\tNone\r", "\r\n", "CL:0000540\tneuron\tBFO:0000050\tpart of\tCARO:0000011\tNone\r", "\r\n" ] } ], "source": [ "ubergraph --quiet relationships CL:0000540 -p p --include-entailed | head -30" ] }, { "cell_type": "markdown", "id": "5932aa0b", "metadata": {}, "source": [ "Note that there a lot of trivial (but true) relationships there.\n", "\n", "We can also use `viz` to visualize a subgraph, in this around \"cell\", following is-a and part-of relationships:" ] }, { "cell_type": "code", "execution_count": 4, "id": "ef28111a", "metadata": {}, "outputs": [], "source": [ "ubergraph viz -p i,p CL:0000540 -o output/ubergraph-neuron.png" ] }, { "cell_type": "markdown", "id": "5ac6728f", "metadata": {}, "source": [ "![img](output/ubergraph-neuron.png)" ] }, { "cell_type": "markdown", "id": "b20990e0", "metadata": {}, "source": [ "If you have used the viz command on individual ontologies before, you may notice a few differences with ubergraph.\n", "\n", "Note that some pairs of terms have cyclic is-as pointing at one another: this is not an error! this reflects the fact that these two concepts are *equivalent*. In future we may add something at the visual layer that compacts these down into a bidirectional equivalence edge." ] }, { "cell_type": "markdown", "id": "568594ca", "metadata": {}, "source": [ "## Making SPARQL queries\n", "\n", "You can make SPARQL queries using the `query` command:" ] }, { "cell_type": "markdown", "id": "fb62d915", "metadata": {}, "source": [ "Here we will do a complex query that involves two relationship constraints:\n", "\n", " - all glutaminergic neurons (CL:0000679) that have \n", " - a soma location (RO:0002100) in the middle temporal gyrus (UBERON:0002771)" ] }, { "cell_type": "code", "execution_count": 16, "id": "798991a8", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "WARNING:root:Auto-adding limit\n", "Query has no LIMIT clause: SELECT * WHERE {?s rdfs:subClassOf CL:0000679 ; RO:0002100 UBERON:0002771} LIMIT 100\n", "s\ts_label\n", "PCL:0023046\tExc L2 LAMP5 LTK middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023047\tExc L2-4 LINC00507 GLP2R middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023048\tExc L2-3 LINC00507 FREM3 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023049\tExc L5-6 THEMIS C1QL3 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023050\tExc L3-4 RORB CARM1P1 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023051\tExc L3-5 RORB ESR1 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023052\tExc L3-5 RORB COL22A1 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023053\tExc L3-5 RORB FILIP1L middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023054\tExc L3-5 RORB TWIST2 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023055\tExc L4-5 RORB FOLH1B middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023056\tExc L4-6 RORB SEMA3E middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023057\tExc L4-5 RORB DAPK2 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023058\tExc L5-6 RORB TTC12 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023059\tExc L4-6 RORB C1R middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023060\tExc L4-5 FEZF2 SCN4B middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023061\tExc L5-6 THEMIS DCSTAMP middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023062\tExc L5-6 THEMIS CRABP1 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023063\tExc L5-6 THEMIS FGF10 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023064\tExc L4-6 FEZF2 IL26 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023065\tExc L5-6 FEZF2 ABO middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023066\tExc L6 FEZF2 SCUBE1 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023067\tExc L5-6 FEZF2 IL15 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023068\tExc L6 FEZF2 OR2T8 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023069\tExc L5-6 FEZF2 EFTUD1P1 middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023127\tL2/3 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023130\tL4 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023134\tL5 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023138\tL6 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023142\tL6b middle temporal gyrus glutamatergic neuron (Hsap)\n" ] } ], "source": [ "ubergraph query -q \"?s rdfs:subClassOf CL:0000679 ; RO:0002100 UBERON:0002771\" -P CL,RO,UBERON" ] }, { "cell_type": "markdown", "id": "8c541931", "metadata": {}, "source": [ "Note that for your convenience, a surround `SELECT {...}` is added. The `-P` option will add prefix declarations for all specified prefixes using standard sources.\n", "\n", "By default, labels will also be queried for all results (note that OAK will try to do this in an efficient a way as possible, avoiding iterative queries over the network). To suppress this, switch off the `--autolabel` option:" ] }, { "cell_type": "code", "execution_count": 17, "id": "87dfc17a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "WARNING:root:Auto-adding limit\n", "Query has no LIMIT clause: SELECT * WHERE {?s rdfs:subClassOf CL:0000679 ; RO:0002100 UBERON:0002771} LIMIT 100\n", "s\n", "PCL:0023046\n", "PCL:0023047\n", "PCL:0023048\n", "PCL:0023049\n", "PCL:0023050\n", "PCL:0023051\n", "PCL:0023052\n", "PCL:0023053\n", "PCL:0023054\n", "PCL:0023055\n", "PCL:0023056\n", "PCL:0023057\n", "PCL:0023058\n", "PCL:0023059\n", "PCL:0023060\n", "PCL:0023061\n", "PCL:0023062\n", "PCL:0023063\n", "PCL:0023064\n", "PCL:0023065\n", "PCL:0023066\n", "PCL:0023067\n", "PCL:0023068\n", "PCL:0023069\n", "PCL:0023127\n", "PCL:0023130\n", "PCL:0023134\n", "PCL:0023138\n", "PCL:0023142\n" ] } ], "source": [ "ubergraph query -q \"?s rdfs:subClassOf CL:0000679 ; RO:0002100 UBERON:0002771\" -P CL,RO,UBERON --no-autolabel" ] }, { "cell_type": "markdown", "id": "8aed357c", "metadata": {}, "source": [ "## Advanced: feeding query results to other commands\n", "\n", "So far we have seen an example of using the `query` command. You can actually use the results of a query\n", "in many other commands.\n", "\n", "In OAK, most commands accept a *query term list*. These are typically lists of IDs or labels - but they can also\n", "be *query expressions* that are evaluated on the fly. One such expression is `.query`.\n", "\n", "Here we will do the same query as above, and feed the results into the `relationships` command, allowing us the see\n", "the direct superclasses of all glutamine neurons in the MTG:" ] }, { "cell_type": "code", "execution_count": 30, "id": "bc14f463", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "subject\tsubject_label\tpredicate\tpredicate_label\tobject\tobject_label\n", "PCL:0023046\tExc L2 LAMP5 LTK middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023127\tL2/3 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023047\tExc L2-4 LINC00507 GLP2R middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023127\tL2/3 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023048\tExc L2-3 LINC00507 FREM3 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023127\tL2/3 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023049\tExc L5-6 THEMIS C1QL3 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:0000679\tglutamatergic neuron\n", "PCL:0023049\tExc L5-6 THEMIS C1QL3 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:0010012\tcerebral cortex neuron\n", "PCL:0023050\tExc L3-4 RORB CARM1P1 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023130\tL4 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023051\tExc L3-5 RORB ESR1 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023130\tL4 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023052\tExc L3-5 RORB COL22A1 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023130\tL4 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023053\tExc L3-5 RORB FILIP1L middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023130\tL4 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023054\tExc L3-5 RORB TWIST2 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023130\tL4 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023055\tExc L4-5 RORB FOLH1B middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023134\tL5 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023056\tExc L4-6 RORB SEMA3E middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023134\tL5 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023057\tExc L4-5 RORB DAPK2 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023134\tL5 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023058\tExc L5-6 RORB TTC12 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023134\tL5 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023059\tExc L4-6 RORB C1R middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023134\tL5 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023060\tExc L4-5 FEZF2 SCN4B middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023041\tL5 extratelencephalic projecting glutamatergic cortical neuron\n", "PCL:0023061\tExc L5-6 THEMIS DCSTAMP middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023138\tL6 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023062\tExc L5-6 THEMIS CRABP1 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023138\tL6 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023063\tExc L5-6 THEMIS FGF10 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023138\tL6 IT middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023064\tExc L4-6 FEZF2 IL26 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023012\tnear-projecting glutamatergic cortical neuron\n", "PCL:0023065\tExc L5-6 FEZF2 ABO middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023042\tL6 corticothalamic-projecting glutamatergic cortical neuron\n", "PCL:0023066\tExc L6 FEZF2 SCUBE1 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023142\tL6b middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023067\tExc L5-6 FEZF2 IL15 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023142\tL6b middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023068\tExc L6 FEZF2 OR2T8 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023142\tL6b middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023069\tExc L5-6 FEZF2 EFTUD1P1 middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tPCL:0023142\tL6b middle temporal gyrus glutamatergic neuron (Hsap)\n", "PCL:0023127\tL2/3 IT middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023008\tintratelencephalic-projecting glutamatergic cortical neuron\n", "PCL:0023130\tL4 IT middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023008\tintratelencephalic-projecting glutamatergic cortical neuron\n", "PCL:0023134\tL5 IT middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023008\tintratelencephalic-projecting glutamatergic cortical neuron\n", "PCL:0023138\tL6 IT middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023008\tintratelencephalic-projecting glutamatergic cortical neuron\n", "PCL:0023142\tL6b middle temporal gyrus glutamatergic neuron (Hsap)\trdfs:subClassOf\tNone\tCL:4023038\tL6b glutamatergic cortical neuron\n" ] } ], "source": [ "ubergraph --quiet relationships -p i .query//prefixes=CL,RO,UBERON \"?s rdfs:subClassOf CL:0000679 ; RO:0002100 UBERON:0002771\"" ] }, { "cell_type": "code", "execution_count": null, "id": "f934ed09", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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", "version": "3.9.5" } }, "nbformat": 4, "nbformat_minor": 5 }