Difference between revisions of "Graph Widget Tutorial OWL"

From Protege Wiki
Jump to: navigation, search
(incremental save of new content)
(incremental save of new work)
Line 49: Line 49:
 
<li>Open Protege-OWL and load the example clinical trial ontology project (ClinicalTrialOntologyLite.pprj).</li>
 
<li>Open Protege-OWL and load the example clinical trial ontology project (ClinicalTrialOntologyLite.pprj).</li>
  
<li style="padding-top: 5px;">On the OWLClasses tab, notice that we have a class entitled "ScheduleOfActivities", which is intended to model various activities that will take place during the trial.  Another class to take note of is the "Clinical_Trial_Facility" class, which represents a medical facility that participants will visit.</li>
+
<li style="padding-top: 5px;">On the OWLClasses tab, notice that we have a class entitled "ScheduleOfActivities", which is intended to model various activities that will take place during the trial.  Another class to take note of is the "Clinical_Trial_Visit" class, which represents a participant's visit to a clinical trial facility during the trial.</li>
  
<li style="padding-top: 5px;">Navigate to the Properties tab and create a new object property called "has_planned_visits" with ScheduleOfActivities as the domain and Clinical_Trial_Facility as the range. To follow is a screenshot of Protege-OWL after completing this step:
+
<li style="padding-top: 5px;">Navigate to the Properties tab and create a new object property called "has_planned_visits" with ScheduleOfActivities as the domain and Clinical_Trial_Visit as the range. To follow is a screenshot of Protege-OWL after completing this step:
 
<br /><br />
 
<br /><br />
 
[[Image:Graph-widget-tutorial_properties-tab.jpg]]
 
[[Image:Graph-widget-tutorial_properties-tab.jpg]]
Line 71: Line 71:
 
</li>
 
</li>
 
</ol>
 
</ol>
 +
 +
=== Configure node appearance ===
 +
 +
Nodes are the objects that appear in the palette on the left-hand side of the graph widget.  There will be one node in the palette for each class in the range of the has_planned_visits property (or whatever property is configured to use the graph widget).  In this example, the range only has one class, which is the "Clinical_Trial_Visit" class.  As such, the palette contains one node to represent this class.  Later, we will look at a more complicated example that has multiple nodes in the palette.
 +
 +
By default, the graph widget assigns all nodes the same shape and color. To change the node shape and color or the text properties of the node's labels:
 +
 +
* Double-click on the has_planned_visits property to bring up the graph widget configuration dialog.
 +
* Select the Nodes tab.
 +
 +
Screenshot of the graph widget configuration dialog:
 +
<br /><br />
 +
[[Image:Graph-widget-tutorial_config-dialog.jpg]]
 +
<br /><br />

Revision as of 15:23, March 20, 2008


Graph Widget Tutorial for OWL Ontologies


This tutorial assumes a basic working knowledge of Protege-OWL.



What is the graph widget?

The graph widget is a custom property widget that serves as an alternative to Protege Forms for creating and/or populating individuals in Protege-OWL. It is particularly useful in the following scenarios:

  • visual editing of individuals and relationships between individuals
  • visualizing networks of individuals
  • visualizing relationships between individuals
  • speeding up knowledge acquisition in ontologies with heavily interconnected concepts
  • viewing data that resembles process diagrams, flow charts, organizational charts, etc.


A few words about Protege Forms

Before learning to use the graph widget, it is important to understand the concept of a Protege Form.

For each class in your ontology, Protege-OWL generates a default form that can be used to enter data for individual members of the class. Forms contain a data entry field, or "widget" for each property of an individual. There are different types of widgets to handle the various property types, e.g., Protege-OWL assigns a "MultiLiteralWidget" to datatype properties of type string, a "SingleLiteralWidget" for functional datatype properties of type string, etc.

If you do not like the property widgets that Protege-OWL assigns by default, you can customize individual forms on the Forms tab. Please note that the graph widget is only allowed for object properties that accept multiple values (non-functional).


Download example ontology

For the purposes of this tutorial, we will use a simplified version of a clinical trial ontology developed by Ravi Shankar at BMIR. For the most part, the concepts in this ontology are self-explanatory. To follow are some definitions of class names that may be less obvious at first glance:

  • Aliquot – a measured portion of a sample taken for analysis
  • Assay – a laboratory test to find and measure the amount of a specific substance
  • Specimen_Protocol – protocol for handling a specimen in a clinical trial

In order to follow along with the tutorial in Protege-OWL, please download a copy of the example clinical trial ontology.


Get started using the graph widget

There are a couple of different scenarios in our example ontology that are good candidates for wanting to use the graph widget for knowledge acquisition. The first scenario is the idea that during the course of a clinical trial, a participant will make multiple visits to a clinical trial facility. This is something that could be represented by a simple sequence diagram, i.e., one visit, followed by another visit, followed by another visit, etc. In the following sections, we will perform the necessary steps in Protege-OWL to configure and use the graph widget.

Create the has_planned_visits property

  1. Open Protege-OWL and load the example clinical trial ontology project (ClinicalTrialOntologyLite.pprj).
  2. On the OWLClasses tab, notice that we have a class entitled "ScheduleOfActivities", which is intended to model various activities that will take place during the trial. Another class to take note of is the "Clinical_Trial_Visit" class, which represents a participant's visit to a clinical trial facility during the trial.
  3. Navigate to the Properties tab and create a new object property called "has_planned_visits" with ScheduleOfActivities as the domain and Clinical_Trial_Visit as the range. To follow is a screenshot of Protege-OWL after completing this step:

    Graph-widget-tutorial properties-tab.jpg

Configure the has_planned_visits property to use the graph widget

  1. Navigate to the Forms tab and select the ScheduleOfActivities form in the Form Browser pane on the left.
  2. In the Form Editor pane on the right, select the has_planned_visits property. Protege-OWL will outline the property in green once it is selected.
  3. Select "GraphWidget" from the "Selected Widget Type" drop-down box in the upper right-hand side of the Form Editor pane. To follow is a screenshot of Protege-OWL after completing this step:

    Graph-widget-tutorial forms-tab.jpg

Configure node appearance

Nodes are the objects that appear in the palette on the left-hand side of the graph widget. There will be one node in the palette for each class in the range of the has_planned_visits property (or whatever property is configured to use the graph widget). In this example, the range only has one class, which is the "Clinical_Trial_Visit" class. As such, the palette contains one node to represent this class. Later, we will look at a more complicated example that has multiple nodes in the palette.

By default, the graph widget assigns all nodes the same shape and color. To change the node shape and color or the text properties of the node's labels:

  • Double-click on the has_planned_visits property to bring up the graph widget configuration dialog.
  • Select the Nodes tab.

Screenshot of the graph widget configuration dialog:

Graph-widget-tutorial config-dialog.jpg