ec6ec7c6d821b281871a8fdd241b6820e2b1f8d0
[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)
4   Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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 -->
19 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
20 <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">
21         <xs:complexType name="VAMSAS">
22                 <xs:sequence>
23                         <xs:element name="Tree" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
24                         <xs:element ref="vamsas:SequenceSet" minOccurs="0" maxOccurs="unbounded"/>
25                 </xs:sequence>
26         </xs:complexType>
27         <xs:complexType name="mapListType">
28                 <xs:annotation>
29                         <xs:documentation> 
30                                 developed after mapRangeType from http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
31                         </xs:documentation>
32                         <xs:documentation>
33                                 This effectively represents a java.util.MapList object
34                         </xs:documentation>
35                 </xs:annotation>
36                 <xs:sequence>
37                         <xs:element name="mapListFrom" minOccurs="0" maxOccurs="unbounded">
38                                 <xs:annotation>
39                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
40                                 </xs:annotation>
41                                 <xs:complexType>
42                                         <xs:attribute name="start" type="xs:int" use="required"/>
43                                         <xs:attribute name="end" type="xs:int" use="required"/>
44                                 </xs:complexType>
45                         </xs:element>                                   
46                         <xs:element name="mapListTo" minOccurs="0" maxOccurs="unbounded">
47                                 <xs:annotation>
48                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
49                                 </xs:annotation>
50                                 <xs:complexType>
51                                         <xs:attribute name="start" type="xs:int" use="required"/>
52                                         <xs:attribute name="end" type="xs:int" use="required"/>
53                                 </xs:complexType>
54                         </xs:element>                                   
55                 </xs:sequence>
56                 <xs:attribute name="mapFromUnit" type="xs:positiveInteger" use="required">
57                         <xs:annotation>
58                                 <xs:documentation>number of dictionary symbol widths involved in each
59                                         mapped position on this sequence (for example, 3 for a dna sequence exon
60                                         region that is being mapped to a protein sequence). This is optional,
61                                         since the unit can be usually be inferred from the dictionary type of
62                                         each sequence involved in the mapping. </xs:documentation>
63                         </xs:annotation>
64                 </xs:attribute>
65                 <xs:attribute name="mapToUnit" type="xs:positiveInteger" use="required">
66                         <xs:annotation>
67                                 <xs:documentation>number of dictionary symbol widths involved in each
68                                         mapped position on this sequence (for example, 3 for a dna sequence exon
69                                         region that is being mapped to a protein sequence). This is optional,
70                                         since the unit can be usually be inferred from the dictionary type of
71                                         each sequence involved in the mapping. </xs:documentation>
72                         </xs:annotation>
73                 </xs:attribute>
74         </xs:complexType>
75         <xs:element name="Mapping">
76                 <xs:complexType>
77                         <xs:annotation>
78                                 <xs:documentation>
79                                         Represent the jalview.datamodel.Mapping object - it also provides
80                                         a way of storing sequences that are mapped 'to' without adding them
81                                         to the sequence set (which will mean they are then added to the alignment too).
82                                 </xs:documentation>
83                         </xs:annotation>
84                         <xs:complexContent>
85                                 <xs:extension base="vamsas:mapListType">
86                                         <xs:sequence>
87                                                 <xs:choice minOccurs="0" maxOccurs="1">
88                                                         <xs:element ref="vamsas:Sequence"/>
89                                                         <xs:element name="dseqFor">
90                                                                 <xs:simpleType>
91                                                                         <xs:restriction base="xs:string">
92                                                                                 <xs:annotation>
93                                                                                         <xs:documentation>The sequence whose dataset sequence is to be referenced here</xs:documentation>
94                                                                                 </xs:annotation>
95                                                                         </xs:restriction>
96                                                                 </xs:simpleType>
97                                                         </xs:element>
98                                                 </xs:choice>
99                                         </xs:sequence>
100                                 </xs:extension>
101                         </xs:complexContent>    
102                 </xs:complexType>
103         </xs:element>
104         <xs:element name="AlcodonFrame">
105                 <xs:complexType>
106                         <xs:sequence>
107                                 <xs:element name="alcodon" minOccurs="0" maxOccurs="unbounded">
108                                         <xs:complexType>
109                                                 <xs:annotation>
110                                                         <xs:documentation>
111                                                                 specifies a series of aligned codons from an associated DNA sequence alignment that when translated correspond to columns of a peptide alignment.
112                                                                 Element may have either all pos1,2,3 attributes specified, or none at all (indicating a gapped column with no translated peptide).
113                                                         </xs:documentation>
114                                                 </xs:annotation>
115                                                 <xs:attribute name="pos1" type="xs:integer" use="optional"/>
116                                                 <xs:attribute name="pos2" type="xs:integer" use="optional"/>
117                                                 <xs:attribute name="pos3" type="xs:integer" use="optional"/>
118                                         </xs:complexType>
119                                 </xs:element>
120                                 <xs:element name="alcodMap" minOccurs="0" maxOccurs="unbounded">
121                                         <xs:complexType>
122                                                 <xs:sequence>
123                                                         <xs:element ref="vamsas:Mapping" maxOccurs="1" minOccurs="1">
124                                                                 <xs:annotation>
125                                                                         <xs:documentation>
126                                                                                 a Mapping entry and an associated protein sequence
127                                                                         </xs:documentation>
128                                                                 </xs:annotation>
129                                                         </xs:element>
130                                                 </xs:sequence>
131                                                 <xs:attribute name="dnasq" type="xs:string" use="required">
132                                                         <xs:annotation>
133                                                                 <xs:documentation>
134                                                                         internal jalview id for the dnasq for this mapping.
135                                                                 </xs:documentation>
136                                                         </xs:annotation>
137                                                 </xs:attribute>
138                                         </xs:complexType>
139                                         
140                                 </xs:element>
141                                 
142                         </xs:sequence>
143                 </xs:complexType>
144         </xs:element>
145         <xs:element name="Sequence">
146                 <xs:complexType>
147                         <xs:complexContent>
148                                 <xs:extension base="vamsas:SequenceType">
149                                         <xs:sequence>
150                                                 <xs:element name="DBRef" minOccurs="0" maxOccurs="unbounded">
151                                                         <xs:complexType>
152                                                                 <xs:sequence>
153                                                                         <xs:element ref="vamsas:Mapping" minOccurs="0" maxOccurs="1"/>
154                                                                 </xs:sequence>                                                                                                  
155                                                                 <xs:attribute name="source" type="xs:string"/>
156                                                                 <xs:attribute name="version" type="xs:string"/>
157                                                                 <xs:attribute name="accessionId" type="xs:string"/>
158                                                         </xs:complexType>
159                                                 </xs:element>
160                                         </xs:sequence>
161                                         <xs:attribute name="dsseqid" type="xs:string" use="optional">
162                                                 <xs:annotation>
163                                                         <xs:documentation>
164                                                                 dataset sequence id for this sequence. Will be created as union of sequences.
165                                                         </xs:documentation>
166                                                 </xs:annotation>
167                                         </xs:attribute>
168                                 </xs:extension>
169                         </xs:complexContent>
170                 </xs:complexType>
171         </xs:element>
172         <xs:element name="Annotation">
173                 <xs:complexType>
174                         <xs:sequence>
175                                 <xs:element ref="vamsas:annotationElement" minOccurs="0"
176                                         maxOccurs="unbounded" />
177                                 <xs:element name="label" type="xs:string" />
178                                 <xs:element name="description" type="xs:string"
179                                         minOccurs="0" />
180                                 <xs:element name="thresholdLine" minOccurs="0">
181                                         <xs:complexType>
182                                                 <xs:attribute name="label" type="xs:string" />
183                                                 <xs:attribute name="value" type="xs:float" />
184                                                 <xs:attribute name="colour" type="xs:int" />
185                                         </xs:complexType>
186                                 </xs:element>
187                         </xs:sequence>
188                         <xs:attribute name="graph" type="xs:boolean" use="required" />
189                         <xs:attribute name="graphType" type="xs:int" use="optional" />
190                         <xs:attribute name="sequenceRef" type="xs:string"
191                                 use="optional" />
192                         <xs:attribute name="groupRef" type="xs:string"
193                                 use="optional" />
194                         <xs:attribute name="graphColour" type="xs:int"
195                                 use="optional" />
196                         <xs:attribute name="graphGroup" type="xs:int"
197                                 use="optional" />
198                         <xs:attribute name="graphHeight" type="xs:int" use="optional">
199                         <xs:annotation><xs:documentation>height in pixels for the graph if this is a graph-type annotation.</xs:documentation></xs:annotation></xs:attribute>
200                         <xs:attribute name="id" type="xs:string" use="optional" />
201                         <xs:attribute name="scoreOnly" type="xs:boolean"
202                                 use="optional" default="false" />
203                         <xs:attribute name="score" type="xs:double" use="optional" />
204                         <xs:attribute name="visible" type="xs:boolean"
205                                 use="optional" />
206                         <xs:attribute name="centreColLabels" type="xs:boolean"
207                                 use="optional" />
208                         <xs:attribute name="scaleColLabels" type="xs:boolean"
209                                 use="optional" />
210                         <xs:attribute name="showAllColLabels" type="xs:boolean"
211                                 use="optional" />
212
213
214                         <xs:attribute name="autoCalculated" type="xs:boolean" use="optional" default="false">
215                         <xs:annotation><xs:documentation>is an autocalculated annotation row</xs:documentation>
216                         </xs:annotation></xs:attribute>
217                         <xs:attribute name="belowAlignment" type="xs:boolean" use="optional" default="true">
218                         <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>
219                         <xs:attribute name="calcId" type="xs:string" use="optional">
220                         <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>
221                         </xs:attribute>
222                 </xs:complexType>
223         </xs:element>   
224         <xs:element name="SequenceSet">
225                 <xs:complexType>
226                         <xs:sequence>
227                                 <xs:element ref="vamsas:Sequence" minOccurs="0" maxOccurs="unbounded"/>
228                                 <xs:element ref="vamsas:Annotation" minOccurs="0" maxOccurs="unbounded"/>
229                                 <xs:element name="sequenceSetProperties" minOccurs="0" maxOccurs="unbounded">
230                                         <xs:complexType>
231                                                 <xs:attribute name="key" type="xs:string"/>
232                                                 <xs:attribute name="value" type="xs:string"/>
233                                         </xs:complexType>
234                                 </xs:element>
235                                 <xs:element ref="vamsas:AlcodonFrame" minOccurs="0" maxOccurs="unbounded"/>
236                         </xs:sequence>
237                         <xs:attribute name="gapChar" type="xs:string" use="required"/>
238                         <xs:attribute name="datasetId" type="xs:string" use="optional">
239                                 <xs:annotation>
240                                         <xs:documentation>
241                                                 reference to set where jalview will gather the dataset sequences for all sequences in the set. 
242                                         </xs:documentation>
243                                 </xs:annotation>
244                         </xs:attribute>
245                 </xs:complexType>
246         </xs:element>
247         <xs:element name="annotationElement">
248                 <xs:complexType>
249                         <xs:sequence>
250                                 <xs:element name="displayCharacter" type="xs:string" minOccurs="0"/>
251                                 <xs:element name="description" type="xs:string" minOccurs="0"/>
252                                 <xs:element name="secondaryStructure" minOccurs="0">
253                                         <xs:simpleType>
254                                                 <xs:restriction base="xs:string">
255                                                         <xs:length value="1"/>
256                                                 </xs:restriction>
257                                         </xs:simpleType>
258                                 </xs:element>
259                                 <xs:element name="value" type="xs:float" minOccurs="0"/>
260                         </xs:sequence>
261                         <xs:attribute name="position" type="xs:int" use="required"/>
262                         <xs:attribute name="colour" type="xs:int" use="optional"/>
263                 </xs:complexType>
264         </xs:element>
265         <xs:complexType name="SequenceType">
266                 <xs:sequence>
267                         <xs:element name="sequence" type="xs:string" minOccurs="0"/>
268                         <xs:element name="name" type="xs:string" minOccurs="0"/>
269                 </xs:sequence>
270                 <xs:attribute name="id" type="xs:string"/>
271                 <xs:attribute name="description" type="xs:string"/>
272         </xs:complexType>
273 </xs:schema>