|
1 | | -# PEtab Select |
| 1 | +<img src="https://raw.githubusercontent.com/PEtab-dev/petab_select/logo/doc/logo/logo-wide.svg" height="200" alt="PEtab Select logo"> |
| 2 | + |
| 3 | +[](https://pypi.org/project/petab-select/) |
2 | 4 |
|
3 | 5 | The repository for the development of the extension to PEtab for model |
4 | 6 | selection, including the additional file formats and Python 3 package. |
@@ -44,154 +46,3 @@ given the forward method and a predecessor model with 2 estimated parameters, |
44 | 46 | if there are no models with 3 estimated parameters, but some models with 4 |
45 | 47 | estimated parameters, then the search may return candidate models with 4 |
46 | 48 | estimated parameters. |
47 | | - |
48 | | -## File formats |
49 | | - |
50 | | -Column or key names that are surrounding by square brackets |
51 | | -(e.g. `[constraint_files]`) are optional. |
52 | | - |
53 | | -### Selection problem |
54 | | - |
55 | | -A YAML file with a description of the model selection problem. |
56 | | - |
57 | | -```yaml |
58 | | -format_version: [string] |
59 | | -criterion: [string] |
60 | | -method: [string] |
61 | | -model_space_files: [List of filenames] |
62 | | -[constraint_files]: [List of filenames] |
63 | | -[predecessor_model_files]: [List of filenames] |
64 | | -``` |
65 | | -
|
66 | | -- `format_version`: The version of the model selection extension format ( |
67 | | - e.g. `'beta_1'`) |
68 | | -- `criterion`: The criterion by which models should be compared (e.g. `'AIC'`) |
69 | | -- `method`: The method by which model candidates should be generated |
70 | | - (e.g. `'forward'`) |
71 | | -- `model_space_files`: The filenames of model space files. |
72 | | -- `constraint_files`: The filenames of constraint files. |
73 | | -- `predecessor_model_files`: The filenames of predecessor (initial) model |
74 | | - files. |
75 | | - |
76 | | -### Model space |
77 | | - |
78 | | -A TSV with candidate models, in compressed or uncompressed format. |
79 | | - |
80 | | -| `model_subspace_id` | `petab_yaml` | [`sbml`] | `parameter_id_1` | ... | `parameter_id_n` | |
81 | | -|---------------------|--------------|----------|------------------------------------------------------|-----|------------------------------------------------------| |
82 | | -| (Unique) [string] | [string] | [string] | [string/float] OR [; delimited list of string/float] | ... | [string/float] OR [; delimited list of string/float] | |
83 | | - |
84 | | -- `model_subspace_id`: An ID for the model subspace. |
85 | | -- `petab_yaml`: The PEtab YAML filename that serves as the base for a model. |
86 | | -- `sbml`: An SBML filename. If the PEtab YAML file specifies multiple SBML |
87 | | - models, this can select a specific model by model filename. |
88 | | -- `parameter_id_1`...`parameter_id_n` : Parameter IDs that are specified to |
89 | | - take specific values or be estimated. Example valid values are: |
90 | | - - uncompressed format: |
91 | | - - `0.0` |
92 | | - - `1.0` |
93 | | - - `estimate` |
94 | | - - compressed format |
95 | | - - `0.0;1.1;estimate` (the parameter can take the values `0.0` or `1.1`, |
96 | | - or be estimated according to the PEtab problem) |
97 | | - |
98 | | -### Constraints |
99 | | - |
100 | | -A TSV file with constraints. |
101 | | - |
102 | | -| `petab_yaml` | [`if`] | `constraint` | |
103 | | -|--------------|------------------------------|------------------------------| |
104 | | -| [string] | [SBML L3 Formula expression] | [SBML L3 Formula expression] | |
105 | | - |
106 | | -- `petab_yaml`: The filename of the PEtab YAML file that this constraint |
107 | | - applies to. |
108 | | -- `if`: As a single YAML can relate to multiple models in the model space file, |
109 | | - this ensures the constraint is only applied to the models that match |
110 | | - this `if` statement |
111 | | -- `constraint`: If a model violates this constraint, it is skipped during the |
112 | | - model selection process and not optimized. |
113 | | - |
114 | | -### Model(s) (Predecessor models / model interchange / report) |
115 | | - |
116 | | -- *Predecessor models* are used to initialize an appropriate model selection |
117 | | - method. Model IDs should be unique here and compared to model IDs in any |
118 | | - model space files. |
119 | | -- *Model interchange* refers to the format used to transfer model information |
120 | | - between PEtab Select and a PEtab-compatible calibration tool, during the |
121 | | - model selection process. |
122 | | -- *Report* refers to the final results of the model selection process, which may |
123 | | - include calibration results from any calibrated models, or just the select |
124 | | - model. |
125 | | - |
126 | | -Here, the format for a single model is shown. Multiple models can be specified |
127 | | -as a YAML list of the same format. |
128 | | - |
129 | | -The only required key is the PEtab YAML, as a model requires a PEtab problem. |
130 | | -All other keys are maybe required, for the different uses of the format (e.g., |
131 | | -the report format should include `estimated_parameters`), or at different |
132 | | -stages of the model selection process (the PEtab-compatible calibration tool |
133 | | -should provide `criteria` for model comparison). |
134 | | - |
135 | | -```yaml |
136 | | -[criteria]: [Dictionary of criterion names and values] |
137 | | -[estimated_parameters]: [Dictionary of parameter IDs and values] |
138 | | -[model_hash]: [string] |
139 | | -[model_id]: [string] |
140 | | -[parameters]: [Dictionary of parameter IDs and values] |
141 | | -petab_yaml: [string] |
142 | | -[predecessor_model_hash]: [string] |
143 | | -[sbml]: [string] |
144 | | -``` |
145 | | - |
146 | | -- `criteria`: The value of the criterion by which model selection was |
147 | | - performed, at least. Optionally, other criterion values too. |
148 | | -- `estimated_parameters`: Parameter estimates, not only of parameters specified |
149 | | - to be estimated in a model space file, but also parameters specified to be |
150 | | - estimated in the original PEtab problem of the model. |
151 | | -- `model_hash`: The model hash, generated by the PEtab Select library. |
152 | | -- `model_id`: The model ID. |
153 | | -- `model_subspace_id`: Same as in the model space files. |
154 | | -- `model_subspace_indices`: The indices that locate this model in its model |
155 | | - subspace. |
156 | | -- `parameters`: The parameters from the problem (either values |
157 | | - or `'estimate'`) (a specific combination from a model space file, but |
158 | | - uncalibrated). |
159 | | -- `petab_yaml`: Same as in model space files. |
160 | | -- `predecessor_model_hash`: The hash of the model that preceded this model |
161 | | - during the model selection process. |
162 | | -- `sbml`: Same as in model space files. |
163 | | - |
164 | | -## Test cases |
165 | | - |
166 | | -Several test cases are provided, to test the compatibility of a |
167 | | -PEtab-compatible calibration tool with different PEtab Select features. |
168 | | - |
169 | | -The test cases are available in the `test_cases` directory, and are provided in |
170 | | -the model format. |
171 | | - |
172 | | -| Test ID | Criterion | Method | Model space files | Compressed format | Constraints files | Predecessor (initial) models files | |
173 | | -|----------------------------------------------|-----------|------------------|-------------------|-------------------|-------------------|------------------------------------| |
174 | | -| 0001 | (all) | (only one model) | 1 | | | | |
175 | | -| 0002<sup>[1](#test_case_0002)</sup> | AIC | forward | 1 | | | | |
176 | | -| 0003 | BIC | all | 1 | Yes | | | |
177 | | -| 0004 | AICc | backward | 1 | | 1 | | |
178 | | -| 0005 | AIC | forward | 1 | | | 1 | |
179 | | -| 0006 | AIC | forward | 1 | | | | |
180 | | -| 0007<sup>[2](#test_case_0007_and_0008)</sup> | AIC | forward | 1 | | | | |
181 | | -| 0008<sup>[2](#test_case_0007_and_0008)</sup> | AICc | backward | 1 | | | | |
182 | | -| 0009<sup>[3](#test_case_0009)</sup> | AICc | FAMoS | 1 | Yes | | Yes | |
183 | | - |
184 | | -<a name="test_case_0002">1</a>. Model `M1_0` differs from `M1_1` in three |
185 | | -parameters, but only 1 additional estimated parameter. The effect of this on |
186 | | -model selection criteria needs to be clarified. Test case 0006 is a duplicate |
187 | | -of 0002 that doesn't have this issue. |
188 | | - |
189 | | -<a name="test_case_0007_and_0008">2</a>. Noise parameter is removed, noise is |
190 | | -fixed to `1`. |
191 | | - |
192 | | -<a name="test_case_0009">3</a>. This is a computationally expensive problem to |
193 | | -solve. Developers can try a model selection initialized with the provided |
194 | | -predecessor model, which is a model start that reproducibly finds the expected |
195 | | -model. To solve the problem reproducibly <i>ab initio</i>, on the order of 100 |
196 | | -random model starts are required. This test case reproduces the model selection |
197 | | -problem presented in https://doi.org/10.1016/j.cels.2016.01.002 . |
0 commit comments