merge commit
[jalview.git] / schemas / vamsas.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
4  * Copyright (C) 2014 The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19 -->
20 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
21 <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">
22         <xs:complexType name="VAMSAS">
23                 <xs:sequence>
24                         <xs:element name="Tree" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
25                         <xs:element ref="vamsas:SequenceSet" minOccurs="0" maxOccurs="unbounded"/>
26                 </xs:sequence>
27         </xs:complexType>
28         <xs:complexType name="mapListType">
29                 <xs:annotation>
30                         <xs:documentation> 
31                                 developed after mapRangeType from http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
32                         </xs:documentation>
33                         <xs:documentation>
34                                 This effectively represents a java.util.MapList object
35                         </xs:documentation>
36                 </xs:annotation>
37                 <xs:sequence>
38                         <xs:element name="mapListFrom" minOccurs="0" maxOccurs="unbounded">
39                                 <xs:annotation>
40                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
41                                 </xs:annotation>
42                                 <xs:complexType>
43                                         <xs:attribute name="start" type="xs:int" use="required"/>
44                                         <xs:attribute name="end" type="xs:int" use="required"/>
45                                 </xs:complexType>
46                         </xs:element>                                   
47                         <xs:element name="mapListTo" minOccurs="0" maxOccurs="unbounded">
48                                 <xs:annotation>
49                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
50                                 </xs:annotation>
51                                 <xs:complexType>
52                                         <xs:attribute name="start" type="xs:int" use="required"/>
53                                         <xs:attribute name="end" type="xs:int" use="required"/>
54                                 </xs:complexType>
55                         </xs:element>                                   
56                 </xs:sequence>
57                 <xs:attribute name="mapFromUnit" type="xs:positiveInteger" use="required">
58                         <xs:annotation>
59                                 <xs:documentation>number of dictionary symbol widths involved in each
60                                         mapped position on this sequence (for example, 3 for a dna sequence exon
61                                         region that is being mapped to a protein sequence). This is optional,
62                                         since the unit can be usually be inferred from the dictionary type of
63                                         each sequence involved in the mapping. </xs:documentation>
64                         </xs:annotation>
65                 </xs:attribute>
66                 <xs:attribute name="mapToUnit" type="xs:positiveInteger" use="required">
67                         <xs:annotation>
68                                 <xs:documentation>number of dictionary symbol widths involved in each
69                                         mapped position on this sequence (for example, 3 for a dna sequence exon
70                                         region that is being mapped to a protein sequence). This is optional,
71                                         since the unit can be usually be inferred from the dictionary type of
72                                         each sequence involved in the mapping. </xs:documentation>
73                         </xs:annotation>
74                 </xs:attribute>
75         </xs:complexType>
76         <xs:element name="Mapping">
77                 <xs:complexType>
78                         <xs:annotation>
79                                 <xs:documentation>
80                                         Represent the jalview.datamodel.Mapping object - it also provides
81                                         a way of storing sequences that are mapped 'to' without adding them
82                                         to the sequence set (which will mean they are then added to the alignment too).
83                                 </xs:documentation>
84                         </xs:annotation>
85                         <xs:complexContent>
86                                 <xs:extension base="vamsas:mapListType">
87                                         <xs:sequence>
88                                                 <xs:choice minOccurs="0" maxOccurs="1">
89                                                         <xs:element ref="vamsas:Sequence"/>
90                                                         <xs:element name="dseqFor">
91                                                                 <xs:simpleType>
92                                                                         <xs:restriction base="xs:string">
93                                                                                 <xs:annotation>
94                                                                                         <xs:documentation>The sequence whose dataset sequence is to be referenced here</xs:documentation>
95                                                                                 </xs:annotation>
96                                                                         </xs:restriction>
97                                                                 </xs:simpleType>
98                                                         </xs:element>
99                                                 </xs:choice>
100                                         </xs:sequence>
101                                 </xs:extension>
102                         </xs:complexContent>    
103                 </xs:complexType>
104         </xs:element>
105         <xs:element name="AlcodonFrame">
106                 <xs:complexType>
107                         <xs:sequence>
108                                 <xs:element name="alcodon" minOccurs="0" maxOccurs="unbounded">
109                                         <xs:complexType>
110                                                 <xs:annotation>
111                                                         <xs:documentation>
112                                                                 specifies a series of aligned codons from an associated DNA sequence alignment that when translated correspond to columns of a peptide alignment.
113                                                                 Element may have either all pos1,2,3 attributes specified, or none at all (indicating a gapped column with no translated peptide).
114                                                         </xs:documentation>
115                                                 </xs:annotation>
116                                                 <xs:attribute name="pos1" type="xs:integer" use="optional"/>
117                                                 <xs:attribute name="pos2" type="xs:integer" use="optional"/>
118                                                 <xs:attribute name="pos3" type="xs:integer" use="optional"/>
119                                         </xs:complexType>
120                                 </xs:element>
121                                 <xs:element name="alcodMap" minOccurs="0" maxOccurs="unbounded">
122                                         <xs:complexType>
123                                                 <xs:sequence>
124                                                         <xs:element ref="vamsas:Mapping" maxOccurs="1" minOccurs="1">
125                                                                 <xs:annotation>
126                                                                         <xs:documentation>
127                                                                                 a Mapping entry and an associated protein sequence
128                                                                         </xs:documentation>
129                                                                 </xs:annotation>
130                                                         </xs:element>
131                                                 </xs:sequence>
132                                                 <xs:attribute name="dnasq" type="xs:string" use="required">
133                                                         <xs:annotation>
134                                                                 <xs:documentation>
135                                                                         internal jalview id for the dnasq for this mapping.
136                                                                 </xs:documentation>
137                                                         </xs:annotation>
138                                                 </xs:attribute>
139                                         </xs:complexType>
140                                         
141                                 </xs:element>
142                                 
143                         </xs:sequence>
144                 </xs:complexType>
145         </xs:element>
146         <xs:element name="Sequence">
147                 <xs:complexType>
148                         <xs:complexContent>
149                                 <xs:extension base="vamsas:SequenceType">
150                                         <xs:sequence>
151                                                 <xs:element name="DBRef" minOccurs="0" maxOccurs="unbounded">
152                                                         <xs:complexType>
153                                                                 <xs:sequence>
154                                                                         <xs:element ref="vamsas:Mapping" minOccurs="0" maxOccurs="1"/>
155                                                                 </xs:sequence>                                                                                                  
156                                                                 <xs:attribute name="source" type="xs:string"/>
157                                                                 <xs:attribute name="version" type="xs:string"/>
158                                                                 <xs:attribute name="accessionId" type="xs:string"/>
159                                                         </xs:complexType>
160                                                 </xs:element>
161                                         </xs:sequence>
162                                         <xs:attribute name="dsseqid" type="xs:string" use="optional">
163                                                 <xs:annotation>
164                                                         <xs:documentation>
165                                                                 dataset sequence id for this sequence. Will be created as union of sequences.
166                                                         </xs:documentation>
167                                                 </xs:annotation>
168                                         </xs:attribute>
169                                 </xs:extension>
170                         </xs:complexContent>
171                 </xs:complexType>
172         </xs:element>
173         <xs:element name="Annotation">
174                 <xs:complexType>
175                         <xs:sequence>
176                                 <xs:element ref="vamsas:annotationElement" minOccurs="0"
177                                         maxOccurs="unbounded" />
178                                 <xs:element name="label" type="xs:string" />
179                                 <xs:element name="description" type="xs:string"
180                                         minOccurs="0" />
181                                 <xs:element name="thresholdLine" minOccurs="0">
182                                         <xs:complexType>
183                                                 <xs:attribute name="label" type="xs:string" />
184                                                 <xs:attribute name="value" type="xs:float" />
185                                                 <xs:attribute name="colour" type="xs:int" />
186                                         </xs:complexType>
187                                 </xs:element>
188                                 <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
189                                         <xs:complexType>
190                                                 <xs:attribute name="name" type="xs:string" />
191                                                 <xs:attribute name="value" type="xs:string" />
192                                         </xs:complexType>
193                                 </xs:element>
194                         </xs:sequence>
195                         <xs:attribute name="graph" type="xs:boolean" use="required" />
196                         <xs:attribute name="graphType" type="xs:int" use="optional" />
197                         <xs:attribute name="sequenceRef" type="xs:string"
198                                 use="optional" />
199                         <xs:attribute name="groupRef" type="xs:string"
200                                 use="optional" />
201                         <xs:attribute name="graphColour" type="xs:int"
202                                 use="optional" />
203                         <xs:attribute name="graphGroup" type="xs:int"
204                                 use="optional" />
205                         <xs:attribute name="graphHeight" type="xs:int" use="optional">
206                         <xs:annotation><xs:documentation>height in pixels for the graph if this is a graph-type annotation.</xs:documentation></xs:annotation></xs:attribute>
207                         <xs:attribute name="id" type="xs:string" use="optional" />
208                         <xs:attribute name="scoreOnly" type="xs:boolean"
209                                 use="optional" default="false" />
210                         <xs:attribute name="score" type="xs:double" use="optional" />
211                         <xs:attribute name="visible" type="xs:boolean"
212                                 use="optional" />
213                         <xs:attribute name="centreColLabels" type="xs:boolean"
214                                 use="optional" />
215                         <xs:attribute name="scaleColLabels" type="xs:boolean"
216                                 use="optional" />
217                         <xs:attribute name="showAllColLabels" type="xs:boolean"
218                                 use="optional" />
219
220
221                         <xs:attribute name="autoCalculated" type="xs:boolean" use="optional" default="false">
222                         <xs:annotation><xs:documentation>is an autocalculated annotation row</xs:documentation>
223                         </xs:annotation></xs:attribute>
224                         <xs:attribute name="belowAlignment" type="xs:boolean" use="optional" default="true">
225                         <xs:annotation><xs:documentation>is to be shown below the alignment - introduced in Jalview 2.8 for visualizing T-COFFEE alignment scores</xs:documentation></xs:annotation></xs:attribute>
226                         <xs:attribute name="calcId" type="xs:string" use="optional">
227                         <xs:annotation><xs:documentation>Optional string identifier used to group sets of annotation produced by a particular calculation. Values are opaque strings but have semantic meaning to Jalview's renderer, data importer and calculation system.</xs:documentation></xs:annotation>
228                         </xs:attribute>
229                 </xs:complexType>
230         </xs:element>   
231         <xs:element name="SequenceSet">
232                 <xs:complexType>
233                         <xs:sequence>
234                                 <xs:element ref="vamsas:Sequence" minOccurs="0" maxOccurs="unbounded"/>
235                                 <xs:element ref="vamsas:Annotation" minOccurs="0" maxOccurs="unbounded"/>
236                                 <xs:element name="sequenceSetProperties" minOccurs="0" maxOccurs="unbounded">
237                                         <xs:complexType>
238                                                 <xs:attribute name="key" type="xs:string"/>
239                                                 <xs:attribute name="value" type="xs:string"/>
240                                         </xs:complexType>
241                                 </xs:element>
242                                 <xs:element ref="vamsas:AlcodonFrame" minOccurs="0" maxOccurs="unbounded"/>
243                         </xs:sequence>
244                         <xs:attribute name="gapChar" type="xs:string" use="required"/>
245                         <xs:attribute name="datasetId" type="xs:string" use="optional">
246                                 <xs:annotation>
247                                         <xs:documentation>
248                                                 reference to set where jalview will gather the dataset sequences for all sequences in the set. 
249                                         </xs:documentation>
250                                 </xs:annotation>
251                         </xs:attribute>
252                 </xs:complexType>
253         </xs:element>
254         <xs:element name="annotationElement">
255                 <xs:complexType>
256                         <xs:sequence>
257                                 <xs:element name="displayCharacter" type="xs:string" minOccurs="0"/>
258                                 <xs:element name="description" type="xs:string" minOccurs="0"/>
259                                 <xs:element name="secondaryStructure" minOccurs="0">
260                                         <xs:simpleType>
261                                                 <xs:restriction base="xs:string">
262                                                         <xs:length value="1"/>
263                                                 </xs:restriction>
264                                         </xs:simpleType>
265                                 </xs:element>
266                                 <xs:element name="value" type="xs:float" minOccurs="0"/>
267                         </xs:sequence>
268                         <xs:attribute name="position" type="xs:int" use="required"/>
269                         <xs:attribute name="colour" type="xs:int" use="optional"/>
270                 </xs:complexType>
271         </xs:element>
272         <xs:complexType name="SequenceType">
273                 <xs:sequence>
274                         <xs:element name="sequence" type="xs:string" minOccurs="0"/>
275                         <xs:element name="name" type="xs:string" minOccurs="0"/>
276                 </xs:sequence>
277                 <xs:attribute name="id" type="xs:string"/>
278                 <xs:attribute name="description" type="xs:string"/>
279         </xs:complexType>
280 </xs:schema>