35
Review of OWL for Review of OWL for Biomedicine - II Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs .man.ac. uk Open GALEN BioHealth Informatics Group © University of Manchester

Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester [email protected] OpenGALEN BioHealth Informatics Group © University

Embed Size (px)

Citation preview

Page 1: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

Review of OWL for Review of OWL for Biomedicine - IIBiomedicine - IIAlan Rector & CO-ODE/NIBHI

University of Manchester

[email protected]

Open GALEN

BioHealthInformaticsGroup

© University of Manchester

Page 2: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 2

Pneumonia, Pneumonitis, Pneumonia, Pneumonitis, and Infectionand Infection

► “Pneumonia” is really an infection not just an inflammation.

► At least according to most dictionaries - again separate words and meaning.

► “Pneumonitis” is more properly an inflammation of the lung

► Pneumonia is an inflammation of the lung caused by an infection

► And if we want to be more pedantic we might want to make inflammation something like ‘generalised inflammation’ to distinguish it from abscess, ulcer, and other inflammatory processes

► SNOMED-CT doesn’t bother

► What granularity depends on application

Page 3: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 3

So define “Pneumonitis”So define “Pneumonitis”extend the definition of extend the definition of PneumoniaPneumoniaAdd infectious pneumonitisAdd infectious pneumonitis

Pneumonitis

Infectious pneumonitis

Pneumonia redefined

Page 4: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 4

ClassifyClassify

► “Pneumonia” ≡ “Infectious_pneumonitis”► As it should be. The two definitions are equivalent

► Pure_bacterial_pneumonia is inconsistent► Why?

Page 5: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 5

Look for yourselfLook for yourself

► Hint: ► Bugs after re-arranging the ontology are most often due to

violation of disjoint axioms

► Use OwlViz to check disjoints

Page 6: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 6

Using OwlViz to track disjointsUsing OwlViz to track disjoints

Infection and Bacterium

are disjoint

Page 7: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 7

Or use the debugger:Or use the debugger:‘Heuristic” but usually finds the ‘Heuristic” but usually finds the

problemproblem ► Text from Debugger

► The universal restriction means that all relationships along hasCause must be to individuals that are members of Bacterium However, the existential restriction means that there must be at least one relationship to an individual from Infection, which is disjoint from Bacterium.

► Display from debugger

Page 8: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 8

What to doWhat to do

► Bacterium and Infection are clearly disjoint► Do not want to distort the ontology

► Therefore must change the restrictions

► What causes what► Inflammation is has_causal_process SOME

Infection has_causitive_agent SOME Bacterium

► has_cause is clearly too broad a property

► Things can have a causal process by agents or processes

► Processes can have a causitive agent

►(Might want “creative blurring” and to allow Things to have causitive agents - but leave that for later.)

Page 9: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 9

Modify Properties and Modify Properties and definitions to egdefinitions to eg

► Mixed Pneumonia

► Pure_bacterial_pneumonia

► Properties

Page 10: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 10

Classify and re-run unit testsClassify and re-run unit tests

► NB: failures spurious - only checks for direct superclasses. To be fixed RSN.

Page 11: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 11

Anonymous and named Anonymous and named classesclasses

► OWL allows a choice of either anonymous embedded classes (bracketing)

► Either: Pneumococcal_pneumonia is a Pneumonia THAT has causitive process some Infection THAT has causitive agent Pneumococcus

► Or: Pneumococcal_pneumonia is a Pneumonia THAT has causitive process some Pneumococcal_infection

► And: Pneumococcal_infection is an Infection THAT has causitive agent Pneumococcus

Page 12: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 12

The meaning is the same,The meaning is the same,… but beware… but beware

► It is easy to create subtly different concepts when using named notions

► The naming can hide the bracketing

► May need transformations, intermediate representations, or “close to user forms”

►E.g. “Left Chest X-Ray” is an “X-Ray of the Left Chest” rather than a “Left sided X-Ray of the Chest”

► Check it with the classifier

Page 13: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 13

Value partitions and Value partitions and “Severe Pneumonia”“Severe Pneumonia”

► Create the Value Partion for Severity ► Create a new Value_partition and partition it

►Severity_value_partition Severe_severity_value Moderately_severe_value Mild_severity_value

►Internally it is usually better to use fully disambiguated names

►What shows in the application can be whatever is convenient.

►Make the partitioning disjoint and covering

See SWBP http://www.w3.org/TR/swbp-specified-values/

Page 14: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 14

Value partitions IIValue partitions II► Create the property for has_severity

► Make it functional (single valued)

► Give it a range of “Severity_value_partition”

► Give it a domain of “Disorder”

(There is a wizard to do all this)

Page 15: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 15

Define Severe PneumoniaDefine Severe Pneumonia

► Remember: The definition is not complete without a text comment

► We haven’t really ‘defined’ severe pneumonia at all, merely created a place in the classification for it

Page 16: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 16

What it meansWhat it means

► A severe pneumonia is one whose severity is from the severe part of the value partition

Pneumonia

Severe_Pneumonia

Severity_VP

Severe_value(s)

Moderatevalue(s)

Mild_value(s)

Page 17: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 17

UML Style pattern(from UML Style pattern(from SWBP)SWBP)

Severe_Pnuemonia

Mild_severity

Moderate_severity

Severe_severity

Severity_VPPneumonia

&has_severity

Page 18: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 18

Simple localisation to parts:Simple localisation to parts:“Lobar Pneumonia”“Lobar Pneumonia”

► Pneumonia of a lobe of the lung

► Classify and check► Seems OK

► … but consider “Inflammation caused by infection of locus some lobe of lung”

► Does not even come out as a kind of Pneumonia

Page 19: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 19

What is wrongWhat is wrong

► Lobes are not lungs► Lobes of lungs are parts of lungs not kinds of lungs

► “Pneumonia” does not have to involve the entire lung► has_locus “Lung or a part of a lung”

► Now classifies correctly and passes unit test.

Page 20: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 20

A chest X-Ray showing A chest X-Ray showing Pneumonia: Pneumonia: Model of meaningModel of meaning

► How to represent a chest X-Ray showing pneumonia

► The things in the patient - Lung, etc.

► The technique - PA | Lateral | AP …

► The image/film

► The artifacts on the image - Opacities, Densities, Shadows

►Ambiguous - Costo-Phrenic Angle -

►The anatomists claim it doesn’t exist except as a shadow

► The Interpretation - what the doctor believes believes the X-Ray shows about the patient - Pneumonia, Improvement, …

Page 21: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 21

ChoicesChoices

► What to make the central item to classify

► Interpretation of Artifacts on Image taken by Technique of site (Anatomical_entity? Thing? …)

► The image?

► The interpretation?

► Other?

► For what purpose? For whom?

► OWL will guarantee that all views are consistent

► But has no way to say that two things are the same

Page 22: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 22

Fit to medical recordFit to medical recordStill at level of meaningStill at level of meaning

► Patient is reported to have Condition as determined by Procedure

► Patient is reported to have Disorder with locus site as determined by Image taken by Technique of site for a Reason showing signs

► There is no one way!► … but for demonstration purposes we have to choose

► As for any implementation

►But one view can be transformed to another

►Co-ordinate systems are important, but you don’t go to war over them

Page 23: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 23

Key issue:Key issue:Maintain orthogonal axesMaintain orthogonal axes“Normalisation”“Normalisation”

► First work out what you can say► Then the constraints on what you can’t

► So start with the existential graph

► What do we want to be sure to retrieve together► X-Rays interpreted as showing pneumonia?

► Pneumonias however diagnosed? As diagnosed by X-Ray?

► X-rays of Chest?

► P-A X-Rays of chest?

► X-rays showing opacities

► What is essential?What is ‘ontological’ - about meaning

► What are the consequences of decisions► Science not religion

Page 24: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 24

Experiment!Experiment!Two possible entitiesTwo possible entities

► “Pneumonia shown on Radiograph of Chest showing consolidation”

► “Radiograph interpreted as Pneumonia showing consolidation”

► (You substitute the sign for “consolidation”)

► Whichever we will need► Radiographic_entities - studies, etc.

► Radiographic_signs - opacities, etc.

► Radiographic_techniques - PA, Lateral etc.

►We’ll keep for now

► Disorders, Anatomy, Etc.

Page 25: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 25

One variant: One variant:

► Note: We could have named the subenjtities, e.g. “PA-Lateral Radiographic Technique”“Opacity indicating Consolidation”

► Note that for this experiment we have created a new file and imported the original bio file which has namespace “bio:”

Page 26: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 26

Same example with named Same example with named classes classes

► Classifies as equivalent

► Ontology: Radiology-example-01

Page 27: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 27

Alternative experimentAlternative experiment“Qua induction”“Qua induction”“Dual”“Dual”

► OWL will impose the same constraints on both

Page 28: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 28

A possible bugA possible bug

► Suppose the domain of has_exam_position were accidentally set to Radiographic_study instead of Radiographic_technique

► Lots of Red► Errors propagate

► A single source

► But they propagate consistently

► Both “duals” are inconsistent - Radiograph & Pneumonia

source

Page 29: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

29© University of Manchester

What to do when “Its all What to do when “Its all turned red”turned red”

► Unsatisfiability propagates – so trace it to its source► Any class with an unsatisfiable filler in a someValuesFor

(existential) restriction is unsatisfiable

► Any subclass of an unsatisfiable class is unsatisfiable

► Only a few possible sources► Violation of disjoint axioms

► Unsatisfiable expressions in some restrictions

► Confusion of “and” and “or”

► Violation of a universal (allValuesFrom) constraint(including range and domain constraints)

► Check domain and range constraints first

► Try the debugger► It’s not perfect but it finds most thing

Don’t Panic!Don’t Panic!

Page 30: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 30

Which representation to Which representation to choose:choose:

► What’s the task► (My understanding)

To construct forms for reports

►Therefore focus on th0e in the first instance in the radiograph

►An an ontology for reports/forms

Page 31: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 31

Create a new ontology for Create a new ontology for FormsForms

► I have done it here in a separate ontology and imported for modularity

► Top bio

► Radiology

► Forms

Page 32: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 32

Form for radiographForm for radiograph

► Any form for a radiographic study requires exactly one subform for technique

► Any form for a CXR must have an appropriate technique and subforms for Heart and Lung Fields

Page 33: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 33

Or could be abbreviated by Or could be abbreviated by providing suitable providing suitable definitionsdefinitions

Page 34: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 34

And from a different view And from a different view expanded along existential expanded along existential restrictions for different restrictions for different views or treesviews or trees

Ontology Class diagram view

ContentsUse/Activity View

Page 35: Review of OWL for Biomedicine - II Alan Rector & CO-ODE/NIBHI University of Manchester Rector@cs.man.ac.uk OpenGALEN BioHealth Informatics Group © University

© University of Manchester 35

Why go to so much Why go to so much trouble?trouble?

► Modularity

► Scaling

► Consistency

► Maintainability & smooth evolution

► Transparency

► But it is not the standard use of OWL for terminologies

► And it does require some additional mechanisms