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 name="treenode" minOccurs="0" maxOccurs="unbounded">
64 node identity and mapping data between tree representations and vamsas document objects
69 <xs:extension base="vamsas:nodeType">
70 <xs:attribute name="treeId" type="xs:IDREFS">
73 reference to one or more trees containing the node being described.
77 <xs:attribute name="nodespec" type="xs:string">
80 String uniquely identifying a particular node in the referenced tree according to the format of the tree representation that is referenced.
89 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
90 <xs:element ref="vamsas:Provenance"/>
92 <xs:attribute name="id" type="xs:ID" use="optional">
94 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
97 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
100 <xs:complexType name="referenceType">
103 base type for citing arbitrary links between vamsas objects
107 <xs:extension base="xs:string">
110 Optional human readable description of the relationship
113 <xs:attribute name="id" type="xs:ID" use="optional">
115 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
118 <xs:attribute name="refs" type="xs:IDREFS">
120 <xs:documentation>List of one or more vamsas object references</xs:documentation>
126 <xs:complexType name="nodeType">
128 <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1">
130 <xs:documentation>Short name for this node</xs:documentation>
133 <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1">
135 <xs:documentation>Descriptive text for this node</xs:documentation>
138 <xs:element name="vref" type="vamsas:referenceType" minOccurs="0" maxOccurs="unbounded">
140 <xs:documentation>Direct associations between this node and any vamsas objects</xs:documentation>
143 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
145 <xs:attribute name="id" type="xs:ID" use="optional">
147 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
150 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
152 <xs:element name="property">
156 <xs:documentation> Named and typed property string </xs:documentation>
158 <xs:extension base="xs:string">
159 <xs:attribute name="name" type="xs:string" use="required"/>
160 <xs:attribute name="type" type="xs:string" use="required">
162 <xs:documentation> The type specifies how the property will be parsed.
163 Empty property strings are allowed, and can be used to prototype the
164 input to a document. TODO: specify allowed types </xs:documentation>
171 <xs:element name="link">
174 <xs:documentation> Primitive labelled URI object </xs:documentation>
177 <xs:extension base="xs:string">
178 <xs:attribute name="href" type="xs:anyURI">
180 <xs:documentation>The URI</xs:documentation>
187 <xs:complexType name="rangeType" abstract="true">
189 <xs:documentation> Specify an ordered set of positions and/or regions on the principle
190 dimension of some associated vamsas object </xs:documentation>
191 <xs:documentation> Keeping to jaxb-1.0 specification for the moment - this choice should
192 become a substitution group when we use jaxb-2.0 capable bindings
196 <xs:element name="pos" maxOccurs="unbounded">
198 <xs:documentation> a position within the associated object's coordinate system
202 <xs:attribute name="i" type="xs:int" use="required"/>
205 <xs:element name="seg" maxOccurs="unbounded">
207 <xs:documentation> a region from start to end, with flag for inclusivity of
208 terminii </xs:documentation>
211 <xs:attribute name="start" type="xs:int" use="required"/>
212 <xs:attribute name="end" type="xs:int" use="required"/>
213 <xs:attribute name="inclusive" type="xs:boolean" use="required">
215 <xs:documentation> when false, a consecutive range like 'start=1, end=2'
216 means the region lying after position 1 and before position 2
223 <!-- Do we really need this - a position could be just a seg with start=end and inclusive=true -->
225 <xs:complexType name="rangeAnnotation">
227 <xs:documentation> Annotation for a rangeSpec - values can be attached for the whole
228 specification, and to each position within the spec. following the orientation
229 specified by the ordered set of rangeSpec (pos, seg) elements. </xs:documentation>
232 <xs:extension base="vamsas:rangeType">
234 <xs:element name="label" type="xs:string" minOccurs="0">
236 <xs:documentation> Short, meaningful name for the annotation - if this
237 is absent, then the type string should be used in its place.
241 <xs:element name="description" type="xs:string" minOccurs="0">
243 <xs:documentation> Human readable description of the annotation
247 <xs:element name="status" type="xs:string" minOccurs="0">
249 <xs:documentation> TODO: specify this - we have considered taking the GO
250 evidence codes as a model for assessing a measure of quality to an
251 annotation. </xs:documentation>
254 <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded">
256 <xs:documentation> Annotation Element position maps to ordered positions
257 defined by the sequence of rangeType pos positions or concatenated
258 seg start/end segments. </xs:documentation>
261 <xs:element name="score" minOccurs="0" maxOccurs="unbounded">
263 <xs:documentation> Ordered set of optionally named float values for the
264 whole annotation </xs:documentation>
268 <xs:extension base="xs:float">
269 <xs:attribute name="name" type="xs:string" use="optional" default="score"/>
274 <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
275 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
277 <xs:documentation> Note:These are mutable so an application should check
278 them each time. </xs:documentation>
282 <xs:attribute name="id" type="xs:ID" use="optional">
284 <xs:documentation> Primary Key for vamsas object referencing
288 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
289 <xs:attribute name="group" type="xs:string" use="optional" default="">
291 <xs:documentation> Annotation with the same non-empty group name are grouped
292 together </xs:documentation>
295 <xs:attribute name="type" type="xs:string" use="required">
297 <xs:documentation> A Das Feature has both a type and a Type ID. We go the
298 route of requiring the type string to be taken from a controlled
299 vocabulary if an application expects others to make sense of it. The
300 type may qualified - so uniprot:CHAIN is a valid type name, and
301 considered distinct from someotherDB:CHAIN </xs:documentation>
307 <xs:element name="param">
310 <xs:documentation> Specifies a named and typed value used to perform some data
311 transformation. </xs:documentation>
312 <xs:documentation> LATER: experiment with xml validation of property set prototypes
313 for services </xs:documentation>
317 <xs:documentation> Named and typed property string </xs:documentation>
319 <xs:extension base="xs:string">
320 <xs:attribute name="name" type="xs:string" use="required"/>
321 <xs:attribute name="type" type="xs:string" use="required">
323 <xs:documentation> The type specifies how the property will be parsed.
324 Empty property strings are allowed, and can be used to prototype the
325 input to a document. TODO: specify allowed types </xs:documentation>
332 <xs:element name="input">
335 <xs:documentation> Selects all or part of a collection of vamsas objects as a named
336 input to some transformation process. Many inputs with the same name imply a
337 group input (such as a collection of sequences) </xs:documentation>
340 <xs:extension base="vamsas:rangeType">
341 <xs:attribute name="name" type="xs:string" use="required"/>
342 <xs:attribute name="objRef" type="xs:IDREFS" use="optional">
344 <xs:documentation> Reference Frame for rangeType specfication
352 <xs:element name="Provenance">
355 <xs:documentation> Defines the origin and series of operations applied directly to
356 the object that references it. </xs:documentation>
359 <xs:element name="entry" maxOccurs="unbounded">
362 <xs:element name="User" type="xs:string">
364 <xs:documentation> Who </xs:documentation>
367 <xs:element name="App" type="xs:string">
369 <xs:documentation> With which application </xs:documentation>
372 <xs:element name="Action" type="xs:string">
374 <xs:documentation> Did what </xs:documentation>
377 <xs:element name="Date" type="xs:dateTime">
379 <xs:documentation> When</xs:documentation>
382 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
384 <xs:documentation> additional information </xs:documentation>
387 <xs:element ref="vamsas:param" minOccurs="0" maxOccurs="unbounded">
389 <xs:documentation> parameter for the action </xs:documentation>
392 <xs:element ref="vamsas:input" minOccurs="0" maxOccurs="unbounded">
394 <xs:documentation> bioinformatic objects input to action
399 <xs:attribute name="id" type="xs:ID" use="optional">
401 <xs:documentation> Primary Key for vamsas object referencing
410 <xs:element name="DataSet">
413 <xs:documentation> A collection of sequences, alignments, trees and other things.
417 <xs:element name="Sequence" maxOccurs="unbounded">
420 <xs:documentation> a primary or secondary sequence record from which all
421 other sequences may be derived </xs:documentation>
424 <xs:extension base="vamsas:SequenceType">
426 <xs:element name="dbRef" minOccurs="0" maxOccurs="unbounded">
428 <xs:documentation> Store a list of database references
429 for this sequence record - with optional mapping
430 from database sequence to the given sequence record </xs:documentation>
436 <xs:element name="map" minOccurs="0" maxOccurs="unbounded">
438 <xs:documentation> From: Offset to first
439 position in dataset sequence record that
440 this database entry maps to To: Offset
441 to last position in dataset sequence
442 record that this database entry maps to
443 Start: Offset to first last position in
444 database entry that first (or offset)
445 position in sequence maps to End: Offset
446 to last position in database entry that
447 last (offset) position in sequence maps
448 to </xs:documentation>
452 <xs:extension base="vamsas:mapList"/>
456 <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
457 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
459 <xs:attribute name="source" type="xs:string" use="required">
461 <xs:documentation> TODO Database Naming
462 Convention: either start using LSID (so
463 change type to URI) or leave this as an
464 uncontrolled/unspecified string ID
468 <xs:attribute name="version" type="xs:string" use="required">
470 <xs:documentation> Version must be specified -
474 <xs:attribute name="accessionId" type="xs:string" use="required">
476 <xs:documentation> TODO: make some specification
477 of the database field from which this
478 accessionId is taken from - should that be a
479 special property of the dbRef object ?
483 <xs:attribute name="id" type="xs:ID" use="optional">
485 <xs:documentation> Primary Key for vamsas object
486 referencing </xs:documentation>
491 <xs:element name="vxref" type="vamsas:referenceType" minOccurs="0" maxOccurs="unbounded">
494 explicitly named cross reference to other objects in the document.
499 <xs:attribute name="id" type="xs:ID" use="optional">
501 <xs:documentation> Primary Key for vamsas object referencing
505 <xs:attribute name="dictionary" type="xs:string" use="required">
507 <xs:documentation> symbol class for sequence
515 <xs:element name="sequenceMapping" minOccurs="0" maxOccurs="unbounded">
518 <xs:element name="range" maxOccurs="unbounded">
520 <xs:attribute name="seqAStart" type="xs:int"/>
521 <xs:attribute name="seqAEnd" type="xs:int"/>
522 <xs:attribute name="seqBStart" type="xs:int"/>
523 <xs:attribute name="seqBEnd" type="xs:int"/>
526 <xs:element ref="vamsas:Provenance"/>
528 <xs:attribute name="sequenceA" type="xs:IDREF" use="required"/>
529 <xs:attribute name="sequenceB" type="xs:IDREF" use="required"/>
530 <xs:attribute name="id" type="xs:ID" use="optional"/>
533 <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
536 <xs:documentation> Annotate over positions and regions of a dataset
537 sequence </xs:documentation>
540 <xs:extension base="vamsas:rangeAnnotation">
542 <xs:element ref="vamsas:Provenance"/>
544 <xs:attribute name="seqRef" type="xs:IDREFS" use="required">
546 <xs:documentation> annotation is associated with a
547 particular dataset sequence </xs:documentation>
554 <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
557 <xs:element name="AlignmentAnnotation" minOccurs="0" maxOccurs="unbounded">
559 <xs:documentation> This is annotation over the coordinate frame
560 defined by all the columns in the alignment.
565 <xs:extension base="vamsas:rangeAnnotation">
567 <xs:element ref="vamsas:Provenance"/>
569 <xs:attribute name="graph" type="xs:boolean" use="required">
571 <xs:documentation> TODO: decide if this flag is
572 redundant - when true it would suggest that
573 the annotationElement values together form a
574 graph </xs:documentation>
577 <xs:attribute name="seqrefs" type="xs:IDREFS" use="optional">
579 <xs:documentation> annotation is associated with a
580 range on a particular group of alignment sequences</xs:documentation>
588 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
589 <xs:element name="alignmentSequence" maxOccurs="unbounded">
592 <xs:extension base="vamsas:SequenceType">
594 <xs:element name="AlignmentSequenceAnnotation" minOccurs="0" maxOccurs="unbounded">
597 <xs:documentation> Annotate over
598 positions and regions of the
599 ungapped sequence in the context of
600 the alignment </xs:documentation>
604 <xs:extension base="vamsas:rangeAnnotation">
606 <xs:element ref="vamsas:Provenance"/>
608 <xs:attribute name="graph" type="xs:boolean" use="required">
610 <xs:documentation> TODO:
611 decide if this flag is
612 redundant - when true it
613 would suggest that the
614 annotationElement values
615 together form a graph
622 This replaces the flat list of sequenceFeatures.
623 <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
624 <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
625 </xs:annotation><xs:complexContent>
626 <xs:extension base="vamsas:rangeFeature">
627 <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
628 <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>
631 </xs:complexContent></xs:complexType></xs:element> -->
635 <xs:attribute name="id" type="xs:ID" use="optional">
637 <xs:documentation> Primary Key for vamsas object
638 referencing </xs:documentation>
641 <xs:attribute name="refid" type="xs:IDREF" use="required">
643 <xs:documentation> Dataset Sequence from which
644 this alignment sequence is taken from
652 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
654 <xs:documentation> typical properties may be additional
655 alignment score objects </xs:documentation>
658 <xs:element ref="vamsas:Provenance"/>
660 <xs:attribute name="gapChar" type="xs:string" use="required"/>
661 <xs:attribute name="aligned" type="xs:boolean" use="optional"/>
662 <xs:attribute name="id" type="xs:ID" use="optional">
664 <xs:documentation> Primary Key for vamsas object referencing
668 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
671 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
672 <xs:element ref="vamsas:Provenance"/>
674 <xs:attribute name="id" type="xs:ID" use="optional">
676 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
681 <xs:element name="annotationElement">
684 <xs:documentation> per-site symbolic and/or quantitative annotation </xs:documentation>
685 <xs:documentation> SecondaryStructure and display character (from Jalview) have been
686 subsumed into the glyph element </xs:documentation>
689 <xs:element name="description" type="xs:string" minOccurs="0">
691 <xs:documentation> Free text at this position </xs:documentation>
694 <xs:element name="glyph" minOccurs="0" maxOccurs="unbounded">
696 <xs:documentation> Discrete symbol - possibly graphically represented
701 <xs:extension base="xs:string">
702 <xs:attribute name="dict" type="xs:string" use="optional" default="utf8">
704 <xs:documentation> specifies the symbol dictionary for this
705 glyph - eg utf8 (the default), aasecstr_3 or
706 kd_hydrophobicity - the content is not validated so
707 applications must ensure they gracefully deal with
708 invalid entries here </xs:documentation>
709 <xs:documentation> TODO: specify a minimum list of glyph
710 dictionaries to get us started and provide a way for the
711 vamsasClient to validate their content if regexes are
712 specified </xs:documentation>
719 <xs:element name="value" type="xs:float" minOccurs="0" maxOccurs="unbounded">
721 <xs:documentation> Ordered set of float values - an application may treat
722 the values together as a vector with common support for a set of
723 annotation elements - but this is, again, not validated so applications
724 should deal gracefully with varying numbers of dimensions
729 <xs:attribute name="position" type="xs:integer" use="required">
731 <xs:documentation> position with respect to the coordinate frame defined by a
732 rangeType specification </xs:documentation>
735 <xs:attribute name="after" type="xs:boolean" use="optional" default="false">
737 <xs:documentation> true means the annotation element appears between the
738 specified position and the next </xs:documentation>
741 <xs:attribute name="id" type="xs:ID" use="optional">
743 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
748 <xs:complexType name="SequenceType">
750 <xs:element name="sequence" type="xs:string"/>
751 <xs:element name="name" type="xs:string"/>
752 <xs:element name="description" type="xs:string" minOccurs="0"/>
753 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
755 <xs:documentation> additional typed properties </xs:documentation>
759 <xs:attribute name="start" type="xs:integer" use="required"/>
760 <xs:attribute name="end" type="xs:integer" use="required"/>
762 <xs:element name="ApplicationData">
765 <xs:documentation> Data specific to a particular type and version of vamsas
766 application </xs:documentation>
769 <xs:extension base="vamsas:appData">
771 <xs:element name="User" minOccurs="0" maxOccurs="unbounded">
774 <xs:extension base="vamsas:appData">
776 <xs:documentation> Data available to just a particular
777 user </xs:documentation>
779 <xs:attribute name="fullname" type="xs:string" use="required"/>
780 <xs:attribute name="organization" type="xs:string" use="required"/>
785 <xs:element name="Common" minOccurs="0">
788 <xs:extension base="vamsas:appData"/>
792 <xs:element name="Instance" minOccurs="0" maxOccurs="unbounded">
795 <xs:extension base="vamsas:appData">
797 <xs:documentation> Data available to just a specific
798 instance of the application </xs:documentation>
799 <xs:documentation> VAMSAS/Pierre: Is this data volatile
800 ? Application instances may not be accessible after
801 the session has closed - the user may have to be
802 presented with the option of picking up the data in
803 that instance </xs:documentation>
805 <xs:attribute name="urn" type="xs:string" use="required"/>
811 <xs:attribute name="version" type="xs:string" use="required">
813 <xs:documentation> Version string describing the application specific
814 data storage version used</xs:documentation>
817 <xs:attribute name="name" type="xs:string" use="required">
819 <xs:documentation> Canonical name of application </xs:documentation>
826 <xs:element name="Attachment">
829 <xs:extension base="vamsas:appData">
831 <xs:documentation> General data container to attach a typed data object to
832 any vamsas object </xs:documentation>
834 <xs:attribute name="compressed" type="xs:boolean" use="optional" default="false">
836 <xs:documentation> true implies data will be decompresses with Zip
837 before presenting to application </xs:documentation>
840 <xs:attribute name="type" type="xs:string" use="required">
842 <xs:documentation> Type of arbitrary data - TODO: decide format - use
843 (extended) MIME types ? </xs:documentation>
846 <xs:attribute name="objectref" type="xs:IDREF" use="required">
848 <xs:documentation> Object the arbitrary data is associated with
852 <xs:attribute name="id" type="xs:ID" use="optional">
854 <xs:documentation> Primary Key for vamsas object referencing
862 <xs:complexType name="appData">
864 <xs:element name="data" type="xs:base64Binary"/>
865 <xs:element name="dataReference" type="xs:string"/>
868 <xs:complexType name="mapList">
869 <xs:attribute name="from" type="xs:integer" use="optional" default="0">
871 <xs:documentation> Offset to first position in dataset sequence record that start
872 position on 'onto' maps to </xs:documentation>
875 <xs:attribute name="to" type="xs:integer" use="optional" default="0">
877 <xs:documentation> Offset to last position in dataset sequence record that end
878 position on 'onto' maps to </xs:documentation>
881 <xs:attribute name="start" type="xs:integer" use="required">
883 <xs:documentation> Offset to first position in database entry that first (or offset)
884 position in sequence maps to </xs:documentation>
887 <xs:attribute name="end" type="xs:integer" use="required">
889 <xs:documentation> Offset to last position in database entry that last (offset)
890 position in sequence maps to </xs:documentation>
894 <xs:simpleType name="locks">
897 Contains lock information:
898 locktype:ApplicationHandle
899 locktype is 'local' or 'full'
900 A lock is only valid if the ApplicationHandle resolves to a living application in the vamsas session.
901 A local lock means that the application has locked changes to all local properties on the object.
902 A full lock means that the application has locked changes to all properties on the object, and any objects that it holds references to.
905 <xs:restriction base="xs:string"/>