JAL-4124 Dataset holds list of MatrixType instances, MapOnAMatrixType allows multiple...
[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:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
28         xmlns:vamsas="www.vamsas.ac.uk/jalview/version2"
29         targetNamespace="www.vamsas.ac.uk/jalview/version2"
30         elementFormDefault="qualified" attributeFormDefault="unqualified">
31         <xs:complexType name="VAMSAS">
32                 <xs:sequence>
33                         <xs:element name="Tree" type="xs:string" minOccurs="0"
34                                 maxOccurs="unbounded" />
35                         <xs:element ref="vamsas:SequenceSet" minOccurs="0"
36                                 maxOccurs="unbounded" />
37                 </xs:sequence>
38         </xs:complexType>
39         <xs:complexType name="mapListType">
40                 <xs:annotation>
41                         <xs:documentation>
42                                 developed after mapRangeType from
43                                 http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes
44                         </xs:documentation>
45                         <xs:documentation>
46                                 This effectively represents a java.util.MapList
47                                 object
48                         </xs:documentation>
49                 </xs:annotation>
50                 <xs:sequence>
51                         <xs:element name="mapListFrom" minOccurs="0"
52                                 maxOccurs="unbounded">
53                                 <xs:annotation>
54                                         <xs:documentation> a region from start to end inclusive
55                                         </xs:documentation>
56                                 </xs:annotation>
57                                 <xs:complexType>
58                                         <xs:attribute name="start" type="xs:int"
59                                                 use="required" />
60                                         <xs:attribute name="end" type="xs:int" use="required" />
61                                 </xs:complexType>
62                         </xs:element>
63                         <xs:element name="mapListTo" minOccurs="0"
64                                 maxOccurs="unbounded">
65                                 <xs:annotation>
66                                         <xs:documentation> a region from start to end inclusive
67                                         </xs:documentation>
68                                 </xs:annotation>
69                                 <xs:complexType>
70                                         <xs:attribute name="start" type="xs:int"
71                                                 use="required" />
72                                         <xs:attribute name="end" type="xs:int" use="required" />
73                                 </xs:complexType>
74                         </xs:element>
75                 </xs:sequence>
76                 <xs:attribute name="mapFromUnit"
77                         type="xs:positiveInteger" use="required">
78                         <xs:annotation>
79                                 <xs:documentation>number of dictionary symbol widths involved in
80                                         each
81                                         mapped position on this sequence (for example, 3 for a dna
82                                         sequence exon
83                                         region that is being mapped to a protein sequence).
84                                         This is optional,
85                                         since the unit can be usually be inferred from the
86                                         dictionary type of
87                                         each sequence involved in the mapping.
88                                 </xs:documentation>
89                         </xs:annotation>
90                 </xs:attribute>
91                 <xs:attribute name="mapToUnit" type="xs:positiveInteger"
92                         use="required">
93                         <xs:annotation>
94                                 <xs:documentation>number of dictionary symbol widths involved in
95                                         each
96                                         mapped position on this sequence (for example, 3 for a dna
97                                         sequence exon
98                                         region that is being mapped to a protein sequence).
99                                         This is optional,
100                                         since the unit can be usually be inferred from the
101                                         dictionary type of
102                                         each sequence involved in the mapping.
103                                 </xs:documentation>
104                         </xs:annotation>
105                 </xs:attribute>
106         </xs:complexType>
107         <xs:element name="Mapping">
108                 <xs:complexType>
109                         <xs:annotation>
110                                 <xs:documentation>
111                                         Represent the jalview.datamodel.Mapping object -
112                                         it also provides
113                                         a way of storing sequences that are mapped 'to'
114                                         without adding them
115                                         to the sequence set (which will mean they are
116                                         then added to the alignment too).
117                                 </xs:documentation>
118                         </xs:annotation>
119                         <xs:complexContent>
120                                 <xs:extension base="vamsas:mapListType">
121                                         <xs:sequence>
122                                                 <xs:choice minOccurs="0" maxOccurs="1">
123                                                         <xs:element ref="vamsas:Sequence" />
124                                                         <xs:element name="dseqFor">
125                                                                 <xs:simpleType>
126                                                                         <xs:restriction base="xs:string">
127                                                                                 <xs:annotation>
128                                                                                         <xs:documentation>The sequence whose dataset sequence is to
129                                                                                                 be referenced here
130                                                                                         </xs:documentation>
131                                                                                 </xs:annotation>
132                                                                         </xs:restriction>
133                                                                 </xs:simpleType>
134                                                         </xs:element>
135                                                 </xs:choice>
136                                         </xs:sequence>
137                                         <xs:attribute name="mappingType" type="xs:string"
138                                                 use="optional">
139                                                 <xs:annotation>
140                                                         <xs:documentation>Biotype of the mapping e.g. CdsToPeptide
141                                                         </xs:documentation>
142                                                 </xs:annotation>
143                                         </xs:attribute>
144                                 </xs:extension>
145                         </xs:complexContent>
146                 </xs:complexType>
147         </xs:element>
148         <xs:element name="AlcodonFrame">
149                 <xs:complexType>
150                         <xs:sequence>
151                                 <xs:element name="alcodon" minOccurs="0"
152                                         maxOccurs="unbounded">
153                                         <xs:complexType>
154                                                 <xs:annotation>
155                                                         <xs:documentation>
156                                                                 specifies a series of aligned codons from an
157                                                                 associated DNA sequence alignment that when translated
158                                                                 correspond to columns of a peptide alignment.
159                                                                 Element may have
160                                                                 either all pos1,2,3 attributes specified, or none at all
161                                                                 (indicating a gapped column with no translated peptide).
162                                                         </xs:documentation>
163                                                 </xs:annotation>
164                                                 <xs:attribute name="pos1" type="xs:integer"
165                                                         use="optional" />
166                                                 <xs:attribute name="pos2" type="xs:integer"
167                                                         use="optional" />
168                                                 <xs:attribute name="pos3" type="xs:integer"
169                                                         use="optional" />
170                                         </xs:complexType>
171                                 </xs:element>
172                                 <xs:element name="alcodMap" minOccurs="0"
173                                         maxOccurs="unbounded">
174                                         <xs:complexType>
175                                                 <xs:sequence>
176                                                         <xs:element ref="vamsas:Mapping" maxOccurs="1"
177                                                                 minOccurs="1">
178                                                                 <xs:annotation>
179                                                                         <xs:documentation>
180                                                                                 a Mapping entry and an associated protein
181                                                                                 sequence
182                                                                         </xs:documentation>
183                                                                 </xs:annotation>
184                                                         </xs:element>
185                                                 </xs:sequence>
186                                                 <xs:attribute name="dnasq" type="xs:string"
187                                                         use="required">
188                                                         <xs:annotation>
189                                                                 <xs:documentation>
190                                                                         internal jalview id for the dnasq for this
191                                                                         mapping.
192                                                                 </xs:documentation>
193                                                         </xs:annotation>
194                                                 </xs:attribute>
195                                         </xs:complexType>
196
197                                 </xs:element>
198
199                         </xs:sequence>
200                 </xs:complexType>
201         </xs:element>
202         <xs:element name="Sequence">
203                 <xs:complexType>
204                         <xs:complexContent>
205                                 <xs:extension base="vamsas:SequenceType">
206                                         <xs:sequence>
207                                                 <xs:element name="DBRef" minOccurs="0"
208                                                         maxOccurs="unbounded">
209                                                         <xs:complexType>
210                                                                 <xs:sequence>
211                                                                         <xs:element ref="vamsas:Mapping" minOccurs="0"
212                                                                                 maxOccurs="1" />
213                                                                 </xs:sequence>
214                                                                 <xs:attribute name="source" type="xs:string" />
215                                                                 <xs:attribute name="version" type="xs:string" />
216                                                                 <xs:attribute name="accessionId" type="xs:string" />
217                                                                 <xs:attribute name="locus" type="xs:boolean"
218                                                                         default="false">
219                                                                         <xs:annotation>
220                                                                                 <xs:documentation>
221                                                                                         true for gene locus mapping, source=species,
222                                                                                         version=assembly, accession=chromosome
223                                                                                 </xs:documentation>
224                                                                         </xs:annotation>
225                                                                 </xs:attribute>
226                                                                 <xs:attribute name="canonical" type="xs:boolean"
227                                                                         default="false">
228                                                                         <xs:annotation>
229                                                                                 <xs:documentation>
230                                                                                         true for the representative accession for
231                                                                                         databases where multiple accessions map to the same entry
232                                                                                         (eg. Uniprot)
233                                                                                 </xs:documentation>
234                                                                         </xs:annotation>
235                                                                 </xs:attribute>
236                                                         </xs:complexType>
237                                                 </xs:element>
238                                         </xs:sequence>
239                                         <xs:attribute name="dsseqid" type="xs:string"
240                                                 use="optional">
241                                                 <xs:annotation>
242                                                         <xs:documentation>
243                                                                 dataset sequence id for this sequence. Will be
244                                                                 created as union of sequences.
245                                                         </xs:documentation>
246                                                 </xs:annotation>
247                                         </xs:attribute>
248                                         <xs:attribute name="biotype" type="xs:string"
249                                                 use="optional">
250                                                 <xs:annotation>
251                                                         <xs:documentation>
252                                                                 Biotype of the sequence (if known)
253                                                         </xs:documentation>
254                                                 </xs:annotation>
255                                         </xs:attribute>
256                                 </xs:extension>
257                         </xs:complexContent>
258                 </xs:complexType>
259         </xs:element>
260         <xs:element name="Annotation">
261                 <xs:complexType>
262                         <xs:sequence>
263                                 <xs:element ref="vamsas:annotationElement" minOccurs="0"
264                                         maxOccurs="unbounded" />
265                                 <xs:element name="label" type="xs:string" />
266                                 <xs:element name="description" type="xs:string"
267                                         minOccurs="0" />
268                                 <xs:element name="thresholdLine" minOccurs="0">
269                                         <xs:complexType>
270                                                 <xs:attribute name="label" type="xs:string" />
271                                                 <xs:attribute name="value" type="xs:float" />
272                                                 <xs:attribute name="colour" type="xs:int" />
273                                         </xs:complexType>
274                                 </xs:element>
275                                 <xs:element name="contactmatrix"
276                                         type="vamsas:MapOnAMatrixType" maxOccurs="unbounded" minOccurs="0">
277                                 </xs:element>
278                                 <xs:element name="property" type="vamsas:property"
279                                         minOccurs="0" maxOccurs="unbounded" />
280                         </xs:sequence>
281                         <xs:attribute name="graph" type="xs:boolean"
282                                 use="required" />
283                         <xs:attribute name="graphType" type="xs:int"
284                                 use="optional" />
285                         <xs:attribute name="sequenceRef" type="xs:string"
286                                 use="optional" />
287                         <xs:attribute name="groupRef" type="xs:string"
288                                 use="optional" />
289                         <xs:attribute name="graphColour" type="xs:int"
290                                 use="optional" />
291                         <xs:attribute name="graphGroup" type="xs:int"
292                                 use="optional" />
293                         <xs:attribute name="graphHeight" type="xs:int"
294                                 use="optional">
295                                 <xs:annotation>
296                                         <xs:documentation>height in pixels for the graph if this is a
297                                                 graph-type annotation.
298                                         </xs:documentation>
299                                 </xs:annotation>
300                         </xs:attribute>
301                         <xs:attribute name="id" type="xs:string" use="optional" />
302                         <xs:attribute name="scoreOnly" type="xs:boolean"
303                                 use="optional" default="false" />
304                         <xs:attribute name="score" type="xs:double"
305                                 use="optional" />
306                         <xs:attribute name="visible" type="xs:boolean"
307                                 use="optional" />
308                         <xs:attribute name="centreColLabels" type="xs:boolean"
309                                 use="optional" />
310                         <xs:attribute name="scaleColLabels" type="xs:boolean"
311                                 use="optional" />
312                         <xs:attribute name="showAllColLabels" type="xs:boolean"
313                                 use="optional" />
314
315
316                         <xs:attribute name="autoCalculated" type="xs:boolean"
317                                 use="optional" default="false">
318                                 <xs:annotation>
319                                         <xs:documentation>is an autocalculated annotation row
320                                         </xs:documentation>
321                                 </xs:annotation>
322                         </xs:attribute>
323                         <xs:attribute name="belowAlignment" type="xs:boolean"
324                                 use="optional" default="true">
325                                 <xs:annotation>
326                                         <xs:documentation>is to be shown below the alignment - introduced
327                                                 in Jalview 2.8 for visualizing T-COFFEE alignment scores
328                                         </xs:documentation>
329                                 </xs:annotation>
330                         </xs:attribute>
331                         <xs:attribute name="calcId" type="xs:string"
332                                 use="optional">
333                                 <xs:annotation>
334                                         <xs:documentation>Optional string identifier used to group sets of
335                                                 annotation produced by a particular calculation. Values are opaque
336                                                 strings but have semantic meaning to Jalview's renderer, data
337                                                 importer and calculation system.
338                                         </xs:documentation>
339                                 </xs:annotation>
340                         </xs:attribute>
341                 </xs:complexType>
342         </xs:element>
343         <xs:element name="SequenceSet">
344                 <xs:complexType>
345                         <xs:sequence>
346                                 <xs:element ref="vamsas:Sequence" minOccurs="0"
347                                         maxOccurs="unbounded" />
348                                 <xs:element ref="vamsas:Annotation" minOccurs="0"
349                                         maxOccurs="unbounded" />
350                                 <xs:element name="sequenceSetProperties" minOccurs="0"
351                                         maxOccurs="unbounded">
352                                         <xs:complexType>
353                                                 <xs:attribute name="key" type="xs:string" />
354                                                 <xs:attribute name="value" type="xs:string" />
355                                         </xs:complexType>
356                                 </xs:element>
357                                 <xs:element ref="vamsas:AlcodonFrame" minOccurs="0"
358                                         maxOccurs="unbounded" />
359                                 <xs:element name="Matrices" type="vamsas:MatrixType"
360                                         minOccurs="0" maxOccurs="unbounded">
361                                         <xs:annotation>
362                                                 <xs:documentation>Matrices referred to by this set of sequences.
363                                                 </xs:documentation>
364                                         </xs:annotation>
365                                 </xs:element>
366                         </xs:sequence>
367                         <xs:attribute name="gapChar" type="xs:string"
368                                 use="required" />
369                         <xs:attribute name="datasetId" type="xs:string"
370                                 use="optional">
371                                 <xs:annotation>
372                                         <xs:documentation>
373                                                 reference to set where jalview will gather the
374                                                 dataset sequences for all sequences in the set.
375                                         </xs:documentation>
376                                 </xs:annotation>
377                         </xs:attribute>
378                 </xs:complexType>
379         </xs:element>
380         <xs:element name="annotationElement">
381                 <xs:complexType>
382                         <xs:sequence>
383                                 <xs:element name="displayCharacter" type="xs:string"
384                                         minOccurs="0" />
385                                 <xs:element name="description" type="xs:string"
386                                         minOccurs="0" />
387                                 <xs:element name="secondaryStructure" minOccurs="0">
388                                         <xs:simpleType>
389                                                 <xs:restriction base="xs:string">
390                                                         <xs:length value="1" />
391                                                 </xs:restriction>
392                                         </xs:simpleType>
393                                 </xs:element>
394                                 <xs:element name="value" type="xs:float" minOccurs="0" />
395                         </xs:sequence>
396                         <xs:attribute name="position" type="xs:int"
397                                 use="required" />
398                         <xs:attribute name="colour" type="xs:int" use="optional" />
399                 </xs:complexType>
400         </xs:element>
401         <xs:complexType name="SequenceType">
402                 <xs:sequence>
403                         <xs:element name="sequence" type="xs:string" minOccurs="0" />
404                         <xs:element name="name" type="xs:string" minOccurs="0" />
405                 </xs:sequence>
406                 <xs:attribute name="id" type="xs:string" />
407                 <xs:attribute name="description" type="xs:string" />
408         </xs:complexType>
409         <xs:complexType name="MatrixType">
410                 <xs:annotation>
411                         <xs:documentation>Represents matrix data imported to Jalview, and the
412                                 results of any derived calculations (independent of a particular
413                                 view
414                                 on the matrix).
415                         </xs:documentation>
416                 </xs:annotation>
417                 <xs:sequence>
418                         <xs:element name="elements" type="xs:string" minOccurs="1"
419                                 maxOccurs="1">
420                                 <xs:annotation>
421                                         <xs:documentation>serialised representation of matrix as one or
422                                                 more sets of comma separated values
423                                         </xs:documentation>
424                                 </xs:annotation>
425                         </xs:element>
426                         <xs:element name="groups" type="xs:string" minOccurs="0"
427                                 maxOccurs="unbounded">
428                                 <xs:annotation>
429                                         <xs:documentation>Comma separated series of longs formed from
430                                                 bitsets defining partitions on the rows/columns of the matrix
431                                         </xs:documentation>
432                                 </xs:annotation>
433                         </xs:element>
434                         <xs:element name="newick" type="xs:string" minOccurs="0"
435                                 maxOccurs="unbounded">
436                                 <xs:annotation>
437                                         <xs:documentation>tree computed for this</xs:documentation>
438                                 </xs:annotation>
439                         </xs:element>
440                         <xs:element name="property" type="vamsas:property"
441                                 minOccurs="0" maxOccurs="unbounded" />
442                 </xs:sequence>
443
444                 <xs:attribute name="type" type="xs:string" use="required" />
445                 <xs:attribute name="rows" type="xs:integer"
446                         use="required" />
447                 <xs:attribute name="cols" type="xs:integer"
448                         use="required" />
449                 <xs:attribute name="treeMethod" type="xs:string"
450                         use="optional" />
451                 <xs:attribute name="cutHeight" type="xs:double"
452                         use="optional" />
453                 <xs:attribute name="id" type="xs:string" use="required" />
454
455         </xs:complexType>
456         <xs:complexType name="MapOnAMatrixType">
457                 <xs:annotation>
458                         <xs:documentation>Defines a mapping from the local frame to a matrix
459                                 and its associated data specified by MatrixType
460                         </xs:documentation>
461                 </xs:annotation>
462                 <xs:sequence>
463                         <xs:element name="property" type="vamsas:property"
464                                 minOccurs="0" maxOccurs="unbounded" />
465                         <xs:element name="mapping" type="vamsas:mapListType"
466                                 minOccurs="0" maxOccurs="1">
467                                 <xs:annotation>
468                                         <xs:documentation>mapping from the matrix row and column positions
469                                                 to
470                                                 associated reference frame
471                                         </xs:documentation>
472                                 </xs:annotation>
473                         </xs:element>
474                 </xs:sequence>
475
476                 <xs:attribute name="matrix" type="xs:string"
477                         use="required">
478
479                         <xs:annotation>
480                                 <xs:documentation>reference to the matrix type this Map refers to
481                                 </xs:documentation>
482                         </xs:annotation>
483                 </xs:attribute>
484                 <xs:attribute name="id" type="xs:string" use="optional" />
485         </xs:complexType>
486         <xs:complexType name="property">
487                 <xs:attribute name="name" type="xs:string" />
488                 <xs:attribute name="value" type="xs:string" />
489         </xs:complexType>
490
491
492 </xs:schema>