Difference between revisions of "Sample Code Cookbook"

From NCBO Wiki
Jump to navigation Jump to search
(Fixing a link)
 
Line 29: Line 29:
  
 
'''I have a web form with text fields I would like to populate with ontology terms, e.g. to select relevant Gene Ontology terms.'''
 
'''I have a web form with text fields I would like to populate with ontology terms, e.g. to select relevant Gene Ontology terms.'''
* Use the Autocomplete widget (example for the Gene Ontology, http://bioportal.bioontology.org/ontologies/44532#widgets). Select the "Get Code" button for the code and instructions on how to add this Javascript to your web form.  If you would like to limit the terms to a subset of the Gene Ontology, create this subset and then load this ontology subset as a View of the Gene Ontology (http://bioportal.bioontology.org/ontologies/44532#views).  
+
* Use the Autocomplete widget ([http://bioportal.bioontology.org/ontologies/44532?p=widgets example for the Gene Ontology]). Select the "Get Code" button for the code and instructions on how to add this Javascript to your web form.  If you would like to limit the terms to a subset of the Gene Ontology, create this subset and then load this ontology subset as a View of the Gene Ontology (http://bioportal.bioontology.org/ontologies/44532#views).  
  
  

Latest revision as of 03:31, 18 September 2012

This page lists use cases and provides examples of how these questions can be answered using NCBO software (web services and widgets), and includes links to code samples and documentation.


Email us your Sample Code Cookbook request at bioontology-support _at_ lists.stanford.edu


I have a list of terms that were used to annotate a data set, how can I see if any of these terms exist in standard ontologies?


I would like to find all terms mapped from my ontology to other ontologies in BioPortal


I am the curator for a database and need to triage papers to identify which papers from PubMed are most related to my database and a good source of new information to add to my database


I have PubMed abstracts and want to link information in the abstracts to my database of interest.

  • Use the Annotator Web service. If your database of interest is included in the NCBO Resource Index you can search the database(s) for records that contain these terms. See http://www.bioontology.org/wiki/index.php/Resource_Index for more details on the Resource Index web service.


I have a web form with text fields I would like to populate with ontology terms, e.g. to select relevant Gene Ontology terms.


I would like to add the graph display of my ontology on my web site.


I would like to get all terms from an ontology and re-format the data to use in my own system.

I need to navigate through an ontology and traverse the ontology hierarchy for my software application, how can I use the Web services to do this?

  • Use the Get All terms Web service.
    • Example coming soon...

How can I limit the selection of ontologies used with the NCBO Annotator to a certain Category or Domain?

  • Use the List all ontologies and Get Groups/Domains Web service to identify the group/domain of interest.
    • Example coming soon...