oe2 tutorial 1010

Post on 02-Feb-2015

562 Views

Category:

Education

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Tutorial on ontology development in OBO-Edit, expressed in both OBO and OWL presented at the EBI in October 2010.

TRANSCRIPT

+

OBO-Edit tutorial

David Osumi-Sutherland, djs93@gen.cam.ac.ukFlyBase / Virtual Fly Brain / OBO-Edit Working Group

+Advantages of the OBO-Edit environment

Standardized system for annotating ontology terms: Definitions, comments, synonyms, references.

Intuitive graphical environment for browsing and editing ontologies.

Term ID tracking though renames, merges and obsoletion. Essential for keeping annotations in an RDB up-to-date with

an evolving ontology.

Sophisticated compound search & query systems. When used with term renders, these are very useful for

tracking editing progress.

+Disadvantages of the OBO-Edit environment

Less expressive than OWL: No nested class level expressions No negation No functional properties No property chains

Slower reasoning

+OBO and OWL - now

Golbriech and Horrocks translation* works for most purposes.

Protégé 4 can open OBO files Standard translation built in to OWL-API and Protégé 4, based on

Golbriech and Horrocks. Use OWL reasoners as a quick way of

testing consistency running queries

* http://www.comlab.ox.ac.uk/people/ian.horrocks/Publications/download/2007/GoHo07a.pdf

+OBO and OWL – in future

Future development plans for OBO-Edit include much closer integration with OWL and Protege 4 Improved translations:

New official OBO <-> OWL ID conversion Official OBO foundry OBO <-> OWL translation will be

part of the OBO 1.4 spec. OWL reasoners in OBO-Edit (?)

Already working in experimental versions of OBO-Edit Plugins for Protégé 4 to produce a more OBO-type

environment within Protégé (?).

+What is an ontology ?

A classification: e.g.

A ‘Johnston organ neuron’ is a type of ‘mechanosensory neuron’

A ‘mechanosensory neuron’ is a type of ‘sensory neuron’ Efficient and scalable - as long as you follow good

engineering principles.

A query-able store of (scientific) knowledge e.g.-

Every ‘Johnston organ neuron’ has a dendrite that terminates in a ‘Johnston organ’ and has an axon that innervates the ‘AMMC’.

Efficient and scalable - as long as you follow good engineering principles.

+What is an ontology ?

The scientific knowledge an ontology contains can make the reasons for classification explicit. e.g.

Any neuron that functions in the transduction of signals involved in sensory perception is a sensory neuron

Any neuron that functions in the transduction of mechanosensory signals involved in sensory perception is a mechanosensory neuron.

The transduction of mechanosensory signals involved in sensory perception is a type of transduction of signals involved in sensory perception

Therefore all mechanosensory neurons are sensory neurons.

+What is an (OBO) ontology ?

An ontology contains terms

Terms refer to types (classes)

Types are classifications of things (instances) in the real world, based on some set of criteria. My left hand is an instance of the type

hand

The criteria for class membership is recorded using textual definitions, at least some elements of which are formalized as relationships. name: hand def: “An anatomical structure that has

four fingers and a thumb and is attached to the end of an arm.” [reference: DOS]

relationship: hand has_part finger relationship: hand has_part thumb relationship: part_of arm Image from Gray’s Anatomy (copyright expired)

+Why should you use ontologies?

As a way to standardize meta-data: Standardized meanings for metadata make mapping between

databases much easier. Written definitions with references

ensure accurate manual annotation make assertions of scientific fact trace-able serve as documentation for future ontology

developers Classification can be used to group and search annotations.

e.g.- given the classifications: Johnston organ neuron is a type ot mechanosensory

neuron. mechanosensory neuron is a type of sensory neuron

A query for all annotations of sensory neuron could find annotations with the terms Johnston organ neuron and mechanosensory neuron.

+Why should you use ontologies?

As a store of scientific knowledge e.g.

The Drosophila brain is a highly intricate structure of ~100,000 neurons. How can we keep track of their many properties? innervation and fasciculation patterns neurotransmitter function location of soma lineage

An ontology with formal and textual definitions and links to the literature provides a scalable, query-able structure for storing this information.

+OBO basics- instance/type distinction If OBO terms refer to types, why worry about instances?

instances are central to defining OBO type-level relations

OBO <-> OWL: OWL class = OBO type OWL individual = OBO instance OWL SubClassOf = OBO is_a

+OBO relations Instance level relations (by convention

written in bold) 'my left little finger' part_of 'my left hand’

To relate types, we need quantifiers:

∀: for all, all, only, every ∃: there exists, some

e.g. Every ‘left little finger’ part_of some

hand* In OBO, we use type level relations (by

convention written in italics), burying the quantifiers in the relation definition.

In OWL: instance level relations = properties. Quantifiers are stated explicitly when

relating classes

*This is a simplification, ignoring the time component of the OBO relations definitions. Image from Gray’s Anatomy (copyright expired)

+Quantifiers

It is critical to be aware of the direction of quantifiers when using OBO relations:

True: All breasts are part of some human

False: All humans have breasts

True: All vertebrate motor neurons release neurotransmitter acetylcholine

False: All neurons that release acetylcholine are vertebrate motor neurons.

Be especially careful in cases where the instance level relation is symmetric:

True: Every lion’s mane connected_to some lion’s neck

False: Every lion’s neck connected_to some lion’s mane

+Relationships formalize elements of a definition.

We can formally record necessary conditions for class membership. e.g. to state that a necessary condition of being in the class

finger is to be part of some hand: OBO:

name: finger relationship: part_of hand

OWL: finger SubClassOf (part_of some hand)

+Relationships formalize elements of a definition.

We can formally record necessary and sufficient conditions for class membership. e.g. To state that every neuron that releases the

neurotransmitter acetylcholine is a cholinergic neuron OBO:

name: cholinergic neuron intersection_of: neuron intersection_of: releases_neurotransmitter

acetylcholine OWL:

‘cholinergic neuron’ EquivalentTo: (neuron and releases_neurotransmitter some acetylcholine)

+Some simple reasoning

U neuron part_of larval antennal segment (All U neuron part_of some larval antennal segment)

U1 neuron is_a U neuron

therefore U1 neuron part_of larval antennal segment (All U neuron part_of some larval antennal segment;

U1 neuron SubClassOf U neuron therefore…)

+Multiple inheritance needed

name: ORN ab1a def: A cholinergic olfactory neuron whose dendrite

innervates an ab1 basiconic sensillum on the 3rd segment of the antenna. Like other antennal olfactory neurons, it sends an axon through the antennal nerve that innervates a single antennal lobe glomerulus DL1 is_a: olfactory neuron is_a: cholinergic neuron is_a: antennal sensory neuron is_a: DL1 innervating neuron

+Ways to classify neurons

sensory sensory modality sense organ

motor interneuron

local relay

neurotransmitter serotonergic, dopaminergic…

Location cell body fasciculation pattern innervation pattern

all siblings in the same color are (probably) disjoint_from each other.

+

• It is difficult to keep track of multipleclassification chains to:

• ensure completeness;• avoid redundancy;• avoid introducing error due to inheritance of classification criteria from a distant ancestor

Multiple inheritance is very hard to manage by hand

+Automating multiple inheritance

Formal necessary and sufficient definitions + a reasoner

=> automatic (and therefore manageable) classification

+Some simple reasoning

‘sensory neuron’ EquivalentTo; neuron and has_function_in some ‘detection of stimulus

involved in sensory perception’

‘sensory neuron’ EquivalentTo: neuron and has_function_in some ‘detection of mechanical

stimulus involved in sensory perception’

‘detection of mechanical stimulus involved in sensory perception’ is_a (SubClassOf) ‘detection of stimulus involved in sensory perception’

Therefore ‘mechanosensory neuron’ is_a (SubClassOf) ‘sensory neuron’

+Error checking

Some classes don’t overlap. Nothing can be an oak tree and a fruit fly; an anatomical structure and a biological process. We say that such classes are disjoint

Declaring classes to be disjoint allows reasoners to find contradictions.

OBO <-> OWL OBO disjoint_from = OWL DisjointWith

+

Demo – OBO-Edit basics

+Basic OBO-Edit2 editing setup

- 2 x Ontology Tree Editor (OTE)

- One parent editor

- One text editor

- One search panel

- One reasoner manager

- One graph viewer (Note – in OE2.1, only works with Link Pile Reasoner on)

+

+

+Brief discussion of tutorial ontology

+

Browsing

+ Browsing - Trees

The ontology tree editor is a good way to browse down the ontology graph, but not all are parents visible in one view

Click to expand or contract branch

+

Preferences

help

save a picture

Quick Filtering

+

+ Browsing - parents

The parent editor provides a quick way to check all parental relationships – usually these are not all visible in a single tree view

+ Browsing - graphsA good way to view and browse ancestral relationships, graphs of ancestors via transitive relations answer questionse.g.- what is X? What is X part of? What does X develop from?

Note – in version 2.1 beta, requires link pile reasoner to be turned on.

+

Preferences

help

save a picture

+ Graph viewer setup

For an uncluttered view:

+ Browsing – The Text Editor

+ Browsing - Graph Editor

+

Right click provides editing options and hide-all

Choosing quick filtering => manageable view

Hide parent terms show parent terms

Hide child terms show child termshide term

Browsing - Graph Editor

+ Basic Searching - single leg

+Basic searching – multi-leg

Add new leg

AND/OR

Remove legnesting (parentheses)

+ All searches can also be filters or renders

+

Editing

+ The ontology tree editor menu

Right clicking on the ontology tree editor prompts an extensive editing menu:

+ Global vs local selection modes

local mode-selection in other

components doesn’t affect selection here

global mode- 2 way auto

sync with other components

+Drag and drop editing in the ontology tree editor (OTE) Left clicking a term chooses it

Right clicking displays a menu of editing options

Dragging and dropping single or multiple terms allows terms to be copied, moved or merged.

+ Drag and drop term move

+ Drag and drop term move

+ Drag and drop term move

+

Drag and drop term merge

+

+ Making new terms

First, make sure your ID generator is set up correctly:

Edit profile

ID prefix ID length start from end at

+Create new child

Note standard fields for: definition

definition reference

synonyms synonym scope synonym

reference

+Committing

Check this box to commit text edits automatically.

Note, committing will not change your ontology file

+Deletion, obsoletion, destruction

… deletes the relationship between the selected term and its immediate parent in the ontology tree editor. When the selected term has only one parent, this option switches to:

OTE – right click menu:

… changes the status of term to obsolete. The OBO file retains the ID for future reference and to prevent re-use. To indicate replacement terms, drag suitable terms to the obsoleted term=>

Within the context of a single editing session, or a pre-release file, you may wish instead to destroy the term completely (BUT BE CAREFUL!)

+Parent EditorDelete parent relationship

Does what it says. But be careful it adds is_a parents by default. For other relations, switch after adding

+

Managing multiple inheritance

+Relationships formalize elements of a definition. (recap)

We can formally record necessary and sufficient conditions for class membership. e.g. To state that every neuron that releases the

neurotransmitter acetylcholine is a cholinergic neuron OBO:

name: cholinergic neuron intersection_of: neuron intersection_of: releases_neurotransmitter

acetylcholine OWL:

‘cholinergic neuron’ EquivalentTo: (neuron and releases_neurotransmitter some acetylcholine)

+Necessary and sufficientdefinitions

Choose the term 'antennal sensillum' Check out the text editor cross product tab

Turn the reasoner off. You should see antennal sensillum at the root

Run the rule-based-reasoner check out how the term is integrated non-redundantly into

the classification hierarchy. view the parent editor

+Error checking - recap

Some classes don’t overlap. Nothing can be an oak tree and a fruit fly; an anatomical structure and a biological process. We say that such classes are disjoint

Declaring classes to be disjoint allows reasoners to find contradictions.

OBO <-> OWL OBO disjoint_from ≅ OWL DisjointWith

+Using the reasoner to check for disjoint violations - demo In the test ontology, make one of the children of

biological process an is_a child of sensillum.

Now run the link pile reasoner

This should prompt an error report

Undo

+Disjoint declarations

Use drag and drop editing and declare terms disjoint as you would assert a relationship:

Or make declare all is_a children of a specified term disjoint:

+Using terms form other ontologies

The test ontology we are using contains terms imported* from other ontologies: GO and CHEBI.

We can use the structure of existing, well maintained ontologies, such as GO and CHEBI, to automate classification of anatomical structures.

Using terms from other ontologies cholinergic neuron olfactory sensillum

*Strategies for importing terms are not covered in this tutorial, please ask me for details if you are interested.

+Making new cross product terms

Add a new root class:

+More necessary and sufficient definitions

Making new cross products glutamatergic neuron taste sensillum chemosensory sensillum

Re-run the rule-based-reasoner

Check the sensillum hierarchy Explain how olfactory sensillum got its parent

+Useful renders for working with cross-products Cross-Product detector:

• Multiple asserted inheritance detector:

• Unclassified term detector:

• Incompletely classified term detector:

+Detecting redundancy with the reasoner

Redundant relationship

Use the Rule Base Reasoner*

*Link pile reasoner over-flags redundancy when cross-product terms are present

+Instantiating inferred is_a for release If your users are not using your ontology with a

reasoner, you may need to pre-reason for them.

To do this, you can use the ‘save implied links’ function in the save interface:

+Advanced Searching

OE2 can combine string searching and logical querying.

Logical querying requires the reasoner to be turned on.

+ Logical queries

The first leg of the search finds all subtypes of sensillum. The second leg finds all parts of the head. The ‘matches all’ radio button ensures the two legs are combined by a boolean AND.

OWL-DL: sensillum and part_of some head

** Note – reasoner required **

Find all sensilla that are part of some head:

+Logical queries

How is sensillum classified?

What does adPN DL1 develop_from ?

Note – this query has no OWL-DL equivalent

** Note – reasoner required **

+Acknowledgements – OBO-Edit developers Current developers

Amina Abdulla Chris Mungall Jennifer Deegan

Former developers John Day-Richter Nomi Harris

+Acknowledgements – OBO-Edit Working Group

Amina Abdulla, Chris Mungall, Suzanna Lewis, - BBOP, LBNL, Berkeley, CA, USA Midori A. Harris, Jennifer Deegan, Amelia Ireland, Jane Lomax - GO-EBI, Hinxton, UK David Hill, Alexander D. Diehl, Harold Drabkin, Terry Meehan - MGI, The Jackson

Laboratory, Bar Harbor, ME, USA Karen R. Christie - SGD, Department of Genetics, Stanford University, Stanford, CA,

USA Tanya Berardini - TAIR, Carnegie Institution, Department of Plant Biology, Stanford,

CA, USA Petra Fey - DictyBase, Northwestern University, Chicago, IL, USA Carol A. Bastiani, Ranjana Kishore - WormBase, California Institute of Technology,

Pasadena, CA, USA Victoria Petri - RGD, Medical College of Wisconsin, Milwaukee, WI, USA Colin Batchelor- Royal Society of Chemistry, Cambridge UK Shuly Avraham - Cold Spring Harbor Laboratory, Cold Spring Harbor, NY Pankaj Jaiswal - Gramene, Department of Plant Breeding, Cornell University, Ithaca,

NY, USA John Osborne - Robert H. Lurie Cancer Center, Northwestern University, Chicago, IL,

USA

+Acknowledgments

Michael Ashburner

FlyBase (NHGRI)

Virtual Fly Brain (BBSRC)

EBI industry programme

+Slides showing features not demonstrated in tutorial

+Time savers

Cloning Right click clone option makes clone of chosen term –

identical in every way except for ID and ‘CLONE OF’ appended to term name

Create multiple children Right click ‘create multiple children’ option. Does what is

says on the box. Pops up interface were a bunch of new terms can be named at once.

+Combining Cross-Products with relationships => hidden assertions How could we record the generalization – All neurons with

the function ‘smell’ are cholinergic? name: olfactory receptor neuron intersection_of: neuron intersection_of: has_function smell relationship: releases_neurotransmitter acetylcholine (OWL: EquivalentTo( neuron and has_function some smell ),

SubClassOf( releases_neurotransmitter some acetylcholine )

Why is this potentially dangerous? Future editors using ‘has_function smell’ to record the function of a neuron

class may not be aware that they are adding the assertion that the class is cholinergic

Safeguards: if neurons classifed by neurotransmitter are disjoint, the reasoner can flag

contradictions. Keep a record of all examples (perhaps as a standardized comment) State this assertion in the term definition with a link to a supporting

reference.

+If the reasoner is flagging relationships you don’t think are redundant Are you sure your intended meaning for a relationship is

transitive? e.g.- develops_from (transitive) is sometimes used as if it means

‘directly develops from’ (non-transitive) In that case – request a new relation.

If you are interested in how to link relations such as develops_from and develops_directly_from so that they can be used for reasoning, please ask me or Chris after the tutorial

+Importing foreign ‘helper’ terms

Formalising definitions is likely to require terms from other ontologies.

If you want to reason using the classification from another ontology, you need to import the full classification of each term.

In order to keep up-to-date, you need a mechanism to re-import the foreign terms you use.

+Creating and maintaining a helper term filter

Load / Save

First leg finds helper term

2nd leg finds terms that classify helper term

1. Open foreign ontology and run the rule based reasoner2. In the search tool, add the following two filter legs for each helper term

3. Save filter for future maintenance / use as a save filter

+Saving helper terms

+Saving helper terms

Check filter terms

Make sure “allow dangling parents” is NOT checked

Record version of foreign ontology here Avoid importing foreign ID rules

+Saving helper terms

Load helper term filter

+Refreshing helper terms

The examples I’ve shown here use term names.

This make the filter easy to read and edit, but names often change.

Therefore more sustainable to use IDs instead.

top related