bio-nexml 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/Gemfile +15 -0
  2. data/Gemfile.lock +24 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.rdoc +47 -0
  5. data/Rakefile +55 -0
  6. data/TODO.txt +6 -0
  7. data/VERSION +1 -0
  8. data/bio-nexml.gemspec +126 -0
  9. data/extconf.rb +2 -0
  10. data/lib/bio-nexml.rb +0 -0
  11. data/lib/bio.rb +321 -0
  12. data/lib/bio/db/nexml.rb +109 -0
  13. data/lib/bio/db/nexml/mapper.rb +113 -0
  14. data/lib/bio/db/nexml/mapper/framework.rb +157 -0
  15. data/lib/bio/db/nexml/mapper/inflection.rb +99 -0
  16. data/lib/bio/db/nexml/mapper/repository.rb +59 -0
  17. data/lib/bio/db/nexml/matrix.rb +1046 -0
  18. data/lib/bio/db/nexml/parser.rb +622 -0
  19. data/lib/bio/db/nexml/schema/README.txt +21 -0
  20. data/lib/bio/db/nexml/schema/abstract.xsd +159 -0
  21. data/lib/bio/db/nexml/schema/characters/README.txt +1 -0
  22. data/lib/bio/db/nexml/schema/characters/abstractcharacters.xsd +361 -0
  23. data/lib/bio/db/nexml/schema/characters/characters.xsd +22 -0
  24. data/lib/bio/db/nexml/schema/characters/continuous.xsd +190 -0
  25. data/lib/bio/db/nexml/schema/characters/dna.xsd +282 -0
  26. data/lib/bio/db/nexml/schema/characters/protein.xsd +280 -0
  27. data/lib/bio/db/nexml/schema/characters/restriction.xsd +239 -0
  28. data/lib/bio/db/nexml/schema/characters/rna.xsd +283 -0
  29. data/lib/bio/db/nexml/schema/characters/standard.xsd +261 -0
  30. data/lib/bio/db/nexml/schema/external/sawsdl.xsd +21 -0
  31. data/lib/bio/db/nexml/schema/external/xhtml-datatypes-1.xsd +177 -0
  32. data/lib/bio/db/nexml/schema/external/xlink.xsd +75 -0
  33. data/lib/bio/db/nexml/schema/external/xml.xsd +145 -0
  34. data/lib/bio/db/nexml/schema/meta/README.txt +2 -0
  35. data/lib/bio/db/nexml/schema/meta/annotations.xsd +100 -0
  36. data/lib/bio/db/nexml/schema/meta/meta.xsd +294 -0
  37. data/lib/bio/db/nexml/schema/nexml.xsd +104 -0
  38. data/lib/bio/db/nexml/schema/taxa/README.txt +2 -0
  39. data/lib/bio/db/nexml/schema/taxa/taxa.xsd +39 -0
  40. data/lib/bio/db/nexml/schema/trees/README.txt +2 -0
  41. data/lib/bio/db/nexml/schema/trees/abstracttrees.xsd +135 -0
  42. data/lib/bio/db/nexml/schema/trees/network.xsd +113 -0
  43. data/lib/bio/db/nexml/schema/trees/tree.xsd +149 -0
  44. data/lib/bio/db/nexml/schema/trees/trees.xsd +36 -0
  45. data/lib/bio/db/nexml/taxa.rb +147 -0
  46. data/lib/bio/db/nexml/trees.rb +663 -0
  47. data/lib/bio/db/nexml/writer.rb +265 -0
  48. data/test/data/nexml/test.xml +69 -0
  49. data/test/test_bio-nexml.rb +17 -0
  50. data/test/unit/bio/db/nexml/tc_factory.rb +119 -0
  51. data/test/unit/bio/db/nexml/tc_mapper.rb +78 -0
  52. data/test/unit/bio/db/nexml/tc_matrix.rb +551 -0
  53. data/test/unit/bio/db/nexml/tc_parser.rb +21 -0
  54. data/test/unit/bio/db/nexml/tc_taxa.rb +118 -0
  55. data/test/unit/bio/db/nexml/tc_trees.rb +370 -0
  56. data/test/unit/bio/db/nexml/tc_writer.rb +633 -0
  57. metadata +253 -0
@@ -0,0 +1,280 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3
+ targetNamespace="http://www.nexml.org/2009"
4
+ xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
5
+ xmlns="http://www.nexml.org/2009"
6
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
7
+ elementFormDefault="qualified">
8
+ <xs:include schemaLocation="abstractcharacters.xsd"/>
9
+
10
+ <xs:annotation>
11
+ <xs:documentation>
12
+ This module defines concrete subclasses for the
13
+ <a href="../abstract">abstract</a> character matrix components
14
+ that all character matrices must implement. The subclasses
15
+ defined here apply to amino acid character data. In a verbose notation,
16
+ this data is represented as the "state" attribute of the &lt;cell&gt;
17
+ element, whose value-space is limited to the IUPAC single character
18
+ nucleotide symbols. In a compact notation, the same data
19
+ is represented as a sequence of tokens (whitespace is allowed but has no meaning).
20
+ </xs:documentation>
21
+ </xs:annotation>
22
+
23
+ <xs:simpleType name="AAToken">
24
+ <xs:annotation>
25
+ <xs:documentation>
26
+ The AAToken simple type is a restriction of AbstractSymbol
27
+ that defines an IUPAC single character amino acid symbol.
28
+ </xs:documentation>
29
+ <xs:appinfo>AminoAcid</xs:appinfo>
30
+ </xs:annotation>
31
+ <xs:restriction base="AbstractSymbol">
32
+ <xs:pattern value="[\*\-\?ABCDEFGHIKLMNPQRSTUVWXYZ]"/>
33
+ <xs:length value="1"/>
34
+ </xs:restriction>
35
+ </xs:simpleType>
36
+
37
+ <xs:complexType name="AAChar" sawsdl:modelReference="http://evolutionaryontology-dev.nescent.org/cdao.owl#AminoAcidResidueCharacter">
38
+ <xs:annotation>
39
+ <xs:documentation>
40
+ A concrete implementation of the AbstractChar element. In this implementation
41
+ there is no reference to explicitly defined states, as we use the IUPAC standard.
42
+ There must be an identifier ("id") that is of type xs:nonNegativeInteger to
43
+ define the column number.
44
+ </xs:documentation>
45
+ <xs:appinfo>Amino_Acid_Character</xs:appinfo>
46
+ </xs:annotation>
47
+ <xs:complexContent>
48
+ <xs:restriction base="AbstractChar">
49
+ <xs:sequence minOccurs="1" maxOccurs="1">
50
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
51
+ </xs:sequence>
52
+ <xs:attribute name="tokens" type="MSTokenLength" use="prohibited"/>
53
+ <xs:attribute name="states" type="xs:IDREF" use="required"/>
54
+ <xs:attribute name="codon" type="CodonPosition" use="prohibited"/>
55
+ <xs:attribute name="id" type="xs:ID" use="required"/>
56
+ </xs:restriction>
57
+ </xs:complexContent>
58
+ </xs:complexType>
59
+
60
+ <xs:complexType name="AAFormat" abstract="false">
61
+ <xs:annotation>
62
+ <xs:documentation> The AAFormat class is the container of amino acid column definitions.
63
+ </xs:documentation>
64
+ </xs:annotation>
65
+ <xs:complexContent>
66
+ <xs:restriction base="AbstractFormat">
67
+ <xs:sequence minOccurs="1" maxOccurs="1">
68
+ <xs:element name="states" type="AAStates" minOccurs="1" maxOccurs="unbounded"/>
69
+ <xs:element name="char" type="AAChar" minOccurs="1" maxOccurs="unbounded"/>
70
+ </xs:sequence>
71
+ </xs:restriction>
72
+ </xs:complexContent>
73
+ </xs:complexType>
74
+
75
+ <xs:complexType name="AAStates">
76
+ <xs:annotation>
77
+ <xs:documentation>
78
+ A container for a set of states.
79
+ </xs:documentation>
80
+ </xs:annotation>
81
+ <xs:complexContent>
82
+ <xs:restriction base="AbstractStates">
83
+ <xs:sequence minOccurs="1" maxOccurs="1">
84
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
85
+ <xs:element name="state" type="AAState" minOccurs="0" maxOccurs="unbounded"/>
86
+ <xs:element name="polymorphic_state_set" type="AAPolymorphicStateSet" minOccurs="0" maxOccurs="unbounded"/>
87
+ <xs:element name="uncertain_state_set" type="AAUncertainStateSet" minOccurs="0" maxOccurs="unbounded"/>
88
+ </xs:sequence>
89
+ </xs:restriction>
90
+ </xs:complexContent>
91
+ </xs:complexType>
92
+
93
+ <xs:complexType name="AAPolymorphicStateSet">
94
+ <xs:annotation>
95
+ <xs:documentation>
96
+ The AbstractState type is the superclass for a state definition.
97
+ The element encloses a required AbstractSymbol element that in restricted concrete
98
+ subclasses must be of a sensible type such as a single IUPAC character. It may
99
+ enclose zero or more AbstractMapping elements to resolve ambiguities.
100
+ </xs:documentation>
101
+ </xs:annotation>
102
+ <xs:complexContent>
103
+ <xs:restriction base="AbstractPolymorphicStateSet">
104
+ <xs:sequence minOccurs="1" maxOccurs="1">
105
+ <xs:element name="member" type="AAMapping" minOccurs="0" maxOccurs="unbounded"/>
106
+ <xs:element name="uncertain_state_set" type="AAUncertainStateSet" minOccurs="0" maxOccurs="unbounded"/>
107
+ </xs:sequence>
108
+ <xs:attribute name="symbol" type="AAToken" use="required"></xs:attribute>
109
+ </xs:restriction>
110
+ </xs:complexContent>
111
+ </xs:complexType>
112
+
113
+ <xs:complexType name="AAUncertainStateSet">
114
+ <xs:annotation>
115
+ <xs:documentation>
116
+ The AbstractState type is the superclass for a state definition.
117
+ The element encloses a required AbstractSymbol element that in restricted concrete
118
+ subclasses must be of a sensible type such as a single IUPAC character. It may
119
+ enclose zero or more AbstractMapping elements to resolve ambiguities.
120
+ </xs:documentation>
121
+ </xs:annotation>
122
+ <xs:complexContent>
123
+ <xs:restriction base="AbstractUncertainStateSet">
124
+ <xs:sequence minOccurs="1" maxOccurs="1">
125
+ <xs:element name="member" type="AAMapping" minOccurs="0" maxOccurs="unbounded"/>
126
+ </xs:sequence>
127
+ <xs:attribute name="symbol" type="AAToken" use="required"></xs:attribute>
128
+ </xs:restriction>
129
+ </xs:complexContent>
130
+ </xs:complexType>
131
+
132
+ <xs:complexType name="AAMapping">
133
+ <xs:annotation>
134
+ <xs:documentation>An IUPAC ambiguity mapping.</xs:documentation>
135
+ </xs:annotation>
136
+ <xs:complexContent>
137
+ <xs:restriction base="AbstractMapping"/>
138
+ </xs:complexContent>
139
+ </xs:complexType>
140
+
141
+ <xs:complexType name="AAState">
142
+ <xs:annotation>
143
+ <xs:documentation>
144
+ This is a concrete implementation of the state element, which requires
145
+ a symbol element, in this case restricted to DNAToken, i.e. a single IUPAC nucleotide
146
+ symbol, and optional mapping elements to refer to other states.
147
+ </xs:documentation>
148
+ </xs:annotation>
149
+ <xs:complexContent>
150
+ <xs:restriction base="AbstractState">
151
+ <xs:sequence minOccurs="1" maxOccurs="1"/>
152
+ <xs:attribute name="symbol" type="AAToken" use="required"></xs:attribute>
153
+ </xs:restriction>
154
+ </xs:complexContent>
155
+ </xs:complexType>
156
+
157
+ <xs:complexType name="AAObs" abstract="false" sawsdl:modelReference="http://evolutionaryontology-dev.nescent.org/cdao.owl#AminoAcidResidueStateDatum">
158
+ <xs:annotation>
159
+ <xs:documentation>
160
+ This is a single cell in a matrix containing
161
+ an amino acid observation.
162
+ </xs:documentation>
163
+ <xs:appinfo>Amino_Acid_State_Datum</xs:appinfo>
164
+ </xs:annotation>
165
+ <xs:complexContent>
166
+ <xs:restriction base="AbstractObs">
167
+ <xs:sequence minOccurs="1" maxOccurs="1">
168
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
169
+ </xs:sequence>
170
+ <xs:attribute name="char" use="required" type="xs:IDREF"/>
171
+ <xs:attribute name="state" use="required" type="xs:IDREF"/>
172
+ </xs:restriction>
173
+ </xs:complexContent>
174
+ </xs:complexType>
175
+
176
+ <xs:simpleType name="AASeq">
177
+ <xs:annotation>
178
+ <xs:documentation>
179
+ This is a simple type that specifies a sequence of amino acid characters,
180
+ following IUPAC single character symbols for aa (and ambiguities).
181
+ </xs:documentation>
182
+ </xs:annotation>
183
+ <xs:restriction base="AbstractSeq">
184
+ <xs:pattern value="[\*\-\?ABCDEFGHIKLMNPQRSTUVWXYZ\s]*"/>
185
+ </xs:restriction>
186
+ </xs:simpleType>
187
+
188
+ <xs:complexType name="AAMatrixSeqRow" abstract="false">
189
+ <xs:annotation>
190
+ <xs:documentation> This is a row in a matrix of amino acid data containing raw sequence data. </xs:documentation>
191
+ </xs:annotation>
192
+ <xs:complexContent>
193
+ <xs:restriction base="AbstractSeqRow">
194
+ <xs:sequence minOccurs="1" maxOccurs="1">
195
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
196
+ <xs:element name="seq" minOccurs="1" maxOccurs="1" type="AASeq"/>
197
+ </xs:sequence>
198
+ </xs:restriction>
199
+ </xs:complexContent>
200
+ </xs:complexType>
201
+
202
+ <xs:complexType name="AAMatrixObsRow" abstract="false">
203
+ <xs:annotation>
204
+ <xs:documentation> This is a row in a matrix of amino acid data containing granular observations. </xs:documentation>
205
+ </xs:annotation>
206
+ <xs:complexContent>
207
+ <xs:restriction base="AbstractObsRow">
208
+ <xs:sequence minOccurs="1" maxOccurs="1">
209
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
210
+ <xs:element name="cell" minOccurs="1" maxOccurs="unbounded" type="AAObs"/>
211
+ </xs:sequence>
212
+ </xs:restriction>
213
+ </xs:complexContent>
214
+ </xs:complexType>
215
+
216
+ <xs:complexType name="AASeqMatrix" abstract="false">
217
+ <xs:annotation>
218
+ <xs:documentation>
219
+ A matrix of rows with amino acid data as sequence strings.
220
+ </xs:documentation>
221
+ </xs:annotation>
222
+ <xs:complexContent>
223
+ <xs:restriction base="AbstractSeqMatrix">
224
+ <xs:sequence minOccurs="1" maxOccurs="1">
225
+ <xs:element name="row" minOccurs="1" maxOccurs="unbounded" type="AAMatrixSeqRow"/>
226
+ </xs:sequence>
227
+ </xs:restriction>
228
+ </xs:complexContent>
229
+ </xs:complexType>
230
+
231
+ <xs:complexType name="AAObsMatrix" abstract="false">
232
+ <xs:annotation>
233
+ <xs:documentation>
234
+ A matrix of rows with single character observations.
235
+ </xs:documentation>
236
+ </xs:annotation>
237
+ <xs:complexContent>
238
+ <xs:restriction base="AbstractObsMatrix">
239
+ <xs:sequence minOccurs="1" maxOccurs="1">
240
+ <xs:element name="row" minOccurs="1" maxOccurs="unbounded" type="AAMatrixObsRow"/>
241
+ </xs:sequence>
242
+ </xs:restriction>
243
+ </xs:complexContent>
244
+ </xs:complexType>
245
+
246
+ <xs:complexType name="ProteinSeqs" abstract="false">
247
+ <xs:annotation>
248
+ <xs:documentation>
249
+ An amino acid characters block consisting of sequences preceded by metadata.
250
+ </xs:documentation>
251
+ </xs:annotation>
252
+ <xs:complexContent>
253
+ <xs:restriction base="AbstractSeqs">
254
+ <xs:sequence minOccurs="1" maxOccurs="1">
255
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
256
+ <xs:element name="format" minOccurs="1" maxOccurs="1" type="AAFormat"/>
257
+ <xs:element name="matrix" minOccurs="1" maxOccurs="1" type="AASeqMatrix"/>
258
+ </xs:sequence>
259
+ </xs:restriction>
260
+ </xs:complexContent>
261
+ </xs:complexType>
262
+
263
+ <xs:complexType name="ProteinCells" abstract="false">
264
+ <xs:annotation>
265
+ <xs:documentation>
266
+ An amino acid characters block consisting of granular cells preceded by metadata.
267
+ </xs:documentation>
268
+ </xs:annotation>
269
+ <xs:complexContent>
270
+ <xs:restriction base="AbstractCells">
271
+ <xs:sequence minOccurs="1" maxOccurs="1">
272
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
273
+ <xs:element name="format" minOccurs="1" maxOccurs="1" type="AAFormat"/>
274
+ <xs:element name="matrix" minOccurs="1" maxOccurs="1" type="AAObsMatrix"/>
275
+ </xs:sequence>
276
+ </xs:restriction>
277
+ </xs:complexContent>
278
+ </xs:complexType>
279
+
280
+ </xs:schema>
@@ -0,0 +1,239 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xs:schema
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
4
+ targetNamespace="http://www.nexml.org/2009"
5
+ xmlns="http://www.nexml.org/2009"
6
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
7
+ elementFormDefault="qualified">
8
+ <xs:include schemaLocation="abstractcharacters.xsd"/>
9
+
10
+ <!--
11
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"
12
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>-->
13
+ <xs:annotation>
14
+ <xs:documentation>
15
+ This module defines concrete subclasses for the
16
+ <a href="../abstract">abstract</a> character matrix components
17
+ that all character matrices must implement. The subclasses
18
+ defined here apply to restriction site data. In a verbose notation,
19
+ this data is represented as the "state" attribute of the &lt;cell&gt;
20
+ element, whose value-space is limited to 0 or 1. In a compact
21
+ notation, the same data is represented as a sequence of tokens (whitespace is allowed but has no meaning).
22
+ </xs:documentation>
23
+ </xs:annotation>
24
+ <xs:simpleType name="RestrictionToken">
25
+ <xs:restriction base="xs:integer">
26
+ <xs:minInclusive value="0"/>
27
+ <xs:maxInclusive value="1"/>
28
+ </xs:restriction>
29
+ </xs:simpleType>
30
+
31
+ <!--
32
+ A restriction site matrix only has presence (1) or absence (0), so
33
+ state definitions and ambiguity mappings are omitted.
34
+
35
+ <xs:complexType name="StandardMapping">
36
+ <xs:annotation>
37
+ <xs:documentation>A standard character ambiguity mapping.</xs:documentation>
38
+ </xs:annotation>
39
+ <xs:complexContent>
40
+ <xs:restriction base="AbstractMapping"/>
41
+ </xs:complexContent>
42
+ </xs:complexType>
43
+ -->
44
+ <xs:complexType name="RestrictionState">
45
+ <xs:annotation>
46
+ <xs:documentation> This is a concrete implementation of the state element, which requires
47
+ a symbol element, in this case restricted to integers, and optional mapping
48
+ elements to refer to other states. </xs:documentation>
49
+ </xs:annotation>
50
+ <xs:complexContent>
51
+ <xs:restriction base="AbstractState">
52
+ <xs:sequence minOccurs="1" maxOccurs="1"/>
53
+ <xs:attribute name="symbol" type="RestrictionToken" use="required"/>
54
+ </xs:restriction>
55
+ </xs:complexContent>
56
+ </xs:complexType>
57
+
58
+ <xs:complexType name="RestrictionStates">
59
+ <xs:annotation>
60
+ <xs:documentation>
61
+ A container for a set of states.
62
+ </xs:documentation>
63
+ </xs:annotation>
64
+ <xs:complexContent>
65
+ <xs:restriction base="AbstractStates">
66
+ <xs:sequence minOccurs="1" maxOccurs="1">
67
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
68
+ <xs:element name="state" type="RestrictionState" minOccurs="2" maxOccurs="2"/>
69
+ </xs:sequence>
70
+ </xs:restriction>
71
+ </xs:complexContent>
72
+ </xs:complexType>
73
+
74
+ <xs:complexType name="RestrictionChar">
75
+ <xs:annotation>
76
+ <xs:documentation>
77
+ A concrete implementation of the char element,
78
+ which only requires a unique identifier.
79
+ </xs:documentation>
80
+ </xs:annotation>
81
+ <xs:complexContent>
82
+ <xs:restriction base="AbstractChar">
83
+ <xs:sequence minOccurs="1" maxOccurs="1">
84
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
85
+ </xs:sequence>
86
+ <xs:attribute name="tokens" type="MSTokenLength" use="prohibited"/>
87
+ <xs:attribute name="states" type="xs:IDREF" use="required"/>
88
+ <xs:attribute name="codon" type="CodonPosition" use="prohibited"/>
89
+ <xs:attribute name="id" type="xs:ID" use="required"/>
90
+ </xs:restriction>
91
+ </xs:complexContent>
92
+ </xs:complexType>
93
+
94
+ <xs:complexType name="RestrictionFormat" abstract="false">
95
+ <xs:annotation>
96
+ <xs:documentation> The RestrictionFormat class is the container of restriction column definitions.
97
+ </xs:documentation>
98
+ </xs:annotation>
99
+ <xs:complexContent>
100
+ <xs:restriction base="AbstractFormat">
101
+ <xs:sequence minOccurs="1" maxOccurs="1">
102
+ <xs:element name="states" type="RestrictionStates" minOccurs="1" maxOccurs="unbounded"/>
103
+ <xs:element name="char" type="RestrictionChar" minOccurs="1" maxOccurs="unbounded"/>
104
+ </xs:sequence>
105
+ </xs:restriction>
106
+ </xs:complexContent>
107
+ </xs:complexType>
108
+
109
+ <xs:complexType name="RestrictionObs" abstract="false">
110
+ <xs:annotation>
111
+ <xs:documentation>
112
+ This is a single cell in a matrix containing a
113
+ restriction site observation.
114
+ </xs:documentation>
115
+ </xs:annotation>
116
+ <xs:complexContent>
117
+ <xs:restriction base="AbstractObs">
118
+ <xs:sequence minOccurs="1" maxOccurs="1">
119
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
120
+ </xs:sequence>
121
+ <xs:attribute name="char" use="required" type="xs:IDREF"/>
122
+ <xs:attribute name="state" use="required" type="xs:IDREF"/>
123
+ </xs:restriction>
124
+ </xs:complexContent>
125
+ </xs:complexType>
126
+
127
+ <xs:simpleType name="RestrictionSeq">
128
+ <xs:annotation>
129
+ <xs:documentation>
130
+ This is a simple type that specifies a
131
+ sequence of restriction site characters.
132
+ </xs:documentation>
133
+ </xs:annotation>
134
+ <xs:restriction base="xs:string">
135
+ <xs:pattern value="[01\s]*"></xs:pattern>
136
+ </xs:restriction>
137
+ </xs:simpleType>
138
+
139
+ <xs:complexType name="RestrictionMatrixSeqRow" abstract="false">
140
+ <xs:annotation>
141
+ <xs:documentation>
142
+ This is a row in a matrix of restriction
143
+ site data as character sequences.
144
+ </xs:documentation>
145
+ </xs:annotation>
146
+ <xs:complexContent>
147
+ <xs:restriction base="AbstractSeqRow">
148
+ <xs:sequence minOccurs="1" maxOccurs="1">
149
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
150
+ <xs:element name="seq" minOccurs="1" maxOccurs="1" type="RestrictionSeq"/>
151
+ </xs:sequence>
152
+ </xs:restriction>
153
+ </xs:complexContent>
154
+ </xs:complexType>
155
+
156
+ <xs:complexType name="RestrictionMatrixObsRow" abstract="false">
157
+ <xs:annotation>
158
+ <xs:documentation>
159
+ This is a row in a matrix of restriction
160
+ site data as granular obervations.
161
+ </xs:documentation>
162
+ </xs:annotation>
163
+ <xs:complexContent>
164
+ <xs:restriction base="AbstractObsRow">
165
+ <xs:sequence minOccurs="1" maxOccurs="1">
166
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
167
+ <xs:element name="cell" minOccurs="1" maxOccurs="unbounded" type="RestrictionObs"/>
168
+ </xs:sequence>
169
+ </xs:restriction>
170
+ </xs:complexContent>
171
+ </xs:complexType>
172
+
173
+ <xs:complexType name="RestrictionSeqMatrix" abstract="false">
174
+ <xs:annotation>
175
+ <xs:documentation>
176
+ A matrix of rows with seq strings of type restriction.
177
+ </xs:documentation>
178
+ </xs:annotation>
179
+ <xs:complexContent>
180
+ <xs:restriction base="AbstractSeqMatrix">
181
+ <xs:sequence minOccurs="1" maxOccurs="1">
182
+ <xs:element name="row" minOccurs="1" maxOccurs="unbounded" type="RestrictionMatrixSeqRow"/>
183
+ </xs:sequence>
184
+ </xs:restriction>
185
+ </xs:complexContent>
186
+ </xs:complexType>
187
+
188
+ <xs:complexType name="RestrictionObsMatrix" abstract="false">
189
+ <xs:annotation>
190
+ <xs:documentation>
191
+ A matrix of rows with single character observations.
192
+ </xs:documentation>
193
+ </xs:annotation>
194
+ <xs:complexContent>
195
+ <xs:restriction base="AbstractObsMatrix">
196
+ <xs:sequence minOccurs="1" maxOccurs="1">
197
+ <xs:element name="row" minOccurs="1" maxOccurs="unbounded" type="RestrictionMatrixObsRow"/>
198
+ </xs:sequence>
199
+ </xs:restriction>
200
+ </xs:complexContent>
201
+ </xs:complexType>
202
+
203
+ <xs:complexType name="RestrictionSeqs" abstract="false">
204
+ <xs:annotation>
205
+ <xs:documentation>
206
+ A restriction site characters block
207
+ consisting of sequences preceded by metadata.
208
+ </xs:documentation>
209
+ </xs:annotation>
210
+ <xs:complexContent>
211
+ <xs:restriction base="AbstractSeqs">
212
+ <xs:sequence minOccurs="1" maxOccurs="1">
213
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
214
+ <xs:element name="format" minOccurs="1" maxOccurs="1" type="RestrictionFormat"/>
215
+ <xs:element name="matrix" minOccurs="1" maxOccurs="1" type="RestrictionSeqMatrix"/>
216
+ </xs:sequence>
217
+ </xs:restriction>
218
+ </xs:complexContent>
219
+ </xs:complexType>
220
+
221
+ <xs:complexType name="RestrictionCells" abstract="false">
222
+ <xs:annotation>
223
+ <xs:documentation>
224
+ A standard characters block consisting
225
+ of granular cells preceded by metadata.
226
+ </xs:documentation>
227
+ </xs:annotation>
228
+ <xs:complexContent>
229
+ <xs:restriction base="AbstractCells">
230
+ <xs:sequence minOccurs="1" maxOccurs="1">
231
+ <xs:element name="meta" minOccurs="0" maxOccurs="unbounded" type="Meta"/>
232
+ <xs:element name="format" minOccurs="1" maxOccurs="1" type="RestrictionFormat"/>
233
+ <xs:element name="matrix" minOccurs="1" maxOccurs="1" type="RestrictionObsMatrix"/>
234
+ </xs:sequence>
235
+ </xs:restriction>
236
+ </xs:complexContent>
237
+ </xs:complexType>
238
+
239
+ </xs:schema>