1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by MSD (EMBL OUTSTATION THE EBI WELLCOME TRUST GENOME CAMPUS) -->
3 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
4 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes" targetNamespace="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes" elementFormDefault="qualified" attributeFormDefault="unqualified">
6 <xs:documentation> Vorba ID - Vamsas Object Request Broker Address ID (name needs to be
7 worked on): Suggest it could be of the form documentRoot/datasetName/SequenceUID for a
8 dataset sequence. Alignment sequence: documentRoot/datasetName/AlignmentId/SequenceUID
9 for an aligned form of a dataset sequence </xs:documentation>
11 <xs:element name="VAMSAS">
13 <xs:documentation> contains unassociated trees and a number of analysis sets
18 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
19 <xs:element ref="vamsas:DataSet" minOccurs="0" maxOccurs="unbounded"/>
21 <xs:attribute name="id" type="xs:ID" use="optional">
23 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
26 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
30 <xs:documentation> Properties. Generally, these are mutable so an application should check
31 them each time. This may change depending on the context of the property
34 <xs:element name="Tree">
37 <xs:documentation> Contains a named collection of trees </xs:documentation>
38 <xs:documentation> TODO: define way of referencing leaves of global tree for any
39 sequence/alignment object. SUggestion 1: Each named tree leafnode has a unique
40 id (which may be unique in combination with trees own vorba ID). Dataset
41 sequences can be tagged with a property "vamsas:tree_leaf" </xs:documentation>
44 <xs:element name="title" type="xs:string" minOccurs="0"/>
45 <xs:element name="newick" maxOccurs="unbounded">
48 <xs:extension base="xs:string">
49 <xs:attribute name="title" type="xs:string" use="optional"/>
50 <xs:attribute name="id" type="xs:ID" use="optional">
52 <xs:documentation> Primary Key for vamsas object referencing
56 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
61 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
62 <xs:element ref="vamsas:Provenance"/>
64 <xs:attribute name="id" type="xs:ID" use="optional">
66 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
69 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
72 <xs:element name="property">
76 <xs:documentation> Named and typed property string </xs:documentation>
78 <xs:extension base="xs:string">
79 <xs:attribute name="name" type="xs:string" use="required"/>
80 <xs:attribute name="type" type="xs:string" use="required">
82 <xs:documentation> The type specifies how the property will be parsed.
83 Empty property strings are allowed, and can be used to prototype the
84 input to a document. TODO: specify allowed types </xs:documentation>
91 <xs:element name="link">
94 <xs:documentation> Primitive labelled URI object </xs:documentation>
97 <xs:extension base="xs:string">
98 <xs:attribute name="href" type="xs:anyURI">
100 <xs:documentation>The URI</xs:documentation>
107 <xs:complexType name="rangeType" abstract="true">
109 <xs:documentation> Specify an ordered set of positions and/or regions on the principle
110 dimension of some associated vamsas object </xs:documentation>
111 <xs:documentation> Keeping to jaxb-1.0 specification for the moment - this choice should
112 become a substitution group when we use jaxb-2.0 capable bindings
116 <xs:element name="pos" maxOccurs="unbounded">
118 <xs:documentation> a position within the associated object's coordinate system
122 <xs:attribute name="i" type="xs:int" use="required"/>
125 <xs:element name="seg" maxOccurs="unbounded">
127 <xs:documentation> a region from start to end, with flag for inclusivity of
128 terminii </xs:documentation>
131 <xs:attribute name="start" type="xs:int" use="required"/>
132 <xs:attribute name="end" type="xs:int" use="required"/>
133 <xs:attribute name="inclusive" type="xs:boolean" use="required">
135 <xs:documentation> when false, a consecutive range like 'start=1, end=2'
136 means the region lying after position 1 and before position 2
143 <!-- Do we really need this - a position could be just a seg with start=end and inclusive=true -->
145 <xs:complexType name="rangeAnnotation">
147 <xs:documentation> Annotation for a rangeSpec - values can be attached for the whole
148 specification, and to each position within the spec. following the orientation
149 specified by the ordered set of rangeSpec (pos, seg) elements. </xs:documentation>
152 <xs:extension base="vamsas:rangeType">
154 <xs:element name="label" type="xs:string" minOccurs="0">
156 <xs:documentation> Short, meaningful name for the annotation - if this
157 is absent, then the type string should be used in its place.
161 <xs:element name="description" type="xs:string" minOccurs="0">
163 <xs:documentation> Human readable description of the annotation
167 <xs:element name="status" type="xs:string" minOccurs="0">
169 <xs:documentation> TODO: specify this - we have considered taking the GO
170 evidence codes as a model for assessing a measure of quality to an
171 annotation. </xs:documentation>
174 <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded">
176 <xs:documentation> Annotation Element position maps to ordered positions
177 defined by the sequence of rangeType pos positions or concatenated
178 seg start/end segments. </xs:documentation>
181 <xs:element name="score" minOccurs="0" maxOccurs="unbounded">
183 <xs:documentation> Ordered set of optionally named float values for the
184 whole annotation </xs:documentation>
188 <xs:extension base="xs:float">
189 <xs:attribute name="name" type="xs:string" use="optional" default="score"/>
194 <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
195 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
197 <xs:documentation> Note:These are mutable so an application should check
198 them each time. </xs:documentation>
202 <xs:attribute name="id" type="xs:ID" use="optional">
204 <xs:documentation> Primary Key for vamsas object referencing
208 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
209 <xs:attribute name="group" type="xs:string" use="optional" default="">
211 <xs:documentation> Annotation with the same non-empty group name are grouped
212 together </xs:documentation>
215 <xs:attribute name="type" type="xs:string" use="required">
217 <xs:documentation> A Das Feature has both a type and a Type ID. We go the
218 route of requiring the type string to be taken from a controlled
219 vocabulary if an application expects others to make sense of it. The
220 type may qualified - so uniprot:CHAIN is a valid type name, and
221 considered distinct from someotherDB:CHAIN </xs:documentation>
227 <xs:element name="param">
230 <xs:documentation> Specifies a named and typed value used to perform some data
231 transformation. </xs:documentation>
232 <xs:documentation> LATER: experiment with xml validation of property set prototypes
233 for services </xs:documentation>
237 <xs:documentation> Named and typed property string </xs:documentation>
239 <xs:extension base="xs:string">
240 <xs:attribute name="name" type="xs:string" use="required"/>
241 <xs:attribute name="type" type="xs:string" use="required">
243 <xs:documentation> The type specifies how the property will be parsed.
244 Empty property strings are allowed, and can be used to prototype the
245 input to a document. TODO: specify allowed types </xs:documentation>
252 <xs:element name="input">
255 <xs:documentation> Selects all or part of a collection of vamsas objects as a named
256 input to some transformation process. Many inputs with the same name imply a
257 group input (such as a collection of sequences) </xs:documentation>
260 <xs:extension base="vamsas:rangeType">
261 <xs:attribute name="name" type="xs:string" use="required"/>
262 <xs:attribute name="objRef" type="xs:IDREF" use="optional">
264 <xs:documentation> Reference Frame for rangeType specfication
272 <xs:element name="Provenance">
275 <xs:documentation> Defines the origin and series of operations applied directly to
276 the object that references it. </xs:documentation>
279 <xs:element name="entry" maxOccurs="unbounded">
282 <xs:element name="User" type="xs:string">
284 <xs:documentation> Who </xs:documentation>
287 <xs:element name="App" type="xs:string">
289 <xs:documentation> With which application </xs:documentation>
292 <xs:element name="Action" type="xs:string">
294 <xs:documentation> Did what </xs:documentation>
297 <xs:element name="Date" type="xs:date">
299 <xs:documentation> When </xs:documentation>
302 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
304 <xs:documentation> additional information </xs:documentation>
307 <xs:element ref="vamsas:param" minOccurs="0" maxOccurs="unbounded">
309 <xs:documentation> parameter for the action </xs:documentation>
312 <xs:element ref="vamsas:input" minOccurs="0" maxOccurs="unbounded">
314 <xs:documentation> bioinformatic objects input to action
319 <xs:attribute name="id" type="xs:ID" use="optional">
321 <xs:documentation> Primary Key for vamsas object referencing
330 <xs:element name="DataSet">
333 <xs:documentation> A collection of sequences, alignments, trees and other things.
337 <xs:element name="Sequence" maxOccurs="unbounded">
340 <xs:documentation> a primary or secondary sequence record from which all
341 other sequences may be derived </xs:documentation>
344 <xs:extension base="vamsas:SequenceType">
346 <xs:element name="dbRef" minOccurs="0" maxOccurs="unbounded">
348 <xs:documentation> Store a list of database references
349 for this sequence record - with optional mapping
350 from database sequence to the given sequence record </xs:documentation>
356 <xs:element name="map" minOccurs="0" maxOccurs="unbounded">
358 <xs:documentation> From: Offset to first
359 position in dataset sequence record that
360 this database entry maps to To: Offset
361 to last position in dataset sequence
362 record that this database entry maps to
363 Start: Offset to first last position in
364 database entry that first (or offset)
365 position in sequence maps to End: Offset
366 to last position in database entry that
367 last (offset) position in sequence maps
368 to </xs:documentation>
372 <xs:extension base="vamsas:mapList"/>
376 <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
377 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
379 <xs:attribute name="source" type="xs:string" use="required">
381 <xs:documentation> TODO Database Naming
382 Convention: either start using LSID (so
383 change type to URI) or leave this as an
384 uncontrolled/unspecified string ID
388 <xs:attribute name="version" type="xs:string" use="required">
390 <xs:documentation> Version must be specified -
394 <xs:attribute name="accessionId" type="xs:string" use="required">
396 <xs:documentation> TODO: make some specification
397 of the database field from which this
398 accessionId is taken from - should that be a
399 special property of the dbRef object ?
403 <xs:attribute name="id" type="xs:ID" use="optional">
405 <xs:documentation> Primary Key for vamsas object
406 referencing </xs:documentation>
412 <xs:attribute name="id" type="xs:ID" use="optional">
414 <xs:documentation> Primary Key for vamsas object referencing
418 <xs:attribute name="dictionary" type="xs:string" use="required">
420 <xs:documentation> symbol class for sequence
428 <xs:element name="sequenceMapping" minOccurs="0" maxOccurs="unbounded">
431 <xs:element name="range" maxOccurs="unbounded">
433 <xs:attribute name="seqAStart" type="xs:int"/>
434 <xs:attribute name="seqAEnd" type="xs:int"/>
435 <xs:attribute name="seqBStart" type="xs:int"/>
436 <xs:attribute name="seqBEnd" type="xs:int"/>
439 <xs:element ref="vamsas:Provenance"/>
441 <xs:attribute name="sequenceA" type="xs:IDREF" use="required"/>
442 <xs:attribute name="sequenceB" type="xs:IDREF" use="required"/>
443 <xs:attribute name="id" type="xs:ID" use="optional"/>
446 <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
449 <xs:documentation> Annotate over positions and regions of a dataset
450 sequence </xs:documentation>
453 <xs:extension base="vamsas:rangeAnnotation">
455 <xs:element ref="vamsas:Provenance"/>
457 <xs:attribute name="seqRef" type="xs:IDREF" use="required">
459 <xs:documentation> annotation is associated with a
460 particular dataset sequence </xs:documentation>
467 <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
470 <xs:element name="AlignmentAnnotation" minOccurs="0" maxOccurs="unbounded">
472 <xs:documentation> This is annotation over the coordinate frame
473 defined by all the columns in the alignment.
478 <xs:extension base="vamsas:rangeAnnotation">
480 <xs:element ref="vamsas:Provenance"/>
482 <xs:attribute name="graph" type="xs:boolean" use="required">
484 <xs:documentation> TODO: decide if this flag is
485 redundant - when true it would suggest that
486 the annotationElement values together form a
487 graph </xs:documentation>
494 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
495 <xs:element name="alignmentSequence" maxOccurs="unbounded">
498 <xs:extension base="vamsas:SequenceType">
500 <xs:element name="AlignmentSequenceAnnotation" minOccurs="0" maxOccurs="unbounded">
503 <xs:documentation> Annotate over
504 positions and regions of the
505 ungapped sequence in the context of
506 the alignment </xs:documentation>
510 <xs:extension base="vamsas:rangeAnnotation">
512 <xs:element ref="vamsas:Provenance"/>
514 <xs:attribute name="graph" type="xs:boolean" use="required">
516 <xs:documentation> TODO:
517 decide if this flag is
518 redundant - when true it
519 would suggest that the
520 annotationElement values
521 together form a graph
528 This replaces the flat list of sequenceFeatures.
529 <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
530 <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
531 </xs:annotation><xs:complexContent>
532 <xs:extension base="vamsas:rangeFeature">
533 <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
534 <xs:annotation><xs:documentation>annotation may be associated with a particular sequence lying within the same reference frame as the rangeType's objRef</xs:documentation></xs:annotation>
537 </xs:complexContent></xs:complexType></xs:element> -->
541 <xs:attribute name="id" type="xs:ID" use="optional">
543 <xs:documentation> Primary Key for vamsas object
544 referencing </xs:documentation>
547 <xs:attribute name="refid" type="xs:IDREF" use="required">
549 <xs:documentation> Dataset Sequence from which
550 this alignment sequence is taken from
558 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
560 <xs:documentation> typical properties may be additional
561 alignment score objects </xs:documentation>
564 <xs:element ref="vamsas:Provenance"/>
566 <xs:attribute name="gapChar" type="xs:string" use="required"/>
567 <xs:attribute name="aligned" type="xs:boolean" use="optional"/>
568 <xs:attribute name="id" type="xs:ID" use="optional">
570 <xs:documentation> Primary Key for vamsas object referencing
574 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
577 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
578 <xs:element ref="vamsas:Provenance"/>
580 <xs:attribute name="id" type="xs:ID" use="optional">
582 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
587 <xs:element name="annotationElement">
590 <xs:documentation> per-site symbolic and/or quantitative annotation </xs:documentation>
591 <xs:documentation> SecondaryStructure and display character (from Jalview) have been
592 subsumed into the glyph element </xs:documentation>
595 <xs:element name="description" type="xs:string" minOccurs="0">
597 <xs:documentation> Free text at this position </xs:documentation>
600 <xs:element name="glyph" minOccurs="0" maxOccurs="unbounded">
602 <xs:documentation> Discrete symbol - possibly graphically represented
607 <xs:extension base="xs:string">
608 <xs:attribute name="dict" type="xs:string" use="optional" default="utf8">
610 <xs:documentation> specifies the symbol dictionary for this
611 glyph - eg utf8 (the default), aasecstr_3 or
612 kd_hydrophobicity - the content is not validated so
613 applications must ensure they gracefully deal with
614 invalid entries here </xs:documentation>
615 <xs:documentation> TODO: specify a minimum list of glyph
616 dictionaries to get us started and provide a way for the
617 vamsasClient to validate their content if regexes are
618 specified </xs:documentation>
625 <xs:element name="value" type="xs:float" minOccurs="0" maxOccurs="unbounded">
627 <xs:documentation> Ordered set of float values - an application may treat
628 the values together as a vector with common support for a set of
629 annotation elements - but this is, again, not validated so applications
630 should deal gracefully with varying numbers of dimensions
635 <xs:attribute name="position" type="xs:integer" use="required">
637 <xs:documentation> position with respect to the coordinate frame defined by a
638 rangeType specification </xs:documentation>
641 <xs:attribute name="after" type="xs:boolean" use="optional" default="false">
643 <xs:documentation> true means the annotation element appears between the
644 specified position and the next </xs:documentation>
647 <xs:attribute name="id" type="xs:ID" use="optional">
649 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
654 <xs:complexType name="SequenceType">
656 <xs:element name="sequence" type="xs:string"/>
657 <xs:element name="name" type="xs:string"/>
658 <xs:element name="description" type="xs:string" minOccurs="0"/>
659 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
661 <xs:documentation> additional typed properties </xs:documentation>
665 <xs:attribute name="start" type="xs:integer" use="required"/>
666 <xs:attribute name="end" type="xs:integer" use="required"/>
668 <xs:element name="ApplicationData">
671 <xs:documentation> Data specific to a particular type and version of vamsas
672 application </xs:documentation>
675 <xs:extension base="vamsas:appData">
677 <xs:element name="User" minOccurs="0" maxOccurs="unbounded">
680 <xs:extension base="vamsas:appData">
682 <xs:documentation> Data available to just a particular
683 user </xs:documentation>
685 <xs:attribute name="fullname" type="xs:string" use="required"/>
686 <xs:attribute name="organization" type="xs:string" use="required"/>
691 <xs:element name="Common" minOccurs="0">
694 <xs:extension base="vamsas:appData"/>
698 <xs:element name="Instance" minOccurs="0" maxOccurs="unbounded">
701 <xs:extension base="vamsas:appData">
703 <xs:documentation> Data available to just a specific
704 instance of the application </xs:documentation>
705 <xs:documentation> VAMSAS/Pierre: Is this data volatile
706 ? Application instances may not be accessible after
707 the session has closed - the user may have to be
708 presented with the option of picking up the data in
709 that instance </xs:documentation>
711 <xs:attribute name="urn" type="xs:string" use="required"/>
717 <xs:attribute name="version" type="xs:string" use="required">
719 <xs:documentation> Version string describing the application specific
720 data storage version used</xs:documentation>
723 <xs:attribute name="name" type="xs:string" use="required">
725 <xs:documentation> Canonical name of application </xs:documentation>
732 <xs:element name="Attachment">
735 <xs:extension base="vamsas:appData">
737 <xs:documentation> General data container to attach a typed data object to
738 any vamsas object </xs:documentation>
740 <xs:attribute name="compressed" type="xs:boolean" use="optional" default="false">
742 <xs:documentation> true implies data will be decompresses with Zip
743 before presenting to application </xs:documentation>
746 <xs:attribute name="type" type="xs:string" use="required">
748 <xs:documentation> Type of arbitrary data - TODO: decide format - use
749 (extended) MIME types ? </xs:documentation>
752 <xs:attribute name="objectref" type="xs:IDREF" use="required">
754 <xs:documentation> Object the arbitrary data is associated with
758 <xs:attribute name="id" type="xs:ID" use="optional">
760 <xs:documentation> Primary Key for vamsas object referencing
768 <xs:complexType name="appData">
770 <xs:element name="data" type="xs:base64Binary"/>
771 <xs:element name="dataReference" type="xs:string"/>
774 <xs:complexType name="mapList">
775 <xs:attribute name="from" type="xs:integer" use="optional" default="0">
777 <xs:documentation> Offset to first position in dataset sequence record that start
778 position on 'onto' maps to </xs:documentation>
781 <xs:attribute name="to" type="xs:integer" use="optional" default="0">
783 <xs:documentation> Offset to last position in dataset sequence record that end
784 position on 'onto' maps to </xs:documentation>
787 <xs:attribute name="start" type="xs:integer" use="required">
789 <xs:documentation> Offset to first position in database entry that first (or offset)
790 position in sequence maps to </xs:documentation>
793 <xs:attribute name="end" type="xs:integer" use="required">
795 <xs:documentation> Offset to last position in database entry that last (offset)
796 position in sequence maps to </xs:documentation>
800 <xs:simpleType name="locks">
803 Contains lock information:
804 locktype:ApplicationHandle
805 locktype is 'local' or 'full'
806 A lock is only valid if the ApplicationHandle resolves to a living application in the vamsas session.
807 A local lock means that the application has locked changes to all local properties on the object.
808 A full lock means that the application has locked changes to all properties on the object, and any objects that it holds references to.
811 <xs:restriction base="xs:string"/>