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