oe2 tutorial 1010

83
+ OBO-Edit tutorial David Osumi-Sutherland, [email protected] FlyBase / Virtual Fly Brain / OBO-Edit Working Group

Upload: dosumis

Post on 02-Feb-2015

562 views

Category:

Education


2 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Oe2 tutorial 1010

+

OBO-Edit tutorial

David Osumi-Sutherland, [email protected] / Virtual Fly Brain / OBO-Edit Working Group

Page 2: Oe2 tutorial 1010

+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.

Page 3: Oe2 tutorial 1010

+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

Page 4: Oe2 tutorial 1010

+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

Page 5: Oe2 tutorial 1010

+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é (?).

Page 6: Oe2 tutorial 1010

+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.

Page 7: Oe2 tutorial 1010

+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.

Page 8: Oe2 tutorial 1010

+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)

Page 9: Oe2 tutorial 1010

+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.

Page 10: Oe2 tutorial 1010

+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.

Page 11: Oe2 tutorial 1010

+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

Page 12: Oe2 tutorial 1010

+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)

Page 13: Oe2 tutorial 1010

+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

Page 14: Oe2 tutorial 1010

+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)

Page 15: Oe2 tutorial 1010

+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)

Page 16: Oe2 tutorial 1010

+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…)

Page 17: Oe2 tutorial 1010

+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

Page 18: Oe2 tutorial 1010

+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.

Page 19: Oe2 tutorial 1010

+

• 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

Page 20: Oe2 tutorial 1010

+Automating multiple inheritance

Formal necessary and sufficient definitions + a reasoner

=> automatic (and therefore manageable) classification

Page 21: Oe2 tutorial 1010

+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’

Page 22: Oe2 tutorial 1010

+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

Page 23: Oe2 tutorial 1010

+

Demo – OBO-Edit basics

Page 24: Oe2 tutorial 1010

+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)

Page 25: Oe2 tutorial 1010

+

Page 26: Oe2 tutorial 1010

+

Page 27: Oe2 tutorial 1010

+Brief discussion of tutorial ontology

Page 28: Oe2 tutorial 1010

+

Browsing

Page 29: Oe2 tutorial 1010

+ 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

Page 30: Oe2 tutorial 1010

+

Preferences

help

save a picture

Quick Filtering

Page 31: Oe2 tutorial 1010

+

Page 32: Oe2 tutorial 1010

+ 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

Page 33: Oe2 tutorial 1010

+ 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.

Page 34: Oe2 tutorial 1010

+

Preferences

help

save a picture

Page 35: Oe2 tutorial 1010

+ Graph viewer setup

For an uncluttered view:

Page 36: Oe2 tutorial 1010

+ Browsing – The Text Editor

Page 37: Oe2 tutorial 1010

+ Browsing - Graph Editor

Page 38: Oe2 tutorial 1010

+

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

Page 39: Oe2 tutorial 1010

+ Basic Searching - single leg

Page 40: Oe2 tutorial 1010

+Basic searching – multi-leg

Add new leg

AND/OR

Remove legnesting (parentheses)

Page 41: Oe2 tutorial 1010

+ All searches can also be filters or renders

Page 42: Oe2 tutorial 1010

+

Editing

Page 43: Oe2 tutorial 1010

+ The ontology tree editor menu

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

Page 44: Oe2 tutorial 1010

+ 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

Page 45: Oe2 tutorial 1010

+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.

Page 46: Oe2 tutorial 1010

+ Drag and drop term move

Page 47: Oe2 tutorial 1010

+ Drag and drop term move

Page 48: Oe2 tutorial 1010

+ Drag and drop term move

Page 49: Oe2 tutorial 1010

+

Drag and drop term merge

Page 50: Oe2 tutorial 1010

+

Page 51: Oe2 tutorial 1010

+ Making new terms

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

Edit profile

ID prefix ID length start from end at

Page 52: Oe2 tutorial 1010

+Create new child

Note standard fields for: definition

definition reference

synonyms synonym scope synonym

reference

Page 53: Oe2 tutorial 1010

+Committing

Check this box to commit text edits automatically.

Note, committing will not change your ontology file

Page 54: Oe2 tutorial 1010

+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!)

Page 55: Oe2 tutorial 1010

+Parent EditorDelete parent relationship

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

Page 56: Oe2 tutorial 1010

+

Managing multiple inheritance

Page 57: Oe2 tutorial 1010

+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)

Page 58: Oe2 tutorial 1010

+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

Page 59: Oe2 tutorial 1010

+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

Page 60: Oe2 tutorial 1010

+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

Page 61: Oe2 tutorial 1010

+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:

Page 62: Oe2 tutorial 1010

+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.

Page 63: Oe2 tutorial 1010

+Making new cross product terms

Add a new root class:

Page 64: Oe2 tutorial 1010

+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

Page 65: Oe2 tutorial 1010

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

• Multiple asserted inheritance detector:

• Unclassified term detector:

• Incompletely classified term detector:

Page 66: Oe2 tutorial 1010

+Detecting redundancy with the reasoner

Redundant relationship

Use the Rule Base Reasoner*

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

Page 67: Oe2 tutorial 1010

+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:

Page 68: Oe2 tutorial 1010

+Advanced Searching

OE2 can combine string searching and logical querying.

Logical querying requires the reasoner to be turned on.

Page 69: Oe2 tutorial 1010

+ 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:

Page 70: Oe2 tutorial 1010

+Logical queries

How is sensillum classified?

What does adPN DL1 develop_from ?

Note – this query has no OWL-DL equivalent

** Note – reasoner required **

Page 71: Oe2 tutorial 1010

+Acknowledgements – OBO-Edit developers Current developers

Amina Abdulla Chris Mungall Jennifer Deegan

Former developers John Day-Richter Nomi Harris

Page 72: Oe2 tutorial 1010

+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

Page 73: Oe2 tutorial 1010

+Acknowledgments

Michael Ashburner

FlyBase (NHGRI)

Virtual Fly Brain (BBSRC)

EBI industry programme

Page 74: Oe2 tutorial 1010

+Slides showing features not demonstrated in tutorial

Page 75: Oe2 tutorial 1010

+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.

Page 76: Oe2 tutorial 1010

+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.

Page 77: Oe2 tutorial 1010

+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

Page 78: Oe2 tutorial 1010

+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.

Page 79: Oe2 tutorial 1010

+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

Page 80: Oe2 tutorial 1010

+Saving helper terms

Page 81: Oe2 tutorial 1010

+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

Page 82: Oe2 tutorial 1010

+Saving helper terms

Load helper term filter

Page 83: Oe2 tutorial 1010

+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.