Extending FuGE into other domains Andrew Jones School of Computer Science, University of Manchester

Post on 14-Jan-2016

213 views 0 download

Transcript of Extending FuGE into other domains Andrew Jones School of Computer Science, University of Manchester

Extending FuGE into other domains

Andrew JonesSchool of Computer Science, University of Manchester

http://fuge.sourceforge.net/

FuGE Status

• Functional Genomics Experiment-[OM/ML]• Milestone 1 release: Sept 2005

– UML (Object Model)– XML Schema

• Milestone release being tested by MGED for MAGE-2

• We are looking at testing it in PSI context– As a basis for GelML and Gel IML– For Investigation structure, sample prep etc.

mzData

• mzData v 1.05 is the current release• Question: How do we integrate mzData

into proteome workflows?– Details of sample prep– Other separation techniques

• FuGE could be used in different ways:– Giving mzData a context within a workflow OR– As a basis for future mzData versions

Experiment retrofitting mzData

• FuGE can store Software, Equipment, Contact• mzData has similar concepts• FuGE has Protocol / ProtocolApplication

– This is the mechanism for storing parameters and parameter values

– Slightly different from parameter definition in mzData

• There is not always a 1:1 mapping between mzData concept and FuGE concept

An mzData–FuGE hybrid format?

• mzData could sub-class from FuGE elements

• Would require some changes in structure– Some would appear relatively arbitrary

• Few major benefits at this stage, given that current structure is being implemented– May be worth considering for mzData v 2, if

FuGE is successful in other domains

Referencing an mzData file with FuGE

Protocol

ProtocolApplication

Material ExternalData

Protocol definition says“See ExternalData file for parameters”

(rather than storing params in Protocol)

mzData file

File format definition

Parser will exist to extract data / parameters from mzData file

Material can be used to describe the sample.

This connects the MS data with a separation workflow

inputMaterial outputData

Referencing an mzData file with FuGE

<ProtocolApplication identifier="FuGE.ProtocolApp.1001" activityDate="24/08/2005">

<outputData> <Data_ref identifier_ref="FuGE.ExternalData.1001"/> </outputData> <inputMaterials> <MaterialMeasurement> <material> <Material_ref identifier_ref="FuGE.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol> <Protocol_ref identifier_ref="FuGE.Protocol.1001"/> </protocol></ProtocolApplication>

Referencing an mzData file with FuGE

<ProtocolApplication identifier="FuGE.ProtocolApp.1001" activityDate="24/08/2005">

<outputData> <Data_ref identifier_ref="FuGE.ExternalData.1001"/> </outputData> <inputMaterials> <MaterialMeasurement> <material> <Material_ref identifier_ref="FuGE.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol> <Protocol_ref identifier_ref="FuGE.Protocol.1001"/> </protocol></ProtocolApplication>

•Reference to the Data object that lives elsewhere in the document

<data> <ExternalData identifier="FuGE.ExternalData.1001"> <uri> <URI uri="c:\mzData\mzData1.xml"/> </uri> <externalFormatDocumentation> <URI uri="http://psidev.sourceforge.net/mzdata.html"/>  </externalFormatDocumentation> </ExternalData></data>

Referencing an mzData file with FuGE

<ProtocolApplication identifier="FuGE.ProtocolApp.1001" activityDate="24/08/2005">

<outputData> <Data_ref identifier_ref="FuGE.ExternalData.1001"/> </outputData> <inputMaterials> <MaterialMeasurement> <material> <Material_ref identifier_ref="FuGE.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol> <Protocol_ref identifier_ref="FuGE.Protocol.1001"/> </protocol></ProtocolApplication>

•Reference to the Protocol object:

<Protocol identifier="FuGE.Protocol.1001" name="Mass Spec Protocol 1"> <actions> <Action actionOrdinal="1" actionText="MS/MS performed using the following protocol... See the mzData file for instrument and software parameters"/> </actions></Protocol>

Referencing an mzData file with FuGE

<ProtocolApplication identifier="FuGE.ProtocolApp.1001" activityDate="24/08/2005">

<outputData> <Data_ref identifier_ref="FuGE.ExternalData.1001"/> </outputData> <inputMaterials> <MaterialMeasurement> <material> <Material_ref identifier_ref="FuGE.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol> <Protocol_ref identifier_ref="FuGE.Protocol.1001"/> </protocol></ProtocolApplication>

<materials> <Material identifier="FuGE.Material.1001" name="Fraction from LC"> <characteristics>etc…</characteristics> </Material></materials>

mzData conclusions

• Referencing an mzData file from FuGE will give mass spec data a context in a proteome workflow

• Retrofitting the model is likely to require structural changes– Not likely to be welcomed if it is already being

implemented

• May be benefits for major future revisions using some FuGE concepts– Will be demonstrated by successful deployment of

FuGE in other domains

Using FuGE for GelML, Gel IML

Existing Gel Models

• PEDRo• Frank Gibson’s gel extension GELI• Gla-PSI model (Jones 2003)• AGML (http://bioinformatics.musc.edu/agml/)• Swiss 2D PAGE • In-house models from software companies• … and various others that I’ve forgotten!

• What features do we want for GelML?

Extending FuGE into a gel model

• Concepts of FuGE to understand– Protocol / ProtocolApplication– Material– Data

• Should be extended with more specific types• Software and Equipment could be extended

– But use of ontology terms may suffice

• Demo models of gel separation and gel data– Mainly structural, fine details must be worked out in

PSI context

Stage 1 - replace FuGE Root

<xs:complexType name="GelMLType">

<xs:complexContent>

<xs:extension base="fuge:FuGE.FuGEType“/>

</xs:complexContent>

</xs:complexType>

<xs:element name="GelML" type="geldata:GelMLType" abstract="false" substitutionGroup="fuge:FuGE"/>

This allows GelML to inherit all FuGE functionality

Stage 2 - represent a gel

<xs:complexType name="Gel2DType"> <xs:complexContent> <xs:extension

base="fuge:FuGE.Bio.Material.MaterialType"> <xs:sequence> <xs:element name="pi_start" type="double"/> <xs:element name="pi_end" type="double"/> <xs:element name="mass_start" type="double"/> <xs:element name="mass_end" type="double"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>

…<xs:element name="Gel2D" type="gel:Gel2DType"

substitutionGroup="fuge:Material"/>

Stage 2 - represent a gel

<xs:complexType name="Gel2DType"> <xs:complexContent> <xs:extension

base="fuge:FuGE.Bio.Material.MaterialType"> <xs:sequence> <xs:element name="pi_start" type="double"/> <xs:element name="pi_end" type="double"/> <xs:element name="mass_start" type="double"/> <xs:element name="mass_end" type="double"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>

…<xs:element name="Gel2D" type="gel:Gel2DType"

substitutionGroup="fuge:Material"/>

• Extend from FuGE Material type• Add whatever attributes required

Stage 3 - represent gel separation

<xs:complexType name="Gel2DSeparation"> <xs:complexContent> <xs:extension

base="fuge:FuGE.Common.Protocol.ProtocolApplicationType"> <xs:sequence> <xs:element name="Gel2DUsed"> <xs:annotation> <xs:documentation>A reference to the Gel material on which the

separation takes place </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Gel2D_ref"> <xs:complexType> <xs:attribute name="identifier_ref" type="xs:string"

use="required"/> </xs:complexType> </xs:element>

… closing tags

Example schema for a gel separation

<xs:complexType name="Gel2DSeparation"> <xs:complexContent> <xs:extension

base="fuge:FuGE.Common.Protocol.ProtocolApplicationType"> <xs:sequence> <xs:element name="Gel2DUsed"> <xs:annotation> <xs:documentation>A reference to the Gel material on which the

separation takes place </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Gel2D_ref"> <xs:complexType> <xs:attribute name="identifier_ref" type="xs:string"

use="required"/> </xs:complexType> </xs:element>

… closing tags• Extend from ProtocolApplication• This allows definition of input and output samples

Example schema for a gel separation

<xs:complexType name="Gel2DSeparation"> <xs:complexContent> <xs:extension

base="fuge:FuGE.Common.Protocol.ProtocolApplicationType"> <xs:sequence> <xs:element name="Gel2DUsed"> <xs:annotation> <xs:documentation>A reference to the Gel material on which the

separation takes place </xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="Gel2D_ref"> <xs:complexType> <xs:attribute name="identifier_ref" type="xs:string"

use="required"/> </xs:complexType> </xs:element>

… closing tags• Reference the details of the gel used

<Gel2DSeparation xmlns="http://psi.org/gel" identifier="PSI.Gel2DSep.1001">

<inputMaterials xmlns="http://fuge.org/core"> <MaterialMeasurement> <material> <Material_ref identifier_ref="PSI.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol xmlns="http://fuge.org/core"> <Protocol_ref identifier_ref="PSI.Protocol.1001"/> </protocol> <Gel2DUsed> <Gel2D_ref identifier_ref="PSI.Gel2D.1001"/> </Gel2DUsed></Gel2DSeparation>

Example XML for gel separation

<Gel2DSeparation xmlns="http://psi.org/gel" identifier="PSI.Gel2DSep.1001">

<inputMaterials xmlns="http://fuge.org/core"> <MaterialMeasurement> <material> <Material_ref identifier_ref="PSI.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol xmlns="http://fuge.org/core"> <Protocol_ref identifier_ref="PSI.Protocol.1001"/> </protocol> <Gel2DUsed> <Gel2D_ref identifier_ref="PSI.Gel2D.1001"/> </Gel2DUsed></Gel2DSeparation>

Example XML for gel separation

• Define input materials for the separation

• Reference to the Material used as input specified elsewhere:

<Material identifier="PSI.Material.1001" name="protein sample"> <characteristics> etc. </characteristics></Material>

<Gel2DSeparation xmlns="http://psi.org/gel" identifier="PSI.Gel2DSep.1001">

<inputMaterials xmlns="http://fuge.org/core"> <MaterialMeasurement> <material> <Material_ref identifier_ref="PSI.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol xmlns="http://fuge.org/core"> <Protocol_ref identifier_ref="PSI.Protocol.1001"/> </protocol> <Gel2DUsed> <Gel2D_ref identifier_ref="PSI.Gel2D.1001"/> </Gel2DUsed></Gel2DSeparation>

Example XML for gel separation• Reference the Protocol that defines this gel separation

<Protocol identifier="PSI.Protocol.1001"> <parameters> <Parameter identifier="PSI.Params.1001" name="1stStageVoltage"></Parameter> </parameters> <actions> <Action actionText="The text for the first dimension of the gel separation goes here" actionOrdinal="1"/> <Action actionText="The text for the second dimension of the gel separation goes here" actionOrdinal="2"/> </actions></Protocol>

<Gel2DSeparation xmlns="http://psi.org/gel" identifier="PSI.Gel2DSep.1001">

<inputMaterials xmlns="http://fuge.org/core"> <MaterialMeasurement> <material> <Material_ref identifier_ref="PSI.Material.1001"/> </material> </MaterialMeasurement> </inputMaterials> <protocol xmlns="http://fuge.org/core"> <Protocol_ref identifier_ref="PSI.Protocol.1001"/> </protocol> <Gel2DUsed> <Gel2D_ref identifier_ref="PSI.Gel2D.1001"/> </Gel2DUsed></Gel2DSeparation>

Example XML for gel separation• Reference the details of the gel used <Gel2D xmlns=http://psi.org/gel identifier="PSI.Gel2D.1001"> <pi_start>4</pi_start> <pi_end>7</pi_end> <mass_start>10000KDa</mass_start> <mass_end>50000KDa</mass_end></Gel2D>

<Gel2DSeparation xmlns="http://psi.org/gel" identifier="PSI.Gel2DSep.1001">

<outputMaterials xmlns="http://fuge.org/core"> <Material_ref identifier_ref="PSI.GelSpot1"/> <Material_ref identifier_ref="PSI.GelSpot2"/>

… <Material_ref identifier_ref="PSI.GelSpot1007"/> </outputMaterials>

Example XML – define output spots

• Could also define output materials e.g. PhysicalGelSpot

<PhysicalGelSpot xmlns="http://psi.org/gel" identifier="PSI.GelSpot1"> <PixelCoordX>367</PixelCoordX> <PixelCoordY>2011</PixelCoordY></PhysicalGelSpot>

1D Gels

• Gel1D and GelLane defined separately• GelLane has own ProtocolApplication to

reference its inputMaterials• The separation within a lane, produces PhysicalBands– These can go on for further treatment

Gel data: Gel IML

• Demo model of gel images and spots– Will demo very simple example here– More complex gel spot model can be

discussed

• Some issues with representing data in XML

Representing a gel image<xs:complexType name="GelImageType"> <xs:complexContent> <xs:extension base="fuge:FuGE.Bio.Data.ExternalDataType"> <xs:sequence> <xs:element name="PixelXSize" type="int"/> <xs:element name="PixelYSize" type="int"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>

<xs:element name="GelImage" type="geldata:GelImageType" abstract="false" substitutionGroup="fuge:ExternalData"/>

• FuGE.ExternalData allows a reference to an external file• Could give additional attributes by extending this base type

<data>

<GelImage xmlns="http://psi.org/geldata" identifier="PSI.GelImage.1001">

<uri xmlns="http://fuge.org/core">

<URI uri="MouseExperimentGel1001.tiff"/>

</uri>

<PixelXSize>3200</PixelXSize>

<PixelYSize>4200</PixelYSize>

</GelImage>

</data>

Example Gel Image XML

Note: Pixel sizes are in fact redundant (this could be deduced from image)

<GelSpotGroup xmlns="http://psi.org/geldata" identifier="PSI.Dimension.1001"> <dimensionElements xmlns="http://fuge.org/core"> <DimensionElement identifier="PSI.GelSpot.1001"/> <DimensionElement identifier="PSI.GelSpot.1002"/> <DimensionElement identifier="PSI.GelSpot.1003"/> <DimensionElement identifier="PSI.GelSpot.1004"/> <DimensionElement identifier="PSI.GelSpot.1005"/> <DimensionElement identifier="PSI.GelSpot.1006"/> <DimensionElement identifier="PSI.GelSpot.1007"/> </dimensionElements> </GelSpotGroup> <SpotMeasures xmlns="http://psi.org/geldata" identifier="PSI.Dimension.1002"> <dimensionElements xmlns="http://fuge.org/core"> <SpotYCoord xmlns="http://psi.org/geldata" identifier="PSI.DE.1001"/> <SpotXCoord xmlns="http://psi.org/geldata" identifier="PSI.DE.1002"/> <SpotArea xmlns="http://psi.org/geldata" identifier="PSI.DE.1003"/> <SpotVolume xmlns="http://psi.org/geldata" identifier="PSI.DE.1004"/> </dimensionElements> </SpotMeasures> <Dimension identifier="PSI.Dimension.1003" name="Gel Dimension"> <dimensionElements> <DimensionElement identifier="PSI.Gel.1" name="1 hour time point"/> <DimensionElement identifier="PSI.Gel.2" name="2 hour time point"/> <DimensionElement identifier="PSI.Gel.3" name="4 hour time point"/> </dimensionElements> </Dimension> </dimensions> <data> <GelDataSet xmlns="http://psi.org/geldata" identifier="PSI.GelDataSet.1001" storage=" Matrix of values goes here or matrix could be in an external file "> <dimension xmlns="http://fuge.org/core"> <Dimension_ref identifier_ref="PSI.Dimension.1001"/> <Dimension_ref identifier_ref="PSI.Dimension.1002"/> <Dimension_ref identifier_ref="PSI.Dimension.1003"/> </dimension> </GelDataSet>

Sample XML for Gel Spots

Ways to take this forward

• For separation (GelML)– Decide what additional attributes and associations

required– Extend ProtocolApplication and Material

• For Gel IML– Extend Data, Dimension, DimensionElement– These give facilities for linking to Investigation

structure– We have some demo models of these parts– Important – Involve software manufacturers!

UML or XSD?

• Depends on expertise of developers• FuGE exists as UML and XML Schema• XML Schema auto-generated from UML

– Can build UML and output XML Schema

OR– Extend directly from XML Schema

• Need weekly conference call involving interested participants

Benefits of using FuGE

• Format gets model of Investigation for free– Method for linking experimental factors to

Data dimensions

• Protocol system is very flexible– E.g. for storing sample prep details

• Ontology reference system works for simple term list and complex concepts

• Future integration with other ‘omics

…. some other issues for discussion

Issues with multidimensional data in XML

2 ways of representing multi-dimensional data in XML:

• Option 1: Define data dimensions in XML and store data in a non-XML multi-dimensional array– Need more than just an XML parser to “understand”

the data values

• Option 2: Define data dimensions and store values with the leaf elements (DimensionElements)– For large data sets, XML is a highly inefficient

structure for representing multi-dimensional data

Option 1: Data Dimensions for gel electrophoresis

Data

Dimension

(Variables)

Dimension

(Gel Spots)

Dimension

(Spot Measures)

DE (2h)

DE (4h)

DE (1h) DE (Spot1)

DE (Spot2)

DE (YCoord)

DE (Area)

DE (XCoord)

DE (Intensity)

Matrix of values

ordered

DE (Spot3000)

DE (Spot3)

orderedorderedordered

Option 1: Data Dimensions for gel electrophoresis

Data

Dimension

(Variables)

Dimension

(Gel Spots)

Dimension

(Spot Measures)

DE (2h)

DE (4h)

DE (1h) DE (Spot1)

DE (Spot2)

DE (YCoord)

DE (Area)

DE (XCoord)

DE (Intensity)

Matrix of values

ordered

DE (Spot3000)

DE (Spot3)

ordered

Result is 3011 references

3 dimensions + 3 variables+ 3000 spots+ 4 spot measures+ 1 to matrix of values

Coordinates define where in matrix to find value:e.g. 1 hour time point, spot 255, Area is at position [1.255.4]

Note: This does not imply that spots with the same ID number on different gels correspond with each other.

We need a different mechanism for this!

orderedordered

Option 2: Data Dimensions for gel electrophoresis

Data

DE (Spot3)

DE (Spot1)

DE (Spot2)

DE (Spot3000)

DE (2h)

DE (4h)

DE (1h)

DE (Area) Value = [ ]

DE (XCoord) Value = [ ]

DE (Intensity) Value = [ ]

DE (YCoord) Value = [ ]

Option 2: Data Dimensions for gel electrophoresis

Data

DE (Spot3)

DE (Spot1)

DE (Spot2)

DE (Spot3000)

DE (2h)

DE (4h)

DE (1h)

DE (Area) Value = [ ]

DE (XCoord) Value = [ ]

DE (Intensity) Value = [ ]

DE (YCoord) Value = [ ]

Result is 36000 references

3 variablesX 3000 spotsX 4 spot measures

Values defined with the DimensionElements

As data volumes become larger, or the number of dimensions increase, using pure XML is a highly inefficient structure for representing this kind of data.

Imagine extra variables are being tested:

Time course (4 time points), drug dose (5 doses) and strain (5), average of 3000 gel spots, say 4 spot measures

This is 4 X 5 X 5 X 3000 X 4 = 1.2 million references

The XML parser would be very slow!!

Compared with 3018 references in the first case…

This works because the data matrix can be loaded into memory and can have direct access to positions.

Restriction vs. Extension

• Note FuGE is supposed to be used by extending core classes– i.e. giving additional attributes or associations

• May be cases where we want to restrict parts of FuGE– E.g. may not want a type of ProtocolApplication to

have input or output data

• Problem is that there is no good way of doing this in XML or UML or code!– xs:restriction is not well supported for complex types– May be best to do this with documentation

Use of general relationships vs. specific

• Example: ProtocolApplication has input and output materials

• Is a Gel2D an “inputMaterial” or do we want a specific association from GelSeparation?

• Do we want a typed output – SeparatedGel, for use with a defined scanning event etc.

• Do we want to use outputMaterials association for SeparatedGel or a new specific association?– Should outputMaterials include gel spots…

• These are all discussion issues

Some other issues to solve

• How to relate spots across gels– May also be measures associated with these

values (ratios, relative abundance, confidence indicators etc.)

– This could be another Data object that contains some of the same Dimensions

• How to relate different channels on a DIGE gel

Data

Dimension

(RelatedSpots)

Dimension

(SingleSpots)

Dimension

(Spot Measures)

RelatedSpotGroup 2 CompVolume

CompositeArea

Matrix of values

ordered

ordered

RelatedSpotGroup 1

RelatedSpotGroup 3

SingleSpot1

SingleSpot2

SingleSpot3

Related Spots across gels

ordered ordered

Typical value of SingleSpot = SpotGroup1.123

i.e. this is a reference to how to find the single spot in the other data set

Related Spots across gels

• For the microarray case, is it implied that the features match across dimensions – this is not true for gel electrophoresis

• One way to define it is to specify a list of composite spots

DIGE data in FuGE

Data

Dimension

(DIGE Conditions)

Dimension

(DIGESingleSpots)

Dimension

(Spot Measures)

Condition 2

Matrix of values

ordered

ordered

Condition 1 Spot1

Spot2

Spot3

Area

Volume

Composite SpotID

Ratio