-
Notifications
You must be signed in to change notification settings - Fork 1
/
apdx-validation.tex
341 lines (280 loc) · 16.6 KB
/
apdx-validation.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
% -*- TeX-master: "main"; fill-column: 72 -*-
\section{Validation of SBML documents} \label{apdx-validation}
\subsection{Validation and consistency rules} \label{validation-rules}
This section summarizes all the conditions that must (or in some cases,
at least \emph{should}) be true of an SBML Level~3 Version~1 model that
uses the \FBCPackage. We use the same conventions as are used in the
SBML Level~3 Version~1 Core specification document. In particular, there
are different degrees of rule strictness. Formally, the differences are
expressed in the statement of a rule: either a rule states that a
condition \emph{must} be true, or a rule states that it \emph{should} be
true. Rules of the former kind are strict SBML validation rules---a
model encoded in SBML must conform to all of them in order to be
considered valid. Rules of the latter kind are consistency rules. To
help highlight these differences, we use the following three symbols
next to the rule numbers:
\begin{description}
\item[\hspace*{6.5pt}\vSymbol\vsp] A \vSymbolName indicates a
\emph{requirement} for SBML conformance. If a model does not follow this
rule, it does not conform to the Flux Balance Constraints specification.
(Mnemonic intention behind the choice of symbol: ``This must be
checked.'')
\item[\hspace*{6.5pt}\cSymbol\csp] A \cSymbolName indicates a
\emph{recommendation} for model consistency. If a model does not follow
this rule, it is not considered strictly invalid as far as the Flux
Balance Constraints specification is concerned; however, it indicates
that the model contains a physical or conceptual inconsistency.
(Mnemonic intention behind the choice of symbol: ``This is a cause for
warning.'')
\item[\hspace*{6.5pt}\mSymbol\msp] A \mSymbolName indicates a strong
recommendation for good modeling practice. This rule is not strictly a
matter of SBML encoding, but the recommendation comes from logical
reasoning. As in the previous case, if a model does not follow this
rule, it is not strictly considered an invalid SBML encoding. (Mnemonic
intention behind the choice of symbol: ``You're a star if you heed
this.'')
\end{description}
The validation rules listed in the following subsections are all stated
or implied in the rest of this specification document. They are
enumerated here for convenience. Unless explicitly stated, all
validation rules concern objects and attributes specifically defined in
the Flux Balance Constraints package.
For \notice convenience and brevity, we use the shorthand
``\token{fbc:\-x}'' to stand for an attribute or element name \token{x}
in the namespace for the \FBCPackage, using the namespace prefix
\token{fbc}. In reality, the prefix string may be different from the
literal ``\token{fbc}'' used here (and indeed, it can be any valid XML
namespace prefix that the modeler or software chooses). We use
``\token{fbc:\-x}'' because it is shorter than to write a full
explanation everywhere we refer to an attribute or element in the
\FBCPackage namespace.
\subsubsection*{General rules about this package}
\validRule{fbc-10101}{To conform to the \FBCPackage specification for
SBML Level~3 Version~1, an SBML document must declare the use of the
following XML Namespace:\\
\textsl[-25]{\uri{http://www.sbml.org/sbml/level3/version1/fbc/version1}
}. (References: SBML Level~3 Package Specification for Flux Balance
Constraints, Version~1, \sec{xml-namespace}.)}
\validRule{fbc-10102}{Wherever they appear in an SBML document, elements
and attributes from the \FBCPackage must be declared either implicitly
or explicitly to be in the XML namespace
\uri{http://www.sbml.org/sbml/level3/version1/fbc/version1}.
(References: SBML Level~3 Package Specification for Flux Balance
Constraints , Version~1, \sec{xml-namespace}.) }
\subsubsection*{General rules about identifiers}
\validRule{fbc-10301}{(Extends validation rule \#10301 in the SBML
Level~3 Version~1 Core specification.) Within a \Model the values of the
attributes \token{id} and \token{fbc:\-id} on every instance of the
following classes of objects must be unique across the set of all
\token{id} and \token{fbc:\-id} attribute values of all such objects in
a model: the \Model itself, plus all contained \FunctionDefinition,
\Compartment, \Species, \Reaction, \SpeciesReference,
\ModifierSpeciesReference, \Event, and \Parameter objects, plus the
\FluxBound, \Objective and \FluxObjective objects defined by the
\FBCPackage. (References: SBML Level~3 Package Specification for Flux
Balance Constraints, Version~1, \sec{primtypes}.) }
\validRule{fbc-10302} {
The value of a \token{fbc:\-id} attribute must always conform to the
syntax of the SBML data type \primtype{SId}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{primtypes}.)
}
\subsubsection*{Rules for the extended \class{SBML} class}
\validRule{fbc-20101}{In all SBML documents using the \FBCPackage, the
\SBML object must include a value for the attribute
\token{fbc:\-required} attribute. (References: SBML Level~3 Version~1
Core, Section~4.1.2.) }
\validRule{fbc-20102}{The value of attribute \token{fbc:\-required} on
the \SBML object must be of the data type \primtype{boolean}.
(References: SBML Level~3 Version~1 Core, Section~4.1.2.) }
\validRule{fbc-20103}{The value of attribute \token{fbc:\-required} on
the \SBML object must be set to \val{false}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{xml-namespace}.) }
\subsubsection*{Rules for extended \class{Model} object}
\validRule{fbc-20201}{There may be at most one instance of each of the
following kinds of objects within a \Model object using Flux Balance
Constraints: \ListOfFluxBounds and \ListOfObjectives. (References: SBML
Level~3 Package Specification for Flux Balance Constraints, Version~1,
\sec{model-class}.) }
\validRule{fbc-20202}{The various
\textsf{\textbf{ListOf\rule{0.15in}{0.5pt}}} subobjects with an \Model
object are optional, but if present, these container object must not
be empty. Specifically, if any of the following classes of objects are
present on the \Model, it must not be empty: \ListOfFluxBounds and
\ListOfObjectives. (References: SBML Level~3 Package Specification for
Flux Balance Constraints, Version~1, \sec{model-class}.) }
\validRule{fbc-20203}{Apart from the general notes and annotation
subobjects permitted on all SBML objects, a \ListOfFluxBounds container
object may only contain \FluxBound objects. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{model-class}.) }
\validRule{fbc-20204}{Apart from the general notes and annotation
subobjects permitted on all SBML objects, a \ListOfObjectives container
object may only contain \Objective objects. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{model-class}.) }
\validRule{fbc-20205}{A \ListOfFluxBounds object may have the optional
attributes \token{meta\-id} and \token{sboTerm} defined by SBML Level~3
Core. No other attributes from the SBML Level~3 Core namespace or the
Flux Balance Constraints namespace are permitted on a \ListOfFluxBounds
object. (References: SBML Level~3 Package Specification for Flux Balance
Constraints, Version~1, \sec{model-class}.) }
\validRule{fbc-20206}{A \ListOfObjectives object may have the optional
attributes \token{meta\-id} and \token{sboTerm} defined by SBML Level~3
Core. Additionally the \ListOfObjectives must contain the attribute
\token{active\-Objective}. No other attributes from the SBML Level~3
Core namespace or the Flux Balance Constraints namespace are permitted
on a \ListOfObjectives object. (References: SBML Level~3 Package
Specification for Flux Balance Constraints, Version~1,
\sec{model-class}.) }
\validRule{fbc-20207}{The value of attribute
\token{fbc:\-activeObjective} on the \ListOfObjectives object must be of
the data type \primtype{SIdRef}. (References: SBML Level~3 Package
Specification for Flux Balance Constraints, Version~1,
\sec{activeObjective-attribute}). }
\validRule{fbc-20208}{The value of attribute
\token{fbc:\-activeObjective} on the \ListOfObjectives object must be
the identifier of an existing \Objective. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{activeObjective-attribute}.) }
\subsubsection*{Rules for extended \class{Species} object}
\validRule{fbc-20301}{A \SBML \class{Species} object may have the
optional attributes \token{fbc:\-charge} and
\token{fbc:\-chemicalFormula}. No other attributes from the Flux Balance
Constraints namespaces are permitted on a \class{Species}. (References:
SBML Level~3 Package Specification for Flux Balance Constraints,
Version~1, \sec{species-class}) }
\validRule{fbc-20302}{The value of attribute \token{fbc:\-charge} on
the \SBML \class{Species} object must be of the data type
\primtype{integer}. (References: SBML Level~3 Package Specification for
Flux Balance Constraints, Version~1, \sec{species-class}). }
\validRule{fbc-20303}{The value of attribute
\token{fbc:\-chemicalFormula} on the \SBML \class{Species} object must
be set to a \primtype{string} consisting only of atomic names or user
defined compounds and their occurrence. (References: SBML Level~3 Package
Specification for Flux Balance Constraints, Version~1,
\sec{species-class}.) }
\subsubsection*{Rules for \class{FluxBound} object}
\validRule{fbc-20401}{A \FluxBound object may have the optional SBML
Level 3 Core attributes \token{metaid} and \token{sboTerm}. No other
attributes from the SBML Level 3 Core namespace are permitted on a
\FluxBound. (References: SBML Level~3 Version~1 Core, Section~3.2.) }
\validRule{fbc-20402}{A \FluxBound object may have the optional SBML
Level 3 Core subobjects for notes and annotations. No other elements
from the SBML Level 3 Core namespace are permitted on a \FluxBound.
(References: SBML Level~3 Version~1 Core, Section~3.2.) }
\validRule{fbc-20403}{A \FluxBound object must have the required
attributes \token{fbc:\-reaction}, \token{fbc:\-operation} and
\token{fbc:\-value}, and may have the optional attributes
\token{fbc:\-id} and \token{fbc:\-name}. No other attributes from the
SBML Level~3 Flux Balance Constraints namespace are permitted on a
\FluxBound object. (References: SBML Level~3 Package Specification for
Flux Balance Constraints, Version~1, \sec{fluxbound-class}.) }
\validRule{fbc-20404}{The attribute \token{fbc:\-reaction} of a \FluxBound
must be of the data type \token{SIdRef}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{fluxbound-class}.) }
\validRule{fbc-20405}{The attribute \token{fbc:\-name} of a \FluxBound
must be of the data type \token{string}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{fluxbound-class}.) }
\validRule{fbc-20406}{The attribute \token{fbc:\-operation} of a
\FluxBound must be of the data type \token{FbcOperation} and thus its
value must be one of \val{lessEqual}, \val{greaterEqual} or \val{equal}.
(References: SBML Level~3 Package Specification for Flux Balance
Constraints, Version~1, \sec{fluxbound-class}.) }
\validRule{fbc-20407}{The attribute \token{fbc:\-value} of a \FluxBound
must be of the data type \token{double}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{fluxbound-class}.) }
\validRule{fbc-20408}{The value of the attribute \token{fbc:\-reaction}
of a \FluxBound object must be the identifier of an existing \Reaction
object defined in the enclosing \Model object. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{fluxbound-class}.) }
\validRule{fbc-20409}{The combined set of all \FluxBound's with
identical values for \token{fbc:\-reaction} must be consistent. That is
while it is possible to define a lower and an upper bound for a
reaction, it is not possible to define multiple lower or upper bounds.
(References: SBML Level~3 Package Specification for Flux Balance
Constraints, Version~1, \sec{fluxbound-class}.) }
\subsubsection*{Rules for \class{Objective} object}
\validRule{fbc-20501}{A \Objective object may have the optional SBML
Level 3 Core attributes \token{metaid} and \token{sboTerm}. No other
attributes from the SBML Level 3 Core namespace are permitted on a
\Objective. (References: SBML Level~3 Version~1 Core, Section~3.2.) }
\validRule{fbc-20502}{A \Objective object may have the optional SBML
Level 3 Core subobjects for notes and annotations. No other elements
from the SBML Level 3 Core namespace are permitted on a \Objective.
(References: SBML Level~3 Version~1 Core, Section~3.2.) }
\validRule{fbc-20503}{A \Objective object must have the required
attributes \token{fbc:\-id} and \token{fbc:\-type} and may have the
optional attribute \token{fbc:\-name}. No other attributes from the SBML
Level~3 Flux Balance Constraints namespace are permitted on a \Objective
object. (References: SBML Level~3 Package Specification for Flux Balance
Constraints, Version~1, \sec{objective-class}.) }
\validRule{fbc-20504}{The attribute \token{fbc:\-name} on a \Objective
must be of the data type \token{string}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{objective-class}.) }
\validRule{fbc-20505}{The attribute \token{fbc:\-type} on a \Objective
must be of the data type \token{FbcType} and thus its value must be one
of \val{minimize} or \val{maximize}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{objective-class}.) }
\validRule{fbc-20506}{A \Objective object must have one and only one
instance of the \ListOfFluxObjectives object. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{objective-class}.) }
\validRule{fbc-20507}{The \ListOfFluxObjectives subobject within a
\Objective object must not be empty. (References: SBML Level~3 Package
Specification for Flux Balance Constraints, Version~1,
\sec{objective-class}.) }
\validRule{fbc-20508}{Apart from the general notes and annotation
subobjects permitted on all SBML objects, a \ListOfFluxObjectives
container object may only contain \FluxObjective objects. (References: SBML
Level~3 Package Specification for Flux Balance Constraints, Version~1,
\sec{objective-class}.) }
\validRule{fbc-20509}{A \ListOfFluxObjectives object may have the
optional \token{meta\-id} and \token{sboTerm} defined by SBML Level~3
Core. No other attributes from the SBML Level~3 Core namespace or the
Flux Balance Constraints namespace are permitted on a
\ListOfFluxObjectives object. (References: SBML Level~3 Package
Specification for Flux Balance Constraints, Version~1,
\sec{objective-class}.) }
\subsubsection*{Rules for \class{FluxObjective} object}
\validRule{fbc-20601}{A \FluxObjective object may have the optional SBML
Level 3 Core attributes \token{metaid} and \token{sboTerm}. No other
attributes from the SBML Level 3 Core namespace are permitted on a
\FluxObjective. (References: SBML Level~3 Version~1 Core, Section~3.2.)
}
\validRule{fbc-20602}{A \FluxObjective object may have the optional SBML
Level 3 Core subobjects for notes and annotations. No other elements
from the SBML Level 3 Core namespace are permitted on a \FluxObjective.
(References: SBML Level~3 Version~1 Core, Section~3.2.) }
\validRule{fbc-20603}{A \FluxObjective object must have the required
attributes \token{fbc:\-reaction} and \token{fbc:\-coefficient}, and may
have the optional attributes \token{fbc:\-id} and \token{fbc:\-name}. No
other attributes from the SBML Level~3 Flux Balance Constraints
namespace are permitted on a \FluxObjective object. (References: SBML
Level~3 Package Specification for Flux Balance Constraints, Version~1,
\sec{fluxobjective-class}.) }
\validRule{fbc-20604}{The attribute \token{fbc:\-name} on a \FluxObjective
must be of the data type \token{string}. (References: SBML Level~3
Package Specification for Flux Balance Constraints, Version~1,
\sec{fluxobjective-class}.) }
\validRule{fbc-20605}{The value of the attribute \token{fbc:\-reaction}
of a \FluxObjective object must conform to the syntax of the SBML data
type \primtype{SIdRef}. (References: SBML Level~3 Package Specification
for Flux Balance Constraints, Version~1, \sec{fluxobjective-class}.) }
\validRule{fbc-20606}{The value of the attribute \token{fbc:\-reaction}
of a \FluxObjective object must be the identifier of an existing
\Reaction object defined in the enclosing \Model object. (References:
SBML Level~3 Package Specification for Flux Balance Constraints,
Version~1, \sec{fluxobjective-class}.) }
\validRule{fbc-20607}{The value of the attribute
\token{fbc:\-coefficient} of a \FluxObjective object must conform to the
syntax of the SBML data type \primtype{double}. (References: SBML
Level~3 Package Specification for Flux Balance Constraints, Version~1,
\sec{fluxobjective-class}.) }