added aligned codon frames, and dataset reference ids for sequenceSet and sequences...
[jalview.git] / schemas / vamsas.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
3 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="www.vamsas.ac.uk/jalview/version2" targetNamespace="www.vamsas.ac.uk/jalview/version2" elementFormDefault="qualified" attributeFormDefault="unqualified">
4         <xs:complexType name="VAMSAS">
5                 <xs:sequence>
6                         <xs:element name="Tree" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
7                         <xs:element ref="vamsas:SequenceSet" minOccurs="0" maxOccurs="unbounded"/>
8                 </xs:sequence>
9         </xs:complexType>
10         <xs:complexType name="mapListType">
11                 <xs:annotation>
12                         <xs:documentation> 
13                                 developed after mapRangeType from http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
14                         </xs:documentation>
15                         <xs:documentation>
16                                 This effectively represents a java.util.MapList object
17                         </xs:documentation>
18                 </xs:annotation>
19                 <xs:sequence>
20                         <xs:element name="mapListFrom" minOccurs="0" maxOccurs="unbounded">
21                                 <xs:annotation>
22                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
23                                 </xs:annotation>
24                                 <xs:complexType>
25                                         <xs:attribute name="start" type="xs:int" use="required"/>
26                                         <xs:attribute name="end" type="xs:int" use="required"/>
27                                 </xs:complexType>
28                         </xs:element>                                   
29                         <xs:element name="mapListTo" minOccurs="0" maxOccurs="unbounded">
30                                 <xs:annotation>
31                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
32                                 </xs:annotation>
33                                 <xs:complexType>
34                                         <xs:attribute name="start" type="xs:int" use="required"/>
35                                         <xs:attribute name="end" type="xs:int" use="required"/>
36                                 </xs:complexType>
37                         </xs:element>                                   
38                 </xs:sequence>
39                 <xs:attribute name="mapFromUnit" type="xs:positiveInteger" use="required">
40                         <xs:annotation>
41                                 <xs:documentation>number of dictionary symbol widths involved in each
42                                         mapped position on this sequence (for example, 3 for a dna sequence exon
43                                         region that is being mapped to a protein sequence). This is optional,
44                                         since the unit can be usually be inferred from the dictionary type of
45                                         each sequence involved in the mapping. </xs:documentation>
46                         </xs:annotation>
47                 </xs:attribute>
48                 <xs:attribute name="mapToUnit" type="xs:positiveInteger" use="required">
49                         <xs:annotation>
50                                 <xs:documentation>number of dictionary symbol widths involved in each
51                                         mapped position on this sequence (for example, 3 for a dna sequence exon
52                                         region that is being mapped to a protein sequence). This is optional,
53                                         since the unit can be usually be inferred from the dictionary type of
54                                         each sequence involved in the mapping. </xs:documentation>
55                         </xs:annotation>
56                 </xs:attribute>
57         </xs:complexType>
58         <xs:element name="Mapping">
59                 <xs:complexType>
60                         <xs:annotation>
61                                 <xs:documentation>
62                                         Represent the jalview.datamodel.Mapping object - it also provides
63                                         a way of storing sequences that are mapped 'to' without adding them
64                                         to the sequence set (which will mean they are then added to the alignment too).
65                                 </xs:documentation>
66                         </xs:annotation>
67                         <xs:complexContent>
68                                 <xs:extension base="vamsas:mapListType">
69                                         <xs:sequence>
70                                                 <xs:choice minOccurs="0" maxOccurs="1">
71                                                         <xs:element ref="vamsas:Sequence"/>
72                                                         <xs:element name="dseqFor">
73                                                                 <xs:simpleType>
74                                                                         <xs:restriction base="xs:string">
75                                                                                 <xs:annotation>
76                                                                                         <xs:documentation>The sequence whose dataset sequence is to be referenced here</xs:documentation>
77                                                                                 </xs:annotation>
78                                                                         </xs:restriction>
79                                                                 </xs:simpleType>
80                                                         </xs:element>
81                                                 </xs:choice>
82                                         </xs:sequence>
83                                 </xs:extension>
84                         </xs:complexContent>    
85                 </xs:complexType>
86         </xs:element>
87         <xs:element name="AlcodonFrame">
88                 <xs:complexType>
89                         <xs:sequence>
90                                 <xs:element name="alcodon" minOccurs="0" maxOccurs="unbounded">
91                                         <xs:complexType>
92                                                 <xs:attribute name="pos1" type="xs:integer"/>
93                                                 <xs:attribute name="pos2" type="xs:integer"/>
94                                                 <xs:attribute name="pos3" type="xs:integer"/>
95                                         </xs:complexType>
96                                 </xs:element>
97                                 <xs:element name="alcodMap" minOccurs="0" maxOccurs="unbounded">
98                                         <xs:complexType>
99                                                 <xs:sequence>
100                                                         <xs:element ref="vamsas:Mapping" maxOccurs="1" minOccurs="1">
101                                                                 <xs:annotation>
102                                                                         <xs:documentation>
103                                                                                 a Mapping entry and an associated protein sequence
104                                                                         </xs:documentation>
105                                                                 </xs:annotation>
106                                                         </xs:element>
107                                                 </xs:sequence>
108                                                 <xs:attribute name="dnasq" type="xs:string" use="required">
109                                                         <xs:annotation>
110                                                                 <xs:documentation>
111                                                                         internal jalview id for the dnasq for this mapping.
112                                                                 </xs:documentation>
113                                                         </xs:annotation>
114                                                 </xs:attribute>
115                                         </xs:complexType>
116                                         
117                                 </xs:element>
118                                 
119                         </xs:sequence>
120                 </xs:complexType>
121         </xs:element>
122         <xs:element name="Sequence">
123                 <xs:complexType>
124                         <xs:complexContent>
125                                 <xs:extension base="vamsas:SequenceType">
126                                         <xs:sequence>
127                                                 <xs:element name="DBRef" minOccurs="0" maxOccurs="unbounded">
128                                                         <xs:complexType>
129                                                                 <xs:sequence>
130                                                                         <xs:element ref="vamsas:Mapping" minOccurs="0" maxOccurs="1"/>
131                                                                 </xs:sequence>                                                                                                  
132                                                                 <xs:attribute name="source" type="xs:string"/>
133                                                                 <xs:attribute name="version" type="xs:string"/>
134                                                                 <xs:attribute name="accessionId" type="xs:string"/>
135                                                         </xs:complexType>
136                                                 </xs:element>
137                                         </xs:sequence>
138                                         <xs:attribute name="dsseqid" type="xs:string" use="optional">
139                                                 <xs:annotation>
140                                                         <xs:documentation>
141                                                                 dataset sequence id for this sequence. Will be created as union of sequences.
142                                                         </xs:documentation>
143                                                 </xs:annotation>
144                                         </xs:attribute>
145                                 </xs:extension>
146                         </xs:complexContent>
147                 </xs:complexType>
148         </xs:element>
149         <xs:element name="Annotation">
150                 <xs:complexType>
151                         <xs:sequence>
152                                 <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded"/>
153                                 <xs:element name="label" type="xs:string"/>
154                                 <xs:element name="description" type="xs:string" minOccurs="0"/>
155                                 <xs:element name="thresholdLine" minOccurs="0">
156                                         <xs:complexType>
157                                                 <xs:attribute name="label" type="xs:string"/>
158                                                 <xs:attribute name="value" type="xs:float"/>
159                                                 <xs:attribute name="colour" type="xs:int"/>
160                                         </xs:complexType>
161                                 </xs:element>
162                         </xs:sequence>
163                         <xs:attribute name="graph" type="xs:boolean" use="required"/>
164                         <xs:attribute name="graphType" type="xs:int" use="optional"/>
165                         <xs:attribute name="sequenceRef" type="xs:string" use="optional"/>
166                         <xs:attribute name="graphColour" type="xs:int" use="optional"/>
167                         <xs:attribute name="graphGroup" type="xs:int" use="optional"/>
168                         <xs:attribute name="id" type="xs:string" use="optional"/>
169                         <xs:attribute name="scoreOnly" type="xs:boolean" use="optional" default="false"/>
170                         <xs:attribute name="score" type="xs:double" use="optional"/>
171                         <xs:attribute name="visible" type="xs:boolean" use="optional"/>
172                 </xs:complexType>
173         </xs:element>   
174         <xs:element name="SequenceSet">
175                 <xs:complexType>
176                         <xs:sequence>
177                                 <xs:element ref="vamsas:Sequence" minOccurs="0" maxOccurs="unbounded"/>
178                                 <xs:element ref="vamsas:Annotation" minOccurs="0" maxOccurs="unbounded"/>
179                                 <xs:element name="sequenceSetProperties" minOccurs="0" maxOccurs="unbounded">
180                                         <xs:complexType>
181                                                 <xs:attribute name="key" type="xs:string"/>
182                                                 <xs:attribute name="value" type="xs:string"/>
183                                         </xs:complexType>
184                                 </xs:element>
185                                 <xs:element ref="vamsas:AlcodonFrame" minOccurs="0" maxOccurs="unbounded"/>
186                         </xs:sequence>
187                         <xs:attribute name="gapChar" type="xs:string" use="required"/>
188                         <xs:attribute name="datasetId" type="xs:string" use="optional">
189                                 <xs:annotation>
190                                         <xs:documentation>
191                                                 reference to set where jalview will gather the dataset sequences for all sequences in the set. 
192                                         </xs:documentation>
193                                 </xs:annotation>
194                         </xs:attribute>
195                 </xs:complexType>
196         </xs:element>
197         <xs:element name="annotationElement">
198                 <xs:complexType>
199                         <xs:sequence>
200                                 <xs:element name="displayCharacter" type="xs:string" minOccurs="0"/>
201                                 <xs:element name="description" type="xs:string" minOccurs="0"/>
202                                 <xs:element name="secondaryStructure" minOccurs="0">
203                                         <xs:simpleType>
204                                                 <xs:restriction base="xs:string">
205                                                         <xs:length value="1"/>
206                                                 </xs:restriction>
207                                         </xs:simpleType>
208                                 </xs:element>
209                                 <xs:element name="value" type="xs:float" minOccurs="0"/>
210                         </xs:sequence>
211                         <xs:attribute name="position" type="xs:int" use="required"/>
212                         <xs:attribute name="colour" type="xs:int" use="optional"/>
213                 </xs:complexType>
214         </xs:element>
215         <xs:complexType name="SequenceType">
216                 <xs:sequence>
217                         <xs:element name="sequence" type="xs:string" minOccurs="0"/>
218                         <xs:element name="name" type="xs:string" minOccurs="0"/>
219                 </xs:sequence>
220                 <xs:attribute name="id" type="xs:string"/>
221                 <xs:attribute name="description" type="xs:string"/>
222         </xs:complexType>
223 </xs:schema>