sbmlsim 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. sbmlsim/__init__.py +10 -0
  2. sbmlsim/combine/TODO_SEDML.md +92 -0
  3. sbmlsim/combine/__init__.py +4 -0
  4. sbmlsim/combine/datagenerator.py +61 -0
  5. sbmlsim/combine/examples/__init__.py +0 -0
  6. sbmlsim/combine/examples/execute_omex.py +42 -0
  7. sbmlsim/combine/examples/execute_sedml.py +68 -0
  8. sbmlsim/combine/examples/l1v4/BIOMD0000000012_urn.xml +1009 -0
  9. sbmlsim/combine/examples/l1v4/algorithm_parameters.sedml +21 -0
  10. sbmlsim/combine/examples/l1v4/axis.sedml +86 -0
  11. sbmlsim/combine/examples/l1v4/axis_grids.png +0 -0
  12. sbmlsim/combine/examples/l1v4/axis_grids.sedml +72 -0
  13. sbmlsim/combine/examples/l1v4/axis_minmax.png +0 -0
  14. sbmlsim/combine/examples/l1v4/axis_minmax.sedml +72 -0
  15. sbmlsim/combine/examples/l1v4/axis_minmax_smaller.png +0 -0
  16. sbmlsim/combine/examples/l1v4/axis_minmax_smaller.sedml +72 -0
  17. sbmlsim/combine/examples/l1v4/axis_minormax.png +0 -0
  18. sbmlsim/combine/examples/l1v4/axis_minormax.sedml +72 -0
  19. sbmlsim/combine/examples/l1v4/case_01.xml +34 -0
  20. sbmlsim/combine/examples/l1v4/case_02.xml +53 -0
  21. sbmlsim/combine/examples/l1v4/case_03.xml +34 -0
  22. sbmlsim/combine/examples/l1v4/concentration_amount.plot_0.png +0 -0
  23. sbmlsim/combine/examples/l1v4/concentration_amount.plot_1.png +0 -0
  24. sbmlsim/combine/examples/l1v4/concentration_amount.plot_2.png +0 -0
  25. sbmlsim/combine/examples/l1v4/concentration_amount.sedml +92 -0
  26. sbmlsim/combine/examples/l1v4/concentration_amount_b.plot_0.png +0 -0
  27. sbmlsim/combine/examples/l1v4/concentration_amount_b.plot_1.png +0 -0
  28. sbmlsim/combine/examples/l1v4/concentration_amount_b.plot_2.png +0 -0
  29. sbmlsim/combine/examples/l1v4/concentration_amount_b.sedml +92 -0
  30. sbmlsim/combine/examples/l1v4/curve_types.sedml +132 -0
  31. sbmlsim/combine/examples/l1v4/curve_types_errors.sedml +153 -0
  32. sbmlsim/combine/examples/l1v4/curve_types_model.xml +142 -0
  33. sbmlsim/combine/examples/l1v4/heat_map_ls.sedml +62 -0
  34. sbmlsim/combine/examples/l1v4/hill.xml +103 -0
  35. sbmlsim/combine/examples/l1v4/jacobian.sedml +53 -0
  36. sbmlsim/combine/examples/l1v4/line_overlap_order.sedml +72 -0
  37. sbmlsim/combine/examples/l1v4/linetype.sedml +130 -0
  38. sbmlsim/combine/examples/l1v4/logxy.sedml +72 -0
  39. sbmlsim/combine/examples/l1v4/markertype.sedml +262 -0
  40. sbmlsim/combine/examples/l1v4/rateOfChange.sedml +70 -0
  41. sbmlsim/combine/examples/l1v4/rateOfChange_explicitamount.sedml +70 -0
  42. sbmlsim/combine/examples/l1v4/repressilator.xml +158 -0
  43. sbmlsim/combine/examples/l1v4/repressilator_figure.xml +198 -0
  44. sbmlsim/combine/examples/l1v4/repressilator_urn.xml +158 -0
  45. sbmlsim/combine/examples/l1v4/right_yaxis.sedml +71 -0
  46. sbmlsim/combine/examples/l1v4/stacked_bar.sedml +80 -0
  47. sbmlsim/combine/examples/l1v4/stoch_remaining_dimensions_average.sedml +58 -0
  48. sbmlsim/combine/examples/l1v4/stoch_remaining_dimensions_avg_max_min_std.sedml +96 -0
  49. sbmlsim/combine/examples/l1v4/stoichiometry_matrix.sedml +53 -0
  50. sbmlsim/combine/examples/l1v4/surface_bar.sedml +62 -0
  51. sbmlsim/combine/examples/l1v4/surface_contour_ls.sedml +62 -0
  52. sbmlsim/combine/examples/l1v4/surface_fill_ls.sedml +67 -0
  53. sbmlsim/combine/examples/l1v4/surface_mesh.sedml +62 -0
  54. sbmlsim/combine/examples/l1v4/test_3hbarstacked.sedml +89 -0
  55. sbmlsim/combine/examples/l1v4/test_bar.sedml +79 -0
  56. sbmlsim/combine/examples/l1v4/test_bar3stacked.sedml +89 -0
  57. sbmlsim/combine/examples/l1v4/test_base_styles.sedml +102 -0
  58. sbmlsim/combine/examples/l1v4/test_file.sedml +95 -0
  59. sbmlsim/combine/examples/l1v4/test_file_1.sedml +80 -0
  60. sbmlsim/combine/examples/l1v4/test_hbar_stacked.sedml +80 -0
  61. sbmlsim/combine/examples/l1v4/test_line_fill.sedml +79 -0
  62. sbmlsim/combine/examples/l1v4/test_shaded_area.sedml +95 -0
  63. sbmlsim/combine/examples/l1v4/test_shaded_area_overlap_order.sedml +99 -0
  64. sbmlsim/combine/examples/l1v4_l1v3/repeated-stochastic-runs/BorisEJB.xml +1737 -0
  65. sbmlsim/combine/examples/l1v4_l1v3/repeated-stochastic-runs/manifest.json +61 -0
  66. sbmlsim/combine/examples/l1v4_l1v3/repeated-stochastic-runs/manifest.xml +10 -0
  67. sbmlsim/combine/examples/l1v4_l1v3/repeated-stochastic-runs/metadata.rdf +153 -0
  68. sbmlsim/combine/examples/l1v4_l1v3/repeated-stochastic-runs/repeated-stochastic-runs.sedml +101 -0
  69. sbmlsim/combine/examples/l1v4_l1v3/repeated-stochastic-runs/results/sedml_webtools/plot1.png +0 -0
  70. sbmlsim/combine/examples/l1v4_l1v3/repeated-stochastic-runs/results/tellurium/plot1.pdf +0 -0
  71. sbmlsim/combine/examples/l1v4_parameter_fitting/Boehm_JProteomeRes2014.xml +117 -0
  72. sbmlsim/combine/examples/l1v4_parameter_fitting/Boehm_JProteomeRes2014_model1_data1.tsv +17 -0
  73. sbmlsim/combine/examples/l1v4_parameter_fitting/Borghans_BiophysChem1997.xml +131 -0
  74. sbmlsim/combine/examples/l1v4_parameter_fitting/Borghans_BiophysChem1997_model1_data1.tsv +112 -0
  75. sbmlsim/combine/examples/l1v4_parameter_fitting/Elowitz_Nature2000.xml +125 -0
  76. sbmlsim/combine/examples/l1v4_parameter_fitting/Elowitz_Nature2000.xml.json +320 -0
  77. sbmlsim/combine/examples/l1v4_parameter_fitting/Elowitz_Nature2000_model1_data1.tsv +59 -0
  78. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002.xml +415 -0
  79. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_Ca_dose_response__1.tsv +16 -0
  80. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_Ca_dose_response__2.tsv +16 -0
  81. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_Ca_dose_response__3.tsv +16 -0
  82. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_Ca_dose_response__4.tsv +16 -0
  83. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_Ca_dose_response__5.tsv +16 -0
  84. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_Ca_dose_response__6.tsv +16 -0
  85. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_IP3_dose_response__1.tsv +16 -0
  86. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_IP3_dose_response__2.tsv +16 -0
  87. sbmlsim/combine/examples/l1v4_parameter_fitting/Sneyd_PNAS2002_IP3_dose_response__3.tsv +16 -0
  88. sbmlsim/combine/examples/l1v4_parameter_fitting/model_Boehm_JProteomeRes2014.xml +1308 -0
  89. sbmlsim/combine/examples/l1v4_parameter_fitting/model_Borghans_BiophysChem1997.xml +1251 -0
  90. sbmlsim/combine/examples/l1v4_parameter_fitting/model_Elowitz_Nature2000.xml +1972 -0
  91. sbmlsim/combine/examples/l1v4_parameter_fitting/model_Sneyd_PNAS2002.xml +1614 -0
  92. sbmlsim/combine/mathml.py +203 -0
  93. sbmlsim/combine/sedml/__init__.py +1 -0
  94. sbmlsim/combine/sedml/data.py +271 -0
  95. sbmlsim/combine/sedml/io.py +184 -0
  96. sbmlsim/combine/sedml/numl.py +317 -0
  97. sbmlsim/combine/sedml/parser.py +1950 -0
  98. sbmlsim/combine/sedml/report.py +29 -0
  99. sbmlsim/combine/sedml/runner.py +70 -0
  100. sbmlsim/combine/sedml/task.py +507 -0
  101. sbmlsim/combine/validation.py +23 -0
  102. sbmlsim/comparison/__init__.py +0 -0
  103. sbmlsim/comparison/amicitesting/example_amici.py +34 -0
  104. sbmlsim/comparison/amicitesting/icg_sd.xml +3096 -0
  105. sbmlsim/comparison/amicitesting/icg_sd.zip +0 -0
  106. sbmlsim/comparison/diff.py +377 -0
  107. sbmlsim/comparison/example_comparison.py +118 -0
  108. sbmlsim/comparison/example_copasi.py +12 -0
  109. sbmlsim/comparison/icg_amici_simulation.py +54 -0
  110. sbmlsim/comparison/resources/condition.tsv +26 -0
  111. sbmlsim/comparison/resources/condition_liver.tsv +3 -0
  112. sbmlsim/comparison/resources/icg_events_sd.xml +3139 -0
  113. sbmlsim/comparison/resources/icg_liver.xml +548 -0
  114. sbmlsim/comparison/resources/icg_sd.xml +3096 -0
  115. sbmlsim/comparison/simulate.py +163 -0
  116. sbmlsim/comparison/simulate_amici.py +84 -0
  117. sbmlsim/comparison/simulate_copasi.py +81 -0
  118. sbmlsim/comparison/simulate_roadrunner.py +73 -0
  119. sbmlsim/data.py +576 -0
  120. sbmlsim/examples/__init__.py +0 -0
  121. sbmlsim/examples/datagenerator_example.py +69 -0
  122. sbmlsim/examples/example_model_change.py +146 -0
  123. sbmlsim/examples/example_scan.py +154 -0
  124. sbmlsim/examples/example_sensitivity.py +91 -0
  125. sbmlsim/examples/example_timecourse.py +63 -0
  126. sbmlsim/examples/example_units.py +92 -0
  127. sbmlsim/examples/experiments/__init__.py +0 -0
  128. sbmlsim/examples/experiments/covid/README.md +4 -0
  129. sbmlsim/examples/experiments/covid/__init__.py +0 -0
  130. sbmlsim/examples/experiments/covid/experiments/__init__.py +5 -0
  131. sbmlsim/examples/experiments/covid/experiments/bertozzi2020.py +83 -0
  132. sbmlsim/examples/experiments/covid/experiments/carcione2020.py +85 -0
  133. sbmlsim/examples/experiments/covid/experiments/cuadros2020.py +82 -0
  134. sbmlsim/examples/experiments/covid/models/Bertozzi2020/BIOMD0000000956.omex +0 -0
  135. sbmlsim/examples/experiments/covid/models/Bertozzi2020/Bertozzi2020.cps +1355 -0
  136. sbmlsim/examples/experiments/covid/models/Bertozzi2020/Bertozzi2020.omex +0 -0
  137. sbmlsim/examples/experiments/covid/models/Bertozzi2020/Bertozzi2020.sedml +207 -0
  138. sbmlsim/examples/experiments/covid/models/Bertozzi2020/Bertozzi2020.xml +1217 -0
  139. sbmlsim/examples/experiments/covid/models/Bertozzi2020/manifest.xml +7 -0
  140. sbmlsim/examples/experiments/covid/models/Bertozzi2020/metadata.rdf +11 -0
  141. sbmlsim/examples/experiments/covid/models/Bertozzi2020/plot_1.png +0 -0
  142. sbmlsim/examples/experiments/covid/models/Carcione2020/BIOMD0000000974.omex +0 -0
  143. sbmlsim/examples/experiments/covid/models/Carcione2020/Carcione2020.cps +1169 -0
  144. sbmlsim/examples/experiments/covid/models/Carcione2020/Carcione2020.omex +0 -0
  145. sbmlsim/examples/experiments/covid/models/Carcione2020/Carcione2020.sedml +81 -0
  146. sbmlsim/examples/experiments/covid/models/Carcione2020/Carcione2020.xml +724 -0
  147. sbmlsim/examples/experiments/covid/models/Carcione2020/manifest.xml +7 -0
  148. sbmlsim/examples/experiments/covid/models/Carcione2020/metadata.rdf +11 -0
  149. sbmlsim/examples/experiments/covid/models/Cuadros2020/BIOMD0000000969.omex +0 -0
  150. sbmlsim/examples/experiments/covid/models/Cuadros2020/Cuadros2020.cps +3489 -0
  151. sbmlsim/examples/experiments/covid/models/Cuadros2020/Cuadros2020.omex +0 -0
  152. sbmlsim/examples/experiments/covid/models/Cuadros2020/Cuadros2020.sedml +53 -0
  153. sbmlsim/examples/experiments/covid/models/Cuadros2020/Cuadros2020.xml +4184 -0
  154. sbmlsim/examples/experiments/covid/models/Cuadros2020/copasi/plot_1.png +0 -0
  155. sbmlsim/examples/experiments/covid/models/Cuadros2020/copasi/plot_3.png +0 -0
  156. sbmlsim/examples/experiments/covid/models/Cuadros2020/manifest.xml +7 -0
  157. sbmlsim/examples/experiments/covid/models/Cuadros2020/metadata.rdf +11 -0
  158. sbmlsim/examples/experiments/covid/models/Giordano2020/BIOMD0000000955.omex +0 -0
  159. sbmlsim/examples/experiments/covid/models/Hou2020/BIOMD0000000970.omex +0 -0
  160. sbmlsim/examples/experiments/covid/models/Hou2020/Hou2020.cps +1123 -0
  161. sbmlsim/examples/experiments/covid/models/Hou2020/Hou2020.omex +0 -0
  162. sbmlsim/examples/experiments/covid/models/Hou2020/Hou2020.sedml +168 -0
  163. sbmlsim/examples/experiments/covid/models/Hou2020/Hou2020.xml +678 -0
  164. sbmlsim/examples/experiments/covid/models/Hou2020/manifest.xml +7 -0
  165. sbmlsim/examples/experiments/covid/models/Hou2020/metadata.rdf +11 -0
  166. sbmlsim/examples/experiments/covid/models/Mwalili2020/BIOMD0000000964.omex +0 -0
  167. sbmlsim/examples/experiments/covid/models/Ndairou2020/BIOMD0000000958.omex +0 -0
  168. sbmlsim/examples/experiments/covid/models/Paiva2020/BIOMD0000000960.omex +0 -0
  169. sbmlsim/examples/experiments/covid/models/Renz2020/MODEL2003020001.omex +0 -0
  170. sbmlsim/examples/experiments/covid/models/Roda2020/BIOMD0000000957.omex +0 -0
  171. sbmlsim/examples/experiments/covid/models/Tang2020a/BIOMD0000000971.omex +0 -0
  172. sbmlsim/examples/experiments/covid/models/Tang2020b/BIOMD0000000972.omex +0 -0
  173. sbmlsim/examples/experiments/covid/models/Weitz2020/BIOMD0000000963-20201123-105212.omex +0 -0
  174. sbmlsim/examples/experiments/covid/models/Zhao2020/BIOMD0000000962-20201123-105150.omex +0 -0
  175. sbmlsim/examples/experiments/covid/omex/__init__.py +0 -0
  176. sbmlsim/examples/experiments/covid/omex/download_covid_models.py +46 -0
  177. sbmlsim/examples/experiments/covid/omex/models.json +26 -0
  178. sbmlsim/examples/experiments/covid/run_omex.py +24 -0
  179. sbmlsim/examples/experiments/covid/simulate.py +50 -0
  180. sbmlsim/examples/experiments/curve_types/__init__.py +0 -0
  181. sbmlsim/examples/experiments/curve_types/experiment.py +108 -0
  182. sbmlsim/examples/experiments/curve_types/model.py +99 -0
  183. sbmlsim/examples/experiments/curve_types/results/curve_types_model.html +1590 -0
  184. sbmlsim/examples/experiments/curve_types/results/curve_types_model.xml +142 -0
  185. sbmlsim/examples/experiments/curve_types/results/results/CurveTypesExperiment/CurveTypesExperiment.json +177 -0
  186. sbmlsim/examples/experiments/curve_types/results/results/CurveTypesExperiment/CurveTypesExperiment_figure0.svg +965 -0
  187. sbmlsim/examples/experiments/demo/__init__.py +0 -0
  188. sbmlsim/examples/experiments/demo/demo.py +129 -0
  189. sbmlsim/examples/experiments/demo/results/DemoExperiment/DemoExperiment.json +507 -0
  190. sbmlsim/examples/experiments/demo/results/DemoExperiment/DemoExperiment_Fig1.svg +15941 -0
  191. sbmlsim/examples/experiments/demo/results/DemoExperiment.json +553 -0
  192. sbmlsim/examples/experiments/demo/results/DemoExperiment_Fig1.svg +7513 -0
  193. sbmlsim/examples/experiments/glucose/DoseResponseExperiment.html +272 -0
  194. sbmlsim/examples/experiments/glucose/DoseResponseExperiment.md +230 -0
  195. sbmlsim/examples/experiments/glucose/__init__.py +6 -0
  196. sbmlsim/examples/experiments/glucose/data/DoseResponse/.DoseResponse_TabEpinephrine.tsv +88 -0
  197. sbmlsim/examples/experiments/glucose/data/DoseResponse/.DoseResponse_TabGlucagon.tsv +207 -0
  198. sbmlsim/examples/experiments/glucose/data/DoseResponse/.DoseResponse_TabInsulin.tsv +182 -0
  199. sbmlsim/examples/experiments/glucose/experiments/__init__.py +0 -0
  200. sbmlsim/examples/experiments/glucose/experiments/dose_response.py +264 -0
  201. sbmlsim/examples/experiments/glucose/glucose.py +29 -0
  202. sbmlsim/examples/experiments/glucose/index.html +22 -0
  203. sbmlsim/examples/experiments/glucose/index.md +6 -0
  204. sbmlsim/examples/experiments/glucose/model/liver_glucose.html +28138 -0
  205. sbmlsim/examples/experiments/glucose/model/liver_glucose.xml +7678 -0
  206. sbmlsim/examples/experiments/glucose/results/DoseResponseExperiment/DoseResponseExperiment.html +358 -0
  207. sbmlsim/examples/experiments/glucose/results/DoseResponseExperiment/DoseResponseExperiment.json +78 -0
  208. sbmlsim/examples/experiments/glucose/results/DoseResponseExperiment/DoseResponseExperiment_epinephrine.tsv +88 -0
  209. sbmlsim/examples/experiments/glucose/results/DoseResponseExperiment/DoseResponseExperiment_glucagon.tsv +108 -0
  210. sbmlsim/examples/experiments/glucose/results/DoseResponseExperiment/DoseResponseExperiment_insulin.tsv +143 -0
  211. sbmlsim/examples/experiments/glucose/results/index.html +63 -0
  212. sbmlsim/examples/experiments/initial_assignment/initial_assignment.py +130 -0
  213. sbmlsim/examples/experiments/midazolam/__init__.py +4 -0
  214. sbmlsim/examples/experiments/midazolam/data/Kupferschmidt1995/.Kupferschmidt1995_Fig1.tsv +51 -0
  215. sbmlsim/examples/experiments/midazolam/data/Kupferschmidt1995/.Kupferschmidt1995_Fig2.tsv +51 -0
  216. sbmlsim/examples/experiments/midazolam/data/Kupferschmidt1995/.Kupferschmidt1995_Tab1.tsv +21 -0
  217. sbmlsim/examples/experiments/midazolam/data/Kupferschmidt1995/.Kupferschmidt1995_Tab2.tsv +17 -0
  218. sbmlsim/examples/experiments/midazolam/data/Mandema1992/.Mandema1992_Fig1A.tsv +29 -0
  219. sbmlsim/examples/experiments/midazolam/data/Mandema1992/.Mandema1992_Fig2A.tsv +15 -0
  220. sbmlsim/examples/experiments/midazolam/data/Mandema1992/.Mandema1992_Fig3A.tsv +23 -0
  221. sbmlsim/examples/experiments/midazolam/experiments/__init__.py +79 -0
  222. sbmlsim/examples/experiments/midazolam/experiments/kupferschmidt1995.py +230 -0
  223. sbmlsim/examples/experiments/midazolam/experiments/mandema1992.py +224 -0
  224. sbmlsim/examples/experiments/midazolam/fitting_example.py +48 -0
  225. sbmlsim/examples/experiments/midazolam/fitting_problems.py +209 -0
  226. sbmlsim/examples/experiments/midazolam/model/midazolam_body_flat.xml +2631 -0
  227. sbmlsim/examples/experiments/midazolam/simulate.py +60 -0
  228. sbmlsim/examples/experiments/repressilator/__init__.py +0 -0
  229. sbmlsim/examples/experiments/repressilator/repressilator.py +175 -0
  230. sbmlsim/examples/experiments/repressilator/repressilator_scans.py +236 -0
  231. sbmlsim/experiment/__init__.py +15 -0
  232. sbmlsim/experiment/experiment.py +638 -0
  233. sbmlsim/experiment/runner.py +183 -0
  234. sbmlsim/fit/TODO.md +26 -0
  235. sbmlsim/fit/__init__.py +14 -0
  236. sbmlsim/fit/analysis.py +1082 -0
  237. sbmlsim/fit/helpers.py +123 -0
  238. sbmlsim/fit/objects.py +479 -0
  239. sbmlsim/fit/optimization.py +777 -0
  240. sbmlsim/fit/options.py +147 -0
  241. sbmlsim/fit/pet/README.md +21 -0
  242. sbmlsim/fit/pet/__init__.py +1 -0
  243. sbmlsim/fit/pet/amici_example.py +41 -0
  244. sbmlsim/fit/pet/boehm_JProteomeRes2014/Boehm_JProteomeRes2014.yaml +13 -0
  245. sbmlsim/fit/pet/boehm_JProteomeRes2014/benchmark_import.py +48 -0
  246. sbmlsim/fit/pet/boehm_JProteomeRes2014/boehm_JProteomeRes2014.xml +430 -0
  247. sbmlsim/fit/pet/boehm_JProteomeRes2014/data_boehm_JProteomeRes2014.h5 +0 -0
  248. sbmlsim/fit/pet/boehm_JProteomeRes2014/experimentalCondition_Boehm_JProteomeRes2014.tsv +2 -0
  249. sbmlsim/fit/pet/boehm_JProteomeRes2014/measurementData_Boehm_JProteomeRes2014.tsv +49 -0
  250. sbmlsim/fit/pet/boehm_JProteomeRes2014/model_Boehm_JProteomeRes2014.xml +290 -0
  251. sbmlsim/fit/pet/boehm_JProteomeRes2014/observables_Boehm_JProteomeRes2014.tsv +4 -0
  252. sbmlsim/fit/pet/boehm_JProteomeRes2014/parameters_Boehm_JProteomeRes2014.tsv +12 -0
  253. sbmlsim/fit/pet/boehm_JProteomeRes2014/simulatedData_Boehm_JProteomeRes2014.tsv +49 -0
  254. sbmlsim/fit/pet/boehm_JProteomeRes2014/visualizationSpecification_Boehm_JProteomeRes2014.tsv +4 -0
  255. sbmlsim/fit/pet/petab_example_01.py +43 -0
  256. sbmlsim/fit/pet/petab_example_02.py +42 -0
  257. sbmlsim/fit/pet/pravastatin_body_all_flat.xml +6471 -0
  258. sbmlsim/fit/petab_omex.py +94 -0
  259. sbmlsim/fit/result.py +252 -0
  260. sbmlsim/fit/rmse.py +50 -0
  261. sbmlsim/fit/runner.py +243 -0
  262. sbmlsim/fit/sampling.py +156 -0
  263. sbmlsim/interpolation/__init__.py +0 -0
  264. sbmlsim/interpolation/interpolation.py +408 -0
  265. sbmlsim/interpolation/interpolation_example.py +61 -0
  266. sbmlsim/model/__init__.py +11 -0
  267. sbmlsim/model/model.py +103 -0
  268. sbmlsim/model/model_change.py +51 -0
  269. sbmlsim/model/model_resources.py +163 -0
  270. sbmlsim/model/model_roadrunner.py +315 -0
  271. sbmlsim/plot/__init__.py +5 -0
  272. sbmlsim/plot/plotting.py +1509 -0
  273. sbmlsim/plot/plotting_deprecated_matplotlib.py +238 -0
  274. sbmlsim/plot/serialization_matplotlib.py +454 -0
  275. sbmlsim/report/__init__.py +1 -0
  276. sbmlsim/report/experiment_report.py +196 -0
  277. sbmlsim/resources/__init__.py +5 -0
  278. sbmlsim/resources/models/Koenig_demo_14.xml +728 -0
  279. sbmlsim/resources/models/midazolam_body_flat.xml +2551 -0
  280. sbmlsim/resources/models/repressilator.xml +1021 -0
  281. sbmlsim/resources/templates/experiment.html +109 -0
  282. sbmlsim/resources/templates/experiment.md +48 -0
  283. sbmlsim/resources/templates/index.html +67 -0
  284. sbmlsim/resources/templates/index.md +17 -0
  285. sbmlsim/resources/templates/index.tex +10 -0
  286. sbmlsim/resources/templates/report_vue.html +75 -0
  287. sbmlsim/result/__init__.py +5 -0
  288. sbmlsim/result/datagenerator.py +59 -0
  289. sbmlsim/result/report.py +29 -0
  290. sbmlsim/result/xresult.py +200 -0
  291. sbmlsim/sensitivity/__init__.py +40 -0
  292. sbmlsim/sensitivity/analysis.py +435 -0
  293. sbmlsim/sensitivity/example/.gitignore +1 -0
  294. sbmlsim/sensitivity/example/sensitivity_example.py +178 -0
  295. sbmlsim/sensitivity/example/simple_chain.md +36 -0
  296. sbmlsim/sensitivity/example/simple_chain.py +83 -0
  297. sbmlsim/sensitivity/example/simple_chain.xml +89 -0
  298. sbmlsim/sensitivity/parameters.py +199 -0
  299. sbmlsim/sensitivity/plots.py +184 -0
  300. sbmlsim/sensitivity/sensitivity_fast.py +199 -0
  301. sbmlsim/sensitivity/sensitivity_local.py +247 -0
  302. sbmlsim/sensitivity/sensitivity_sampling.py +379 -0
  303. sbmlsim/sensitivity/sensitivity_sobol.py +208 -0
  304. sbmlsim/serialization.py +69 -0
  305. sbmlsim/simulation/__init__.py +13 -0
  306. sbmlsim/simulation/algorithm.py +73 -0
  307. sbmlsim/simulation/base.py +77 -0
  308. sbmlsim/simulation/calculation.py +241 -0
  309. sbmlsim/simulation/change.py +35 -0
  310. sbmlsim/simulation/kisaos.py +196 -0
  311. sbmlsim/simulation/range.py +293 -0
  312. sbmlsim/simulation/scan.py +185 -0
  313. sbmlsim/simulation/sensitivity.py +308 -0
  314. sbmlsim/simulation/simulation.py +139 -0
  315. sbmlsim/simulation/timecourse.py +240 -0
  316. sbmlsim/simulator/__init__.py +7 -0
  317. sbmlsim/simulator/simulation_serial.py +220 -0
  318. sbmlsim/task/__init__.py +7 -0
  319. sbmlsim/task/task.py +42 -0
  320. sbmlsim/task/task_new.py +74 -0
  321. sbmlsim/units.py +454 -0
  322. sbmlsim/utils.py +74 -0
  323. sbmlsim-0.3.0.dist-info/METADATA +114 -0
  324. sbmlsim-0.3.0.dist-info/RECORD +326 -0
  325. sbmlsim-0.3.0.dist-info/WHEEL +4 -0
  326. sbmlsim-0.3.0.dist-info/licenses/LICENSE +7 -0
sbmlsim/__init__.py ADDED
@@ -0,0 +1,10 @@
1
+ """sbmlsim package."""
2
+
3
+ from pathlib import Path
4
+
5
+ __author__ = "Matthias Koenig"
6
+ __version__ = "0.3.0"
7
+
8
+
9
+ BASE_PATH = Path(__file__).parent
10
+ RESOURCES_DIR = BASE_PATH / "resources"
@@ -0,0 +1,92 @@
1
+
2
+ - [ ] RepeatedTasks with new features
3
+ - [ ] 3D plotting
4
+ - [ ] parameter fitting
5
+
6
+
7
+ -----------------------------
8
+
9
+ sbmlsim.Experiment
10
+ - globally unique identifiers (validate on object creation)
11
+ - identifiers must be SIDs! (so that experiements can be )
12
+
13
+ - [ ] applied dimensions;
14
+
15
+
16
+ # Documentation
17
+ - [ ] create documentation of SED-ML features
18
+
19
+ - [ ] parse KISAO ontology
20
+
21
+ # Test cases
22
+ - [ ] execute/update all examples for the specification
23
+
24
+ # Run COMBINE archive
25
+ - [x] execute COMBINE archives (refactoring required; also store results)
26
+
27
+ # Serialization (SimulationExperiment -> SED-ML)
28
+ - [ ] datasets !
29
+ - [ ] slices
30
+ - [ ] dataRange
31
+ - [x] model
32
+ - [x] resolve model from URN
33
+ - [S] AddXML, ChangeXML, RemoveXML
34
+ - [S] ComputeChange
35
+ - [~S] support amount, concentration and native species targets
36
+ - [x] simulation
37
+ - [x] UniformTimecourse
38
+ - [S] OneStep
39
+ - [S] SteadyState
40
+ - [~] tasks
41
+ - [x] Task
42
+ - [ ] RepeatedTask
43
+ - [x] data generators
44
+ - [x] figures
45
+ - [x] plot2d
46
+ - [ ] plot3d
47
+ - [x] styles
48
+ - [ ] reports
49
+ - [ ] concentrations/amounts xpath (parse symbols and use for evaluation)
50
+ - [ ] data generators
51
+ - [ ] model changes; changesets
52
+
53
+ # Parsing (SED-ML -> SimulationExperiment)
54
+ - [ ] datasets !
55
+
56
+ - [ ] parameters in computation
57
+
58
+ ## Plot2D
59
+ - [x] fix reverse axis
60
+ - [x] support height and width;
61
+ plots have height & width; these can be directly set in single plot figures;
62
+ for multi-plot figures the combined height and width must be calculated
63
+ - [x] use curve.name as label in legend
64
+ - [x] support style on axis
65
+ - [x] support setting label (name of axis)
66
+ - [x] plot width and height
67
+ - [x] curve type (points, bar, ...)
68
+ - [~] error bars; assymetrical error bars; see https://github.com/SED-ML/sed-ml/issues/137
69
+ - [x] styling of bar plots;
70
+ - [x] yAxis right
71
+ - [x] order of abstract curve
72
+ - [x] shaded areas & fills
73
+ - [x] resolve and apply basestyle
74
+ - [x] update bar styling (see https://github.com/SED-ML/sed-ml/issues/140)
75
+ - [ ] support figure caption via notes (<notes><p xmlns="xhtml">Figure 1 - Example for figure with text legend and sub-plots.</p></notes>)
76
+
77
+
78
+ # Reports
79
+ - [ ] reports
80
+ # Repeated Tasks
81
+ - [ ] repeated task
82
+ # Simulation
83
+ - [ ] steady state & one-step
84
+ # Kisao terms
85
+
86
+ ## Plot3D
87
+ - [ ] Plot3D examples (surfaces)
88
+ - [ ] use surface.name as label in legend
89
+
90
+ # Parameter fitting
91
+
92
+ # Altair serialization
@@ -0,0 +1,4 @@
1
+ """Package for working with COMBINE standards.
2
+
3
+ COMBINE archive and SED-ML support.
4
+ """
@@ -0,0 +1,61 @@
1
+ """DataGenerator."""
2
+
3
+ from sbmlsim.data import DataSet
4
+ from sbmlsim.result import XResult
5
+
6
+
7
+ class DataGeneratorFunction:
8
+ """DataGeneratorFunction."""
9
+
10
+ def __call__(
11
+ self, xresults: dict[str, XResult], dsets: dict[str, DataSet] = None
12
+ ) -> dict[str, XResult]:
13
+ """Call the function."""
14
+ raise NotImplementedError
15
+
16
+
17
+ class DataGeneratorIndexingFunction(DataGeneratorFunction):
18
+ """DataGeneratorIndexingFunction."""
19
+
20
+ def __init__(self, index: int, dimension: str = "_time"):
21
+ """Initialize DataGeneratorIndexingFunction."""
22
+ self.index = index
23
+ self.dimension = dimension
24
+
25
+ def __call__(self, xresults: dict[str, XResult], dsets=None) -> dict[str, XResult]:
26
+ """Reduce based on '_time' dimension with given index."""
27
+ results = {}
28
+ for key, xres in xresults.items():
29
+ xds_new = xres.xds.isel({self.dimension: self.index})
30
+ xres_new = XResult(xdataset=xds_new, uinfo=xres.uinfo)
31
+ results[key] = xres_new
32
+
33
+ return results
34
+
35
+
36
+ class DataGenerator:
37
+ """DataGenerator.
38
+
39
+ DataGenerators allow to postprocess existing data. This can be a variety of
40
+ operations.
41
+
42
+ - Slicing: reduce the dimension of a given XResult, by slicing a subset on a
43
+ given dimension
44
+ - Cumulative processing: mean, sd, ...
45
+ - Complex processing, such as pharmacokinetics calculation.
46
+ """
47
+
48
+ def __init__(
49
+ self,
50
+ f: DataGeneratorFunction,
51
+ xresults: dict[str, XResult],
52
+ dsets: dict[str, DataSet] = None,
53
+ ):
54
+ """Initialize DataGenerator."""
55
+ self.xresults = xresults
56
+ self.dsets = dsets
57
+ self.f = f
58
+
59
+ def process(self) -> XResult:
60
+ """Process the data generator."""
61
+ return self.f(xresults=self.xresults, dsets=self.dsets)
File without changes
@@ -0,0 +1,42 @@
1
+ """
2
+ Execute a COMBINE archive.
3
+ """
4
+ from pathlib import Path
5
+
6
+ from sbmlsim.combine.examples import execute_sedml
7
+ from tests import DATA_DIR
8
+
9
+
10
+ def run_repressilator():
11
+ repressilator_omex = DATA_DIR / "omex" / "tellurium" / "repressilator.omex"
12
+ working_dir = Path(__file__).parent / "results" / "repressilator_omex"
13
+ working_dir.mkdir(exist_ok=True)
14
+ execute_sedml(path=repressilator_omex, working_dir=working_dir)
15
+
16
+
17
+ def run_omex(omex_path: Path):
18
+ # print(omex_path)
19
+ working_dir = Path(__file__).parent / "results" / omex_path.name
20
+ # print(working_dir)
21
+ working_dir.mkdir(parents=True, exist_ok=True)
22
+ execute_sedml(path=omex_path, working_dir=working_dir, output_path=working_dir)
23
+
24
+
25
+ if __name__ == "__main__":
26
+
27
+ biomodels_omex_base_path = DATA_DIR / "combine" / "omex" / "biomodels" / "omex"
28
+ biomodels_omex_paths = []
29
+ for path in Path(biomodels_omex_base_path).rglob("*.omex"):
30
+ biomodels_omex_paths.append(path)
31
+ biomodels_omex_paths = sorted(biomodels_omex_paths)
32
+
33
+ for omex_path in [biomodels_omex_base_path / "BIOMD0000000111_fi4_sedml.omex"]:
34
+ run_omex(omex_path)
35
+
36
+ # for omex_path in sorted(biomodels_omex_paths):
37
+ # run_biomodel_omex(omex_path)
38
+
39
+ "/home/mkoenig/git/sbmlsim/src/sbmlsim/tests/data/combine/omex/jws/omex/fraser2002_fig1a_1b_2a_2b.sedx"
40
+ "/home/mkoenig/git/sbmlsim/src/sbmlsim/tests/data/combine/omex/jws/omex/levering2012_fig2-user.sedx",
41
+ "/home/mkoenig/git/sbmlsim/src/sbmlsim/tests/data/combine/omex/jws/omex/levering2012_fig5-user.sedx",
42
+ "/home/mkoenig/git/sbmlsim/src/sbmlsim/tests/data/combine/omex/jws/omex/martins2016_fig4b.sedx"
@@ -0,0 +1,68 @@
1
+ """Execute SED-ML."""
2
+ from pathlib import Path
3
+
4
+ from sbmlsim.combine.sedml.runner import execute_sedml
5
+
6
+
7
+ examples_dir = Path(__file__).parent / "l1v4"
8
+ # examples_dir = Path(__file__).parent / "l1v4_l1v3"
9
+
10
+ l1v4_l1v3_files = ["repeated-stochastic-runs/repeated-stochastic-runs.sedml"]
11
+
12
+ l1v4_files = [
13
+ # plotting
14
+ "algorithm_parameters.sedml",
15
+ # "axis.sedml",
16
+ # "axis_grids.sedml",
17
+ # "axis_minmax.sedml",
18
+ # "axis_minmax_smaller.sedml",
19
+ # "axis_minormax.sedml",
20
+ # "concentration_amount.sedml", # FIXME
21
+ # "concentration_amount_b.sedml" # FIXME
22
+ # "curve_types.sedml",
23
+ # "curve_types_errors.sedml",
24
+ # "heat_map_ls.sedml",
25
+ # "markertype.sedml",
26
+ # "linetype.sedml",
27
+ # "right_yaxis.sedml",
28
+ # "line_overlap_order.sedml",
29
+ # "repressilator_figure.xml",
30
+ # "repressilator.xml",
31
+ # "repressilator_urn.xml",
32
+ # "test_file_1.sedml",
33
+ # "test_line_fill.sedml",
34
+ # "stacked_bar.sedml",
35
+ # "test_3hbarstacked.sedml",
36
+ # "test_bar.sedml",
37
+ # "test_bar3stacked.sedml",
38
+ # "test_file.sedml",
39
+ # "test_hbar_stacked.sedml",
40
+ # "test_shaded_area.sedml",
41
+ # "test_shaded_area_overlap_order.sedml",
42
+ # "test_base_styles.sedml",
43
+ ]
44
+
45
+ if __name__ == "__main__":
46
+ # ----------------------
47
+ # L1V4 Plotting
48
+ # ----------------------
49
+ working_dir = examples_dir
50
+ for sedml_file in l1v4_files:
51
+ # for sedml_file in l1v4_l1v3_files:
52
+ execute_sedml(
53
+ path=examples_dir / sedml_file,
54
+ working_dir=examples_dir / "sbmlsim",
55
+ output_path=examples_dir / "sbmlsim",
56
+ )
57
+
58
+ # ----------------------
59
+ # L1V4 Parameter Fitting
60
+ # ----------------------
61
+ # working_dir = base_path / "l1v4_parameter_fitting"
62
+ # for name, sedml_file in [
63
+ # # "Elowitz_Nature2000.xml",
64
+ # ]:
65
+ # execute_sedml(
66
+ # working_dir=working_dir,
67
+ # path=working_dir / sedml_file
68
+ # )