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"
5 xmlns:vamsas="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes"
6 targetNamespace="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes" elementFormDefault="qualified"
7 attributeFormDefault="unqualified">
9 <xs:documentation> Vorba ID - Vamsas Object Request Broker Address ID (name needs to be
10 worked on): Suggest it could be of the form documentRoot/datasetName/SequenceUID for a
11 dataset sequence. Alignment sequence: documentRoot/datasetName/AlignmentId/SequenceUID
12 for an aligned form of a dataset sequence </xs:documentation>
14 <xs:element name="VAMSAS">
16 <xs:documentation> contains unassociated trees and a number of analysis sets
21 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
22 <xs:element ref="vamsas:DataSet" minOccurs="0" maxOccurs="unbounded"/>
24 <xs:attribute name="id" type="xs:ID" use="optional">
26 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
29 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
33 <xs:documentation> Properties. Generally, these are mutable so an application should check
34 them each time. This may change depending on the context of the property
37 <xs:element name="Tree">
40 <xs:documentation> Contains a named collection of trees </xs:documentation>
41 <xs:documentation> TODO: define way of referencing leaves of global tree for any
42 sequence/alignment object. SUggestion 1: Each named tree leafnode has a unique
43 id (which may be unique in combination with trees own vorba ID). Dataset
44 sequences can be tagged with a property "vamsas:tree_leaf" </xs:documentation>
47 <xs:element name="title" type="xs:string" minOccurs="0"/>
48 <xs:element name="newick" maxOccurs="unbounded">
51 <xs:extension base="xs:string">
52 <xs:attribute name="title" type="xs:string" use="optional"/>
53 <xs:attribute name="id" type="xs:ID" use="optional">
55 <xs:documentation> Primary Key for vamsas object referencing
59 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
64 <xs:element name="treenode" minOccurs="0" maxOccurs="unbounded">
66 <xs:documentation> node identity and mapping data between tree
67 representations and vamsas document objects </xs:documentation>
71 <xs:extension base="vamsas:nodeType">
72 <xs:attribute name="treeId" type="xs:IDREFS">
74 <xs:documentation> reference to one or more trees containing
75 the node being described. </xs:documentation>
78 <xs:attribute name="nodespec" type="xs:string">
80 <xs:documentation> String uniquely identifying a particular
81 node in the referenced tree according to the format of
82 the tree representation that is referenced.
91 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
92 <xs:element ref="vamsas:Provenance"/>
94 <xs:attribute name="id" type="xs:ID" use="optional">
96 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
99 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
102 <xs:complexType name="referenceType">
104 <xs:documentation> base type for citing arbitrary links between vamsas objects
108 <xs:extension base="xs:string">
110 <xs:documentation> 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
119 <xs:attribute name="refs" type="xs:IDREFS">
121 <xs:documentation>List of one or more vamsas object
122 references</xs:documentation>
128 <xs:complexType name="nodeType">
130 <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1">
132 <xs:documentation>Short name for this node</xs:documentation>
135 <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1">
137 <xs:documentation>Descriptive text for this node</xs:documentation>
140 <xs:element name="vref" type="vamsas:referenceType" minOccurs="0" maxOccurs="unbounded">
142 <xs:documentation>Direct associations between this node and any vamsas
143 objects</xs:documentation>
146 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
148 <xs:attribute name="id" type="xs:ID" use="optional">
150 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
153 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
155 <xs:element name="property">
159 <xs:documentation> Named and typed property string </xs:documentation>
161 <xs:extension base="xs:string">
162 <xs:attribute name="name" type="xs:string" use="required"/>
163 <xs:attribute name="type" type="xs:string" use="required">
165 <xs:documentation> The type specifies how the property will be parsed.
166 Empty property strings are allowed, and can be used to prototype the
167 input to a document. TODO: specify allowed types </xs:documentation>
174 <xs:element name="link">
177 <xs:documentation> Primitive labelled URI object </xs:documentation>
180 <xs:extension base="xs:string">
181 <xs:attribute name="href" type="xs:anyURI">
183 <xs:documentation>The URI</xs:documentation>
190 <xs:complexType name="rangeType" abstract="true">
192 <xs:documentation> Specify an ordered set of positions and/or regions on the principle
193 dimension of some associated vamsas object </xs:documentation>
194 <xs:documentation> Keeping to jaxb-1.0 specification for the moment - this choice should
195 become a substitution group when we use jaxb-2.0 capable bindings
199 <xs:element name="pos" maxOccurs="unbounded">
201 <xs:documentation> a position within the associated object's coordinate system
205 <xs:attribute name="i" type="xs:int" use="required"/>
208 <xs:element name="seg" maxOccurs="unbounded">
210 <xs:documentation> a region from start to end, with flag for inclusivity of
211 terminii </xs:documentation>
214 <xs:attribute name="start" type="xs:int" use="required"/>
215 <xs:attribute name="end" type="xs:int" use="required"/>
216 <xs:attribute name="inclusive" type="xs:boolean" use="required">
218 <xs:documentation> when false, a consecutive range like 'start=1, end=2'
219 means the region lying after position 1 and before position 2
226 <!-- Do we really need this - a position could be just a seg with start=end and inclusive=true -->
228 <xs:complexType name="rangeAnnotation">
230 <xs:documentation> Annotation for a rangeSpec - values can be attached for the whole
231 specification, and to each position within the spec. following the orientation
232 specified by the ordered set of rangeSpec (pos, seg) elements. </xs:documentation>
235 <xs:extension base="vamsas:rangeType">
237 <xs:element name="label" type="xs:string" minOccurs="0">
239 <xs:documentation> Short, meaningful name for the annotation - if this
240 is absent, then the type string should be used in its place.
244 <xs:element name="description" type="xs:string" minOccurs="0">
246 <xs:documentation> Human readable description of the annotation
250 <xs:element name="status" type="xs:string" minOccurs="0">
252 <xs:documentation> TODO: specify this - we have considered taking the GO
253 evidence codes as a model for assessing a measure of quality to an
254 annotation. </xs:documentation>
257 <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded">
259 <xs:documentation> Annotation Element position maps to ordered positions
260 defined by the sequence of rangeType pos positions or concatenated
261 seg start/end segments. </xs:documentation>
264 <xs:element name="score" minOccurs="0" maxOccurs="unbounded">
266 <xs:documentation> Ordered set of optionally named float values for the
267 whole annotation </xs:documentation>
271 <xs:extension base="xs:float">
272 <xs:attribute name="name" type="xs:string" use="optional"
278 <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
279 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
281 <xs:documentation> Note:These are mutable so an application should check
282 them each time. </xs:documentation>
286 <xs:attribute name="id" type="xs:ID" use="optional">
288 <xs:documentation> Primary Key for vamsas object referencing
292 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
293 <xs:attribute name="group" type="xs:string" use="optional" default="">
295 <xs:documentation> Annotation with the same non-empty group name are grouped
296 together </xs:documentation>
299 <xs:attribute name="type" type="xs:string" use="required">
301 <xs:documentation> A Das Feature has both a type and a Type ID. We go the
302 route of requiring the type string to be taken from a controlled
303 vocabulary if an application expects others to make sense of it. The
304 type may qualified - so uniprot:CHAIN is a valid type name, and
305 considered distinct from someotherDB:CHAIN </xs:documentation>
311 <xs:element name="param">
314 <xs:documentation> Specifies a named and typed value used to perform some data
315 transformation. </xs:documentation>
316 <xs:documentation> LATER: experiment with xml validation of property set prototypes
317 for services </xs:documentation>
321 <xs:documentation> Named and typed property string </xs:documentation>
323 <xs:extension base="xs:string">
324 <xs:attribute name="name" type="xs:string" use="required"/>
325 <xs:attribute name="type" type="xs:string" use="required">
327 <xs:documentation> The type specifies how the property will be parsed.
328 Empty property strings are allowed, and can be used to prototype the
329 input to a document. TODO: specify allowed types </xs:documentation>
336 <xs:element name="input">
339 <xs:documentation> Selects all or part of a collection of vamsas objects as a named
340 input to some transformation process. Many inputs with the same name imply a
341 group input (such as a collection of sequences) </xs:documentation>
344 <xs:extension base="vamsas:rangeType">
345 <xs:attribute name="name" type="xs:string" use="required"/>
346 <xs:attribute name="objRef" type="xs:IDREFS" use="optional">
348 <xs:documentation> Reference Frame for rangeType specfication
356 <xs:element name="Provenance">
359 <xs:documentation> Defines the origin and series of operations applied directly to
360 the object that references it. </xs:documentation>
363 <xs:element name="entry" maxOccurs="unbounded">
366 <xs:element name="User" type="xs:string">
368 <xs:documentation> Who </xs:documentation>
371 <xs:element name="App" type="xs:string">
373 <xs:documentation> With which application </xs:documentation>
376 <xs:element name="Action" type="xs:string">
378 <xs:documentation> Did what </xs:documentation>
381 <xs:element name="Date" type="xs:dateTime">
383 <xs:documentation> When</xs:documentation>
386 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
388 <xs:documentation> additional information </xs:documentation>
391 <xs:element ref="vamsas:param" minOccurs="0" maxOccurs="unbounded">
393 <xs:documentation> parameter for the action </xs:documentation>
396 <xs:element ref="vamsas:input" minOccurs="0" maxOccurs="unbounded">
398 <xs:documentation> bioinformatic objects input to action
403 <xs:attribute name="id" type="xs:ID" use="optional">
405 <xs:documentation> Primary Key for vamsas object referencing
414 <xs:element name="DataSet">
417 <xs:documentation> A collection of sequences, alignments, trees and other things. </xs:documentation>
418 <xs:documentation> TODO: Add a title field and properties for programs that can
419 present the user with different distinct datasets For the moment, the program
420 just presents them as a list and perhaps lets the user work out which dataset it
421 wants based on the alignments that it contains. (Dominik and Jim 7th June 2007)
425 <xs:element name="Sequence" maxOccurs="unbounded">
428 <xs:documentation> a primary or secondary sequence record from which all
429 other sequences may be derived </xs:documentation>
432 <xs:extension base="vamsas:SequenceType">
434 <xs:element name="dbRef" minOccurs="0" maxOccurs="unbounded">
436 <xs:documentation> Store a list of database references
437 for this sequence record - with optional mapping
438 from database sequence to the given sequence record </xs:documentation>
444 <xs:element name="map" minOccurs="0"
448 the local mapType maps from the parent
449 sequence coordinate frame to the reference
450 frame defined by the dbRef element.
451 The mapped mapType is the mapped range defined
452 on the dbRef element's reference frame.
453 Conventionally, the unit attribute defaults to 1, or
454 will be inferred from the local sequence's
455 dictionary type and any dictionary type associated
456 with the database being mapped to.
457 However, it may be used to avoid ambiguity.
462 <xs:extension base="vamsas:mapType">
463 <xs:attribute name="id" type="xs:ID"/>
468 <xs:element ref="vamsas:link" minOccurs="0"
469 maxOccurs="unbounded"/>
470 <xs:element ref="vamsas:property" minOccurs="0"
471 maxOccurs="unbounded"/>
473 <xs:attribute name="source" type="xs:string"
476 <xs:documentation> TODO Database Naming
477 Convention: either start using LSID (so
478 change type to URI) or leave this as an
479 uncontrolled/unspecified string ID
483 <xs:attribute name="version" type="xs:string"
486 <xs:documentation> Version must be specified -
490 <xs:attribute name="accessionId" type="xs:string"
493 <xs:documentation> TODO: make some specification
494 of the database field from which this
495 accessionId is taken from - should that be a
496 special property of the dbRef object ?
500 <xs:attribute name="id" type="xs:ID" use="optional">
502 <xs:documentation> Primary Key for vamsas object
503 referencing </xs:documentation>
508 <xs:element name="vxref" type="vamsas:referenceType"
509 minOccurs="0" maxOccurs="unbounded">
511 <xs:documentation> explicitly named cross reference to
512 other objects in the document. </xs:documentation>
516 <xs:attribute name="id" type="xs:ID" use="optional">
518 <xs:documentation> Primary Key for vamsas object referencing
522 <xs:attribute name="dictionary" type="xs:string" use="required">
524 <xs:documentation> symbol class for sequence
532 <xs:element name="sequenceMapping" minOccurs="0" maxOccurs="unbounded">
536 A mapping between the specified 'local' and 'mapped' sequence coordinate frames.
537 The step size between each coordinate frame depends on the sequence
538 dictionary types, or alternatively specified in the optional unit
539 attribute on each range element. </xs:documentation>
542 <xs:extension base="vamsas:mapType">
544 <xs:element ref="vamsas:Provenance"/>
546 <xs:attribute name="loc" type="xs:IDREF" use="required">
548 <xs:documentation> Object on which the local
549 range is defined. </xs:documentation>
552 <xs:attribute name="map" type="xs:IDREF" use="required">
554 <xs:documentation>Object on which the mapped
555 range is defined. </xs:documentation>
558 <xs:attribute name="id" type="xs:ID" use="optional"/>
563 <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
566 <xs:documentation> Annotate over positions and regions of a dataset
567 sequence </xs:documentation>
570 <xs:extension base="vamsas:rangeAnnotation">
572 <xs:element ref="vamsas:Provenance"/>
574 <xs:attribute name="seqRef" type="xs:IDREFS" use="required">
576 <xs:documentation> annotation is associated with a
577 particular dataset sequence </xs:documentation>
584 <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
587 <xs:element name="AlignmentAnnotation" minOccurs="0"
588 maxOccurs="unbounded">
590 <xs:documentation> This is annotation over the coordinate frame
591 defined by all the columns in the alignment.
596 <xs:extension base="vamsas:rangeAnnotation">
598 <xs:element ref="vamsas:Provenance"/>
600 <xs:attribute name="graph" type="xs:boolean"
603 <xs:documentation> TODO: decide if this flag is
604 redundant - when true it would suggest that
605 the annotationElement values together form a
606 graph </xs:documentation>
609 <xs:attribute name="seqrefs" type="xs:IDREFS"
612 <xs:documentation> annotation is associated with
613 a range on a particular group of alignment
614 sequences</xs:documentation>
622 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
623 <xs:element name="alignmentSequence" maxOccurs="unbounded">
626 <xs:extension base="vamsas:SequenceType">
628 <xs:element name="AlignmentSequenceAnnotation"
629 minOccurs="0" maxOccurs="unbounded">
632 <xs:documentation> Annotate over
633 positions and regions of the
634 ungapped sequence in the context of
635 the alignment </xs:documentation>
640 base="vamsas:rangeAnnotation">
643 ref="vamsas:Provenance"/>
645 <xs:attribute name="graph"
646 type="xs:boolean" use="required">
648 <xs:documentation> TODO:
649 decide if this flag is
650 redundant - when true it
651 would suggest that the
652 annotationElement values
653 together form a graph
660 This replaces the flat list of sequenceFeatures.
661 <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
662 <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
663 </xs:annotation><xs:complexContent>
664 <xs:extension base="vamsas:rangeFeature">
665 <xs:attribute name="seqRef" type="xs:IDREF" use="optional">
666 <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>
669 </xs:complexContent></xs:complexType></xs:element> -->
673 <xs:attribute name="id" type="xs:ID" use="optional">
675 <xs:documentation> Primary Key for vamsas object
676 referencing </xs:documentation>
679 <xs:attribute name="refid" type="xs:IDREF"
682 <xs:documentation> Dataset Sequence from which
683 this alignment sequence is taken from
691 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
693 <xs:documentation> typical properties may be additional
694 alignment score objects </xs:documentation>
697 <xs:element ref="vamsas:Provenance"/>
699 <xs:attribute name="gapChar" type="xs:string" use="required"/>
700 <xs:attribute name="aligned" type="xs:boolean" use="optional"/>
701 <xs:attribute name="id" type="xs:ID" use="optional">
703 <xs:documentation> Primary Key for vamsas object referencing
707 <xs:attribute name="modifiable" type="vamsas:locks" use="optional"/>
710 <xs:element ref="vamsas:Tree" minOccurs="0" maxOccurs="unbounded"/>
711 <xs:element ref="vamsas:Provenance"/>
713 <xs:attribute name="id" type="xs:ID" use="optional">
715 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
720 <xs:element name="annotationElement">
723 <xs:documentation> per-site symbolic and/or quantitative annotation </xs:documentation>
724 <xs:documentation> SecondaryStructure and display character (from Jalview) have been
725 subsumed into the glyph element </xs:documentation>
728 <xs:element name="description" type="xs:string" minOccurs="0">
730 <xs:documentation> Free text at this position </xs:documentation>
733 <xs:element name="glyph" minOccurs="0" maxOccurs="unbounded">
735 <xs:documentation> Discrete symbol - possibly graphically represented
740 <xs:extension base="xs:string">
741 <xs:attribute name="dict" type="xs:string" use="optional"
744 <xs:documentation> specifies the symbol dictionary for this
745 glyph - eg utf8 (the default), aasecstr_3 or
746 kd_hydrophobicity - the content is not validated so
747 applications must ensure they gracefully deal with
748 invalid entries here </xs:documentation>
749 <xs:documentation> TODO: specify a minimum list of glyph
750 dictionaries to get us started and provide a way for the
751 vamsasClient to validate their content if regexes are
752 specified </xs:documentation>
759 <xs:element name="value" type="xs:float" minOccurs="0" maxOccurs="unbounded">
761 <xs:documentation> Ordered set of float values - an application may treat
762 the values together as a vector with common support for a set of
763 annotation elements - but this is, again, not validated so applications
764 should deal gracefully with varying numbers of dimensions
769 <xs:attribute name="position" type="xs:integer" use="required">
771 <xs:documentation> position with respect to the coordinate frame defined by a
772 rangeType specification </xs:documentation>
775 <xs:attribute name="after" type="xs:boolean" use="optional" default="false">
777 <xs:documentation> true means the annotation element appears between the
778 specified position and the next </xs:documentation>
781 <xs:attribute name="id" type="xs:ID" use="optional">
783 <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
788 <xs:complexType name="SequenceType">
790 <xs:element name="sequence" type="xs:string"/>
791 <xs:element name="name" type="xs:string"/>
792 <xs:element name="description" type="xs:string" minOccurs="0"/>
793 <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded">
795 <xs:documentation> additional typed properties </xs:documentation>
799 <xs:attribute name="start" type="xs:integer" use="required"/>
800 <xs:attribute name="end" type="xs:integer" use="required"/>
802 <xs:element name="ApplicationData">
805 <xs:documentation> Data specific to a particular type and version of vamsas
806 application </xs:documentation>
809 <xs:extension base="vamsas:appData">
811 <xs:element name="User" minOccurs="0" maxOccurs="unbounded">
814 <xs:extension base="vamsas:appData">
816 <xs:documentation> Data available to just a particular
817 user </xs:documentation>
819 <xs:attribute name="fullname" type="xs:string"
821 <xs:attribute name="organization" type="xs:string"
827 <xs:element name="Common" minOccurs="0">
830 <xs:extension base="vamsas:appData"/>
834 <xs:element name="Instance" minOccurs="0" maxOccurs="unbounded">
837 <xs:extension base="vamsas:appData">
839 <xs:documentation> Data available to just a specific
840 instance of the application </xs:documentation>
841 <xs:documentation> VAMSAS/Pierre: Is this data volatile
842 ? Application instances may not be accessible after
843 the session has closed - the user may have to be
844 presented with the option of picking up the data in
845 that instance </xs:documentation>
847 <xs:attribute name="urn" type="xs:string" use="required"/>
853 <xs:attribute name="version" type="xs:string" use="required">
855 <xs:documentation> Version string describing the application specific
856 data storage version used</xs:documentation>
859 <xs:attribute name="name" type="xs:string" use="required">
861 <xs:documentation> Canonical name of application </xs:documentation>
868 <xs:element name="Attachment">
871 <xs:extension base="vamsas:appData">
873 <xs:documentation> General data container to attach a typed data object to
874 any vamsas object </xs:documentation>
876 <xs:attribute name="compressed" type="xs:boolean" use="optional" default="false">
878 <xs:documentation> true implies data will be decompresses with Zip
879 before presenting to application </xs:documentation>
882 <xs:attribute name="type" type="xs:string" use="required">
884 <xs:documentation> Type of arbitrary data - TODO: decide format - use
885 (extended) MIME types ? </xs:documentation>
888 <xs:attribute name="objectref" type="xs:IDREF" use="required">
890 <xs:documentation> Object the arbitrary data is associated with
894 <xs:attribute name="id" type="xs:ID" use="optional">
896 <xs:documentation> Primary Key for vamsas object referencing
904 <xs:complexType name="appData">
906 <xs:element name="data" type="xs:base64Binary"/>
907 <xs:element name="dataReference" type="xs:string"/>
910 <xs:complexType name="mapType">
912 <xs:documentation> Two sets of ranges defined between objects - usually sequences, indicating which
913 regions on each are mapped. </xs:documentation>
916 <xs:element name="local" type="vamsas:mapRangeType">
923 <xs:element name="mapped" type="vamsas:mapRangeType">
933 <xs:complexType name="mapRangeType">
935 <xs:extension base="vamsas:rangeType">
936 <xs:attribute name="unit" type="xs:positiveInteger" use="optional">
938 <xs:documentation> number of dictionary symbol widths involved in each
939 mapped position on this sequence (for example, 3 for a dna sequence exon
940 region that is being mapped to a protein sequence). This is optional,
941 since the unit can be usually be inferred from the dictionary type of
942 each sequence involved in the mapping. </xs:documentation>
949 <xs:simpleType name="locks">
951 <xs:documentation> Contains lock information: locktype:ApplicationHandle locktype is
952 'local' or 'full' A lock is only valid if the ApplicationHandle resolves to a living
953 application in the vamsas session. A local lock means that the application has
954 locked changes to all local properties on the object. A full lock means that the
955 application has locked changes to all properties on the object, and any objects that
956 it holds references to. </xs:documentation>
958 <xs:restriction base="xs:string"/>