SMD : Help : Job Queue Help

Help : Ontology Web Services Help


Contents


A set of web services has beed implemented to return ontology data. All of the services return an xml string. The form of the xml string varies depending on the function and the data returned.

Note: We have delibrately chosen to not use SOAP principally for performance reasons and the high overhead. These services are typically used in a GUI context where every millisecond is critical. A SOAP version may be implemnted in short order if necessary. There are currently 7 ontology query/retrieval functions:

getOntologyList

              url: .../smd/OntologyService?func=getOntologyList

A list of ontologies managed by this host is returned along with their respective identifiers. The identifiers will be necessary for subsequent queries.

                      <OntologyList>
                          <Ontology name="Mouse Anatomy Ontology" id="18"></Ontology>
                          <Ontology name="Disease Ontology" id="17"></Ontology>
                          <Ontology name="obsolete_function" id="7"></Ontology>
                      </OntologyList>

getChildren

              url: .../smd/OntologyService?func=getChildren&ontologyId=18&term=hand
              url: .../smd/OntologyService?func=getChildren&termId=5913205

A list of children of the indicated term is returned. There are two forms of this function one taking an ontology Id and a term string and the other taking a term identifier. Both forms have equivalent function. A list of children is returned as follows:

                       <TermList sourceId="5913092" uid="12">
                          <Term id="5913736">
                              <accession>MAE:0000813</accession>
                              <name>brain meninges</name>
                              <def>some definition</def>
                              <comment>a comment</comment>
                              <scientificName>some name, if any</scientificName>
                              <synonym>synonym if any</synonym>
			      <synonymAccession>MAE:0000xxx</synonymAccession>
                              <nChildren>6</nChildren>
                              <parentIds>5913092</parentIds>
                          </Term>
                          ...
                       </TermList>

All of the items may not be returned all of the time. Only the <name> is always returned. Terms may have multiple parents. In this case, the parent ids are a comma separated list.

getParents

              url: .../smd/OntologyService?func=getParents&ontologyId=18&term=hand
              url: .../smd/OntologyService?func=getParents&termId=5913205

A list of parents of the indicated term is returned. There are two forms of this function one taking an ontology Id and a term string and the other taking a term identifier. Both forms have equivalent function. A list of parents is returned as follows:

                       <TermList sourceId="5913092" uid="12">
                          <Term id="5913736">
                              <accession>MAE:0000813</accession>
                              <name>brain meninges</name>
                              <def>some definition</def>
                              <comment>a comment</comment>
                              <scientificName>some name, if any</scientificName>
                              <synonym>synonym if any</synonym>
			      <synonymAccession>MAE:0000xxx</synonymAccession>
                              <nChildren>6</nChildren>
                              <parentIds>5913092</parentIds>
                          </Term>
                          ...
                       </TermList>

All of the items may not be returned all of the time. Only the <name> is always returned. Terms may have multiple parents. In this case, the parent ids are a comma separated list.

getTermsByName

              url: .../smd/OntologyService?func=getTermsByName&ontologyId=18&term=bra

A list of terms matching the indicated partial term is returned. The partial term is interpreted as the term followed by a wildcard character matching zero or more characters. The wildcard character '*' may be included at the beginning of the partial term or embedded in the partial term. A list of terms matching the partial term are returned as follows:

                       <TermList sourceId="5913092" uid="12">
                          <Term id="5913736">
                              <accession>MAE:0000813</accession>
                              <name>brain meninges</name>
                              <def>some definition</def>
                              <comment>a comment</comment>
                              <scientificName>some name, if any</scientificName>
                              <synonym>synonym if any</synonym>
			      <synonymAccession>MAE:0000xxx</synonymAccession>
                              <nChildren>6</nChildren>
                              <parentIds>5913092</parentIds>
                          </Term>
                          ...
                       </TermList>

All of the items may not be returned all of the time. Only the <name> is always returned. Terms may have multiple parents. In this case, the parent ids are a comma separated list.

getRootTerms

              url: .../smd/OntologyService?func=getRootTerms&ontologyId=18

A list of terms indicated as the root(s) of ontology are returned as follows:

                       <TermList sourceId="5913092" uid="12">
                          <Term id="5913736">
                              <accession>MAE:0000813</accession>
                              <name>brain meninges</name>
                              <def>some definition</def>
                              <comment>a comment</comment>
                              <scientificName>some name, if any</scientificName>
                              <synonym>synonym if any</synonym>
			      <synonymAccession>MAE:0000xxx</synonymAccession>
                              <nChildren>6</nChildren>
                              <parentIds>5913092</parentIds>
                          </Term>
                          ...
                       </TermList>

An ontology may have more than one root. All of the items may not be returned all of the time. Only the <name> is always returned. Terms may have multiple parents. In this case, the parent ids are a comma separatedlist.

getAncestors

              url: .../smd/OntologyService?func=getAncestors&termId=54321

A list of terms indicating the ancestors of the indicated term is returned up to the root(s). Since a term may have multiple parents, all of the ancesters are returned. The parentIds of each term are also returned so that the caller may reassemble the terms into a DAG.

                       <TermList sourceId="5913092" uid="12">
                          <Term id="5913736">
                              <accession>MAE:0000813</accession>
                              <name>brain meninges</name>
                              <def>some definition</def>
                              <comment>a comment</comment>
                              <scientificName>some name, if any</scientificName>
                              <synonym>synonym if any</synonym>
			      <synonymAccession>MAE:0000xxx</synonymAccession>
                              <nChildren>6</nChildren>
                              <parentIds>5913092</parentIds>
                          </Term>
                          ...
                       </TermList>

An ontology may have more than one root. All of the items may not be returned all of the time. Only the <name> is always returned. Terms may have multiple parents. In this case, the parent ids are a comma separated list.

getDescendents

              url: .../smd/OntologyService?func=getDescendents&termId=54321

A list of terms indicating the descendents of the indicated term is returned down to the leaves. The parentIds of each term are also returned so that the caller may reassemble the terms into a DAG.

                       <TermList sourceId="5913092" uid="12">
                          <Term id="5913736">
                              <accession>MAE:0000813</accession>
                              <name>brain meninges</name>
                              <def>some definition</def>
                              <comment>a comment</comment>
                              <scientificName>some name, if any</scientificName>
                              <synonym>synonym if any</synonym>
			      <synonymAccession>MAE:0000xxx</synonymAccession>
                              <nChildren>6</nChildren>
                              <parentIds>5913092</parentIds>
                          </Term>
                          ...
                       </TermList>

All of the items may not be returned all of the time. Only the <name> is always returned. Terms may have multiple parents. In this case, the parent ids are a comma separated list.