extended Colour element with additional optional attributes for graduated colour
[jalview.git] / schemas / vamsas.xsd
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
4   Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5   
6   This program is free software; you can redistribute it and/or
7   modify it under the terms of the GNU General Public License
8   as published by the Free Software Foundation; either version 2
9   of the License, or (at your option) any later version.
10   
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15   
16   You should have received a copy of the GNU General Public License
17   along with this program; if not, write to the Free Software
18   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
19 -->
20
21 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
22 <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">
23         <xs:complexType name="VAMSAS">
24                 <xs:sequence>
25                         <xs:element name="Tree" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
26                         <xs:element ref="vamsas:SequenceSet" minOccurs="0" maxOccurs="unbounded"/>
27                 </xs:sequence>
28         </xs:complexType>
29         <xs:complexType name="mapListType">
30                 <xs:annotation>
31                         <xs:documentation> 
32                                 developed after mapRangeType from http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
33                         </xs:documentation>
34                         <xs:documentation>
35                                 This effectively represents a java.util.MapList object
36                         </xs:documentation>
37                 </xs:annotation>
38                 <xs:sequence>
39                         <xs:element name="mapListFrom" minOccurs="0" maxOccurs="unbounded">
40                                 <xs:annotation>
41                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
42                                 </xs:annotation>
43                                 <xs:complexType>
44                                         <xs:attribute name="start" type="xs:int" use="required"/>
45                                         <xs:attribute name="end" type="xs:int" use="required"/>
46                                 </xs:complexType>
47                         </xs:element>                                   
48                         <xs:element name="mapListTo" minOccurs="0" maxOccurs="unbounded">
49                                 <xs:annotation>
50                                         <xs:documentation> a region from start to end inclusive</xs:documentation>
51                                 </xs:annotation>
52                                 <xs:complexType>
53                                         <xs:attribute name="start" type="xs:int" use="required"/>
54                                         <xs:attribute name="end" type="xs:int" use="required"/>
55                                 </xs:complexType>
56                         </xs:element>                                   
57                 </xs:sequence>
58                 <xs:attribute name="mapFromUnit" type="xs:positiveInteger" use="required">
59                         <xs:annotation>
60                                 <xs:documentation>number of dictionary symbol widths involved in each
61                                         mapped position on this sequence (for example, 3 for a dna sequence exon
62                                         region that is being mapped to a protein sequence). This is optional,
63                                         since the unit can be usually be inferred from the dictionary type of
64                                         each sequence involved in the mapping. </xs:documentation>
65                         </xs:annotation>
66                 </xs:attribute>
67                 <xs:attribute name="mapToUnit" type="xs:positiveInteger" use="required">
68                         <xs:annotation>
69                                 <xs:documentation>number of dictionary symbol widths involved in each
70                                         mapped position on this sequence (for example, 3 for a dna sequence exon
71                                         region that is being mapped to a protein sequence). This is optional,
72                                         since the unit can be usually be inferred from the dictionary type of
73                                         each sequence involved in the mapping. </xs:documentation>
74                         </xs:annotation>
75                 </xs:attribute>
76         </xs:complexType>
77         <xs:element name="Mapping">
78                 <xs:complexType>
79                         <xs:annotation>
80                                 <xs:documentation>
81                                         Represent the jalview.datamodel.Mapping object - it also provides
82                                         a way of storing sequences that are mapped 'to' without adding them
83                                         to the sequence set (which will mean they are then added to the alignment too).
84                                 </xs:documentation>
85                         </xs:annotation>
86                         <xs:complexContent>
87                                 <xs:extension base="vamsas:mapListType">
88                                         <xs:sequence>
89                                                 <xs:choice minOccurs="0" maxOccurs="1">
90                                                         <xs:element ref="vamsas:Sequence"/>
91                                                         <xs:element name="dseqFor">
92                                                                 <xs:simpleType>
93                                                                         <xs:restriction base="xs:string">
94                                                                                 <xs:annotation>
95                                                                                         <xs:documentation>The sequence whose dataset sequence is to be referenced here</xs:documentation>
96                                                                                 </xs:annotation>
97                                                                         </xs:restriction>
98                                                                 </xs:simpleType>
99                                                         </xs:element>
100                                                 </xs:choice>
101                                         </xs:sequence>
102                                 </xs:extension>
103                         </xs:complexContent>    
104                 </xs:complexType>
105         </xs:element>
106         <xs:element name="AlcodonFrame">
107                 <xs:complexType>
108                         <xs:sequence>
109                                 <xs:element name="alcodon" minOccurs="0" maxOccurs="unbounded">
110                                         <xs:complexType>
111                                                 <xs:annotation>
112                                                         <xs:documentation>
113                                                                 specifies a series of aligned codons from an associated DNA sequence alignment that when translated correspond to columns of a peptide alignment.
114                                                                 Element may have either all pos1,2,3 attributes specified, or none at all (indicating a gapped column with no translated peptide).
115                                                         </xs:documentation>
116                                                 </xs:annotation>
117                                                 <xs:attribute name="pos1" type="xs:integer" use="optional"/>
118                                                 <xs:attribute name="pos2" type="xs:integer" use="optional"/>
119                                                 <xs:attribute name="pos3" type="xs:integer" use="optional"/>
120                                         </xs:complexType>
121                                 </xs:element>
122                                 <xs:element name="alcodMap" minOccurs="0" maxOccurs="unbounded">
123                                         <xs:complexType>
124                                                 <xs:sequence>
125                                                         <xs:element ref="vamsas:Mapping" maxOccurs="1" minOccurs="1">
126                                                                 <xs:annotation>
127                                                                         <xs:documentation>
128                                                                                 a Mapping entry and an associated protein sequence
129                                                                         </xs:documentation>
130                                                                 </xs:annotation>
131                                                         </xs:element>
132                                                 </xs:sequence>
133                                                 <xs:attribute name="dnasq" type="xs:string" use="required">
134                                                         <xs:annotation>
135                                                                 <xs:documentation>
136                                                                         internal jalview id for the dnasq for this mapping.
137                                                                 </xs:documentation>
138                                                         </xs:annotation>
139                                                 </xs:attribute>
140                                         </xs:complexType>
141                                         
142                                 </xs:element>
143                                 
144                         </xs:sequence>
145                 </xs:complexType>
146         </xs:element>
147         <xs:element name="Sequence">
148                 <xs:complexType>
149                         <xs:complexContent>
150                                 <xs:extension base="vamsas:SequenceType">
151                                         <xs:sequence>
152                                                 <xs:element name="DBRef" minOccurs="0" maxOccurs="unbounded">
153                                                         <xs:complexType>
154                                                                 <xs:sequence>
155                                                                         <xs:element ref="vamsas:Mapping" minOccurs="0" maxOccurs="1"/>
156                                                                 </xs:sequence>                                                                                                  
157                                                                 <xs:attribute name="source" type="xs:string"/>
158                                                                 <xs:attribute name="version" type="xs:string"/>
159                                                                 <xs:attribute name="accessionId" type="xs:string"/>
160                                                         </xs:complexType>
161                                                 </xs:element>
162                                         </xs:sequence>
163                                         <xs:attribute name="dsseqid" type="xs:string" use="optional">
164                                                 <xs:annotation>
165                                                         <xs:documentation>
166                                                                 dataset sequence id for this sequence. Will be created as union of sequences.
167                                                         </xs:documentation>
168                                                 </xs:annotation>
169                                         </xs:attribute>
170                                 </xs:extension>
171                         </xs:complexContent>
172                 </xs:complexType>
173         </xs:element>
174         <xs:element name="Annotation">
175                 <xs:complexType>
176                         <xs:sequence>
177                                 <xs:element ref="vamsas:annotationElement" minOccurs="0" maxOccurs="unbounded"/>
178                                 <xs:element name="label" type="xs:string"/>
179                                 <xs:element name="description" type="xs:string" 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" use="optional"/>
191                         <xs:attribute name="graphColour" type="xs:int" use="optional"/>
192                         <xs:attribute name="graphGroup" type="xs:int" use="optional"/>
193                         <xs:attribute name="id" type="xs:string" use="optional"/>
194                         <xs:attribute name="scoreOnly" type="xs:boolean" use="optional" default="false"/>
195                         <xs:attribute name="score" type="xs:double" use="optional"/>
196                         <xs:attribute name="visible" type="xs:boolean" use="optional"/>
197                 </xs:complexType>
198         </xs:element>   
199         <xs:element name="SequenceSet">
200                 <xs:complexType>
201                         <xs:sequence>
202                                 <xs:element ref="vamsas:Sequence" minOccurs="0" maxOccurs="unbounded"/>
203                                 <xs:element ref="vamsas:Annotation" minOccurs="0" maxOccurs="unbounded"/>
204                                 <xs:element name="sequenceSetProperties" minOccurs="0" maxOccurs="unbounded">
205                                         <xs:complexType>
206                                                 <xs:attribute name="key" type="xs:string"/>
207                                                 <xs:attribute name="value" type="xs:string"/>
208                                         </xs:complexType>
209                                 </xs:element>
210                                 <xs:element ref="vamsas:AlcodonFrame" minOccurs="0" maxOccurs="unbounded"/>
211                         </xs:sequence>
212                         <xs:attribute name="gapChar" type="xs:string" use="required"/>
213                         <xs:attribute name="datasetId" type="xs:string" use="optional">
214                                 <xs:annotation>
215                                         <xs:documentation>
216                                                 reference to set where jalview will gather the dataset sequences for all sequences in the set. 
217                                         </xs:documentation>
218                                 </xs:annotation>
219                         </xs:attribute>
220                 </xs:complexType>
221         </xs:element>
222         <xs:element name="annotationElement">
223                 <xs:complexType>
224                         <xs:sequence>
225                                 <xs:element name="displayCharacter" type="xs:string" minOccurs="0"/>
226                                 <xs:element name="description" type="xs:string" minOccurs="0"/>
227                                 <xs:element name="secondaryStructure" minOccurs="0">
228                                         <xs:simpleType>
229                                                 <xs:restriction base="xs:string">
230                                                         <xs:length value="1"/>
231                                                 </xs:restriction>
232                                         </xs:simpleType>
233                                 </xs:element>
234                                 <xs:element name="value" type="xs:float" minOccurs="0"/>
235                         </xs:sequence>
236                         <xs:attribute name="position" type="xs:int" use="required"/>
237                         <xs:attribute name="colour" type="xs:int" use="optional"/>
238                 </xs:complexType>
239         </xs:element>
240         <xs:complexType name="SequenceType">
241                 <xs:sequence>
242                         <xs:element name="sequence" type="xs:string" minOccurs="0"/>
243                         <xs:element name="name" type="xs:string" minOccurs="0"/>
244                 </xs:sequence>
245                 <xs:attribute name="id" type="xs:string"/>
246                 <xs:attribute name="description" type="xs:string"/>
247         </xs:complexType>
248 </xs:schema>