wiki:simpleTutorial
Last modified 7 years ago Last modified on 08/25/10 18:22:32

VIQUEN: A Visual Query Engine for RDF

Tutorial 1: Extracting information from the Foundational Model of Anatomy (FMA)

In part 1 of this tutorial, you will work through constructing a simple query which will extract information from the Foundational Model of Anatomy (FMA) ontology. Specifically, we are going to extract a tree subgraph from the FMA, starting at the "Brain" node, and extracting all of the regional parts of the brain, and all of their regional parts, and so on, until we reach the leaves of the ontology.

In parts 2 and 3, you will execute this query and then visualize and explore the extracted information as a graph.

Part 1: Formulating the query

(Click here for Part 2: Executing the query)
(Click here for Part 3: Visualizing the query results)

To return to the main VIQUEN documentation page, click here.

Step 1 - Starting the application

Start up VIQUEN from the directory in which you installed the application. You will see the query-building environment with an empty workspace.

Step 2 - Opening a saved file

We will now open the query workspace for this tutorial.
At the top of the screen, click on the "File" menu and choose "Open File". Alternatively, click on the "Open" toolbar icon . Navigate to the VIQUEN Tutorials directory and select the "tutorial1.mxe" file. Click on it and then click "Open file".
You should now see the following query workspace.



This simple query has 4 operations and consists of a single query block. The "Start" operation indicates the point from which the query will be compiled. Following this, the "Input" operation contains the input data sources for the query. The "Extract Tree" operation then specifies the information that we wish to extract from these input data sources, and the "Output" operation identifies the output graph of this query block. Each of these operations is connected to the next by a directed edge. These edges indicate the next operation in the query-building sequence.

We will now examine each of these operations in a little more detail.

Step 3 - The "Start" node: moving, collapsing and expanding nodes


Click on the "Start" node. The edges of the node will become highlighted to indicate that the node is selected.
Click and drag the "Start" node. This will move the node in the workspace. Note that the edge connected to the "Start" node is automatically updated when the node is moved.
Click on the minimize button (-). This will collapse the node.
Click on the maximize button (+). This will expand the node to its original size.
It is a good idea to keep nodes collapsed when you are not working on them since this will prevent accidental modification of the query parameters.

Now try moving, collapsing and expanding the other nodes in the workspace.

Step 4 - The "Input" node: choosing input data sources


Click on the "Select input sources" button. This will open the following window, which shows the available data sources.


Now you can select the input data sources for the query. This query will only use the FMA, so make sure that the checkbox corresponding to FMA is selected, and close the input sources window to return to the query-building workspace.

Step 5 - The "Extract Tree" node: specifying information to extract


We will now specify the query parameters for extracting information from the FMA. We are going to extract a tree subgraph from the FMA. Specifically, we want to start at the "Brain" node, and extract all of the regional parts of the brain, and all of their regional parts, and so on, until we reach the leaves of the ontology.

Notice that we have an "Extract Tree" operation, which fits our needs for extracting the tree subgraph.
Set the selected "From Graph" to "fma", since this is the graph we want to extract information from.
Set the "Root" to "fma:Brain" since this is the node from which to build the tree subgraph. (To extract a different subgraph, you could change this to something else, for example, "fma:Liver" or "fma:Stomach".)
The table specifies the properties that we wish to follow in constructing the tree. We need one row, with the "property" set to "fma:regional_part" and "direction" set to "outgoing", since we want to follow the edges going out from the "fma:Brain" node.

[Note that since we do not have any unknown variables, we do not need to specify any WHERE clause for this query.]

Step 6 - The "Output" node: identifying the output graph


This node specifies the name of the output graph for this query block. By default, it is set to "http://localhost/set1". You may change this to be any location that you desire.

This output graph may also be added as a data source to the workspace and may then be used as an input source for another query block. To do this, click on the "Add to data sources" button. You will see the following window. Note that the output graph has been added to the list of data sources. By default, the namespace for the graph is set to "Output1". You may change this to be any name that you desire.


Close the data sources window to return to the main query-building workspace.

Step 7 - Compiling the query

You are now ready to compile and execute the query. Click on the "compile query" button , located in the main toolbar, to open the execution environment.

Click here to go to Part 2: Executing the query

Attachments