Skip to content

Commit 7fd4498

Browse files
authored
Add petab.v2.C (#299)
For now, mostly a copy of v1. The be updated as petab v2 development progresses. Also adds some missing documentation. Use of PEtab v2-related constants from `petab.v1.C` is deprecated.
1 parent e4b1861 commit 7fd4498

File tree

3 files changed

+465
-80
lines changed

3 files changed

+465
-80
lines changed

doc/modules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ API Reference
2828
petab.v1.visualize
2929
petab.v1.yaml
3030
petab.v2
31+
petab.v2.C
3132
petab.v2.lint
3233
petab.v2.problem

petab/v1/C.py

Lines changed: 91 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@
77

88
# MEASUREMENTS
99

10-
#:
10+
#: Observable ID column in the observable and measurement tables
1111
OBSERVABLE_ID = "observableId"
1212

13-
#:
13+
#: Preequilibration condition ID column in the measurement table
1414
PREEQUILIBRATION_CONDITION_ID = "preequilibrationConditionId"
1515

16-
#:
16+
#: Simulation condition ID column in the measurement table
1717
SIMULATION_CONDITION_ID = "simulationConditionId"
1818

19-
#:
19+
#: Measurement value column in the measurement table
2020
MEASUREMENT = "measurement"
2121

22-
#:
22+
#: Time column in the measurement table
2323
TIME = "time"
2424

2525
#: Time value that indicates steady-state measurements
2626
TIME_STEADY_STATE = _math.inf
2727

28-
#:
28+
#: Observable parameters column in the measurement table
2929
OBSERVABLE_PARAMETERS = "observableParameters"
3030

31-
#:
31+
#: Noise parameters column in the measurement table
3232
NOISE_PARAMETERS = "noiseParameters"
3333

34-
#:
34+
#: Dataset ID column in the measurement table
3535
DATASET_ID = "datasetId"
3636

37-
#:
37+
#: Replicate ID column in the measurement table
3838
REPLICATE_ID = "replicateId"
3939

4040
#: Mandatory columns of measurement table
@@ -65,27 +65,27 @@
6565

6666
# PARAMETERS
6767

68-
#:
68+
#: Parameter ID column in the parameter table
6969
PARAMETER_ID = "parameterId"
70-
#:
70+
#: Parameter name column in the parameter table
7171
PARAMETER_NAME = "parameterName"
72-
#:
72+
#: Parameter scale column in the parameter table
7373
PARAMETER_SCALE = "parameterScale"
74-
#:
74+
#: Lower bound column in the parameter table
7575
LOWER_BOUND = "lowerBound"
76-
#:
76+
#: Upper bound column in the parameter table
7777
UPPER_BOUND = "upperBound"
78-
#:
78+
#: Nominal value column in the parameter table
7979
NOMINAL_VALUE = "nominalValue"
80-
#:
80+
#: Estimate column in the parameter table
8181
ESTIMATE = "estimate"
82-
#:
82+
#: Initialization prior type column in the parameter table
8383
INITIALIZATION_PRIOR_TYPE = "initializationPriorType"
84-
#:
84+
#: Initialization prior parameters column in the parameter table
8585
INITIALIZATION_PRIOR_PARAMETERS = "initializationPriorParameters"
86-
#:
86+
#: Objective prior type column in the parameter table
8787
OBJECTIVE_PRIOR_TYPE = "objectivePriorType"
88-
#:
88+
#: Objective prior parameters column in the parameter table
8989
OBJECTIVE_PRIOR_PARAMETERS = "objectivePriorParameters"
9090

9191
#: Mandatory columns of parameter table
@@ -115,31 +115,31 @@
115115
*PARAMETER_DF_OPTIONAL_COLS[1:],
116116
]
117117

118-
#:
118+
#: Initialization-type prior
119119
INITIALIZATION = "initialization"
120-
#:
120+
#: Objective-type prior
121121
OBJECTIVE = "objective"
122122

123123

124124
# CONDITIONS
125125

126-
#:
126+
#: Condition ID column in the condition table
127127
CONDITION_ID = "conditionId"
128-
#:
128+
#: Condition name column in the condition table
129129
CONDITION_NAME = "conditionName"
130130

131131

132132
# OBSERVABLES
133133

134-
#:
134+
#: Observable name column in the observables table
135135
OBSERVABLE_NAME = "observableName"
136-
#:
136+
#: Observable formula column in the observables table
137137
OBSERVABLE_FORMULA = "observableFormula"
138-
#:
138+
#: Noise formula column in the observables table
139139
NOISE_FORMULA = "noiseFormula"
140-
#:
140+
#: Observable transformation column in the observables table
141141
OBSERVABLE_TRANSFORMATION = "observableTransformation"
142-
#:
142+
#: Noise distribution column in the observables table
143143
NOISE_DISTRIBUTION = "noiseDistribution"
144144

145145
#: Mandatory columns of observables table
@@ -165,33 +165,33 @@
165165

166166
# TRANSFORMATIONS
167167

168-
#:
168+
#: Linear transformation
169169
LIN = "lin"
170-
#:
170+
#: Logarithmic transformation
171171
LOG = "log"
172-
#:
172+
#: Logarithmic base 10 transformation
173173
LOG10 = "log10"
174174
#: Supported observable transformations
175175
OBSERVABLE_TRANSFORMATIONS = [LIN, LOG, LOG10]
176176

177177

178178
# NOISE MODELS
179179

180-
#:
180+
#: Uniform distribution
181181
UNIFORM = "uniform"
182-
#:
182+
#: Uniform distribution on the parameter scale
183183
PARAMETER_SCALE_UNIFORM = "parameterScaleUniform"
184-
#:
184+
#: Normal distribution
185185
NORMAL = "normal"
186-
#:
186+
#: Normal distribution on the parameter scale
187187
PARAMETER_SCALE_NORMAL = "parameterScaleNormal"
188-
#:
188+
#: Laplace distribution
189189
LAPLACE = "laplace"
190-
#:
190+
#: Laplace distribution on the parameter scale
191191
PARAMETER_SCALE_LAPLACE = "parameterScaleLaplace"
192-
#:
192+
#: Log-normal distribution
193193
LOG_NORMAL = "logNormal"
194-
#:
194+
#: Log-Laplace distribution
195195
LOG_LAPLACE = "logLaplace"
196196

197197
#: Supported prior types
@@ -212,31 +212,31 @@
212212

213213
# VISUALIZATION
214214

215-
#:
215+
#: Plot ID column in the visualization table
216216
PLOT_ID = "plotId"
217-
#:
217+
#: Plot name column in the visualization table
218218
PLOT_NAME = "plotName"
219-
#:
219+
#: Value for plot type 'simulation' in the visualization table
220220
PLOT_TYPE_SIMULATION = "plotTypeSimulation"
221-
#:
221+
#: Value for plot type 'data' in the visualization table
222222
PLOT_TYPE_DATA = "plotTypeData"
223-
#:
223+
#: X values column in the visualization table
224224
X_VALUES = "xValues"
225-
#:
225+
#: X offset column in the visualization table
226226
X_OFFSET = "xOffset"
227-
#:
227+
#: X label column in the visualization table
228228
X_LABEL = "xLabel"
229-
#:
229+
#: X scale column in the visualization table
230230
X_SCALE = "xScale"
231-
#:
231+
#: Y values column in the visualization table
232232
Y_VALUES = "yValues"
233-
#:
233+
#: Y offset column in the visualization table
234234
Y_OFFSET = "yOffset"
235-
#:
235+
#: Y label column in the visualization table
236236
Y_LABEL = "yLabel"
237-
#:
237+
#: Y scale column in the visualization table
238238
Y_SCALE = "yScale"
239-
#:
239+
#: Legend entry column in the visualization table
240240
LEGEND_ENTRY = "legendEntry"
241241

242242
#: Mandatory columns of visualization table
@@ -287,11 +287,11 @@
287287
DATASET_ID,
288288
]
289289

290-
#:
290+
#: Plot type value in the visualization table for line plot
291291
LINE_PLOT = "LinePlot"
292-
#:
292+
#: Plot type value in the visualization table for bar plot
293293
BAR_PLOT = "BarPlot"
294-
#:
294+
#: Plot type value in the visualization table for scatter plot
295295
SCATTER_PLOT = "ScatterPlot"
296296
#: Supported plot types
297297
PLOT_TYPES_SIMULATION = [LINE_PLOT, BAR_PLOT, SCATTER_PLOT]
@@ -303,65 +303,76 @@
303303
Y_SCALES = [LIN, LOG, LOG10]
304304

305305

306-
#:
306+
#: Plot type "data" value in the visualization table for mean and standard
307+
# deviation
307308
MEAN_AND_SD = "MeanAndSD"
308-
#:
309+
#: Plot type "data" value in the visualization table for mean and standard
310+
# error
309311
MEAN_AND_SEM = "MeanAndSEM"
310-
#:
312+
#: Plot type "data" value in the visualization table for replicates
311313
REPLICATE = "replicate"
312-
#:
314+
#: Plot type "data" value in the visualization table for provided noise values
313315
PROVIDED = "provided"
314316
#: Supported settings for handling replicates
315317
PLOT_TYPES_DATA = [MEAN_AND_SD, MEAN_AND_SEM, REPLICATE, PROVIDED]
316318

317319

318320
# YAML
319-
#:
321+
#: PEtab version key in the YAML file
320322
FORMAT_VERSION = "format_version"
321-
#:
323+
#: Parameter file key in the YAML file
322324
PARAMETER_FILE = "parameter_file"
323-
#:
325+
#: Problems key in the YAML file
324326
PROBLEMS = "problems"
325-
#:
327+
#: SBML files key in the YAML file
326328
SBML_FILES = "sbml_files"
327-
#:
329+
#: Model files key in the YAML file
330+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
328331
MODEL_FILES = "model_files"
329-
#:
332+
#: Model location key in the YAML file
333+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
330334
MODEL_LOCATION = "location"
331-
#:
335+
#: Model language key in the YAML file
336+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
332337
MODEL_LANGUAGE = "language"
333-
#:
338+
#: Condition files key in the YAML file
334339
CONDITION_FILES = "condition_files"
335-
#:
340+
#: Measurement files key in the YAML file
336341
MEASUREMENT_FILES = "measurement_files"
337-
#:
342+
#: Observable files key in the YAML file
338343
OBSERVABLE_FILES = "observable_files"
339-
#:
344+
#: Visualization files key in the YAML file
340345
VISUALIZATION_FILES = "visualization_files"
341-
#:
346+
#: Mapping files key in the YAML file
347+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
342348
MAPPING_FILES = "mapping_files"
343-
#:
349+
#: Extensions key in the YAML file
350+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
344351
EXTENSIONS = "extensions"
345352

346353

347354
# MAPPING
348-
#:
355+
356+
#: PEtab entity ID column in the mapping table
357+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
349358
PETAB_ENTITY_ID = "petabEntityId"
350-
#:
359+
#: Model entity ID column in the mapping table
360+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
351361
MODEL_ENTITY_ID = "modelEntityId"
352-
#:
362+
#: Required columns of the mapping table
363+
# (PEtab v2.0 -- DEPRECATED: use value from petab.v2.C)
353364
MAPPING_DF_REQUIRED_COLS = [PETAB_ENTITY_ID, MODEL_ENTITY_ID]
354365

355366
# MORE
356367

357-
#:
368+
#: Simulated value column in the simulation table
358369
SIMULATION = "simulation"
359-
#:
370+
#: Residual value column in the residuals table
360371
RESIDUAL = "residual"
361-
#:
372+
#: ???
362373
NOISE_VALUE = "noiseValue"
363374

364-
# separator for multiple parameter values (bounds, observableParameters, ...)
375+
#: separator for multiple parameter values (bounds, observableParameters, ...)
365376
PARAMETER_SEPARATOR = ";"
366377

367378

0 commit comments

Comments
 (0)