Skip to content

Commit ae6ca16

Browse files
authored
fix noise distributions in the models overview (#174)
* fix noise distributions in the models overview
1 parent 11dfed1 commit ae6ca16

File tree

2 files changed

+33
-12
lines changed

2 files changed

+33
-12
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ Contributions to the collection are very welcome. For this, please create a new
77
| PEtab Problem ID | Conditions | Estimated Parameters | Events | Preequilibration | Postequilibration | Measurements | Observables | Noise distribution(s) | Species | References |
88
|:---------------------------------------------------------------------------------------------|-------------:|-----------------------:|---------:|-------------------:|--------------------:|---------------:|--------------:|:------------------------|----------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
99
| [Alkan_SciSignal2018](Benchmark-Models/Alkan_SciSignal2018/) | 73 | 56 | 0 | 0 | 0 | 1733 | 12 | normal | 36 | [\[1\]](http://identifiers.org/doi/10.1126/scisignal.aat0229) |
10-
| [Bachmann_MSB2011](Benchmark-Models/Bachmann_MSB2011/) | 36 | 113 | 0 | 0 | 0 | 541 | 20 | normal | 25 | [\[1\]](http://identifiers.org/doi/10.1038/msb.2011.50) |
10+
| [Bachmann_MSB2011](Benchmark-Models/Bachmann_MSB2011/) | 36 | 113 | 0 | 0 | 0 | 541 | 20 | log10-normal; normal | 25 | [\[1\]](http://identifiers.org/doi/10.1038/msb.2011.50) |
1111
| [Beer_MolBioSystems2014](Benchmark-Models/Beer_MolBioSystems2014/) | 19 | 72 | 0 | 0 | 0 | 27132 | 2 | normal | 4 | [\[1\]](http://identifiers.org/doi/10.1039/c3mb70594c) |
1212
| [Bertozzi_PNAS2020](Benchmark-Models/Bertozzi_PNAS2020/) | 2 | 3 | 0 | 0 | 0 | 138 | 1 | normal | 3 | [\[1\]](http://identifiers.org/pubmed/32616574) |
13-
| [Blasi_CellSystems2016](Benchmark-Models/Blasi_CellSystems2016/) | 1 | 9 | 0 | 0 | 1 | 252 | 15 | normal | 16 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2016.01.002) |
13+
| [Blasi_CellSystems2016](Benchmark-Models/Blasi_CellSystems2016/) | 1 | 9 | 0 | 0 | 1 | 252 | 15 | log-normal | 16 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2016.01.002) |
1414
| [Boehm_JProteomeRes2014](Benchmark-Models/Boehm_JProteomeRes2014/) | 1 | 9 | 0 | 0 | 0 | 48 | 3 | normal | 8 | [\[1\]](http://identifiers.org/doi/10.1021/pr5006923) |
15-
| [Borghans_BiophysChem1997](Benchmark-Models/Borghans_BiophysChem1997/) | 1 | 23 | 0 | 0 | 0 | 111 | 1 | normal | 3 | [\[1\]](http://identifiers.org/doi/10.1016/s0301-4622(97)00010-0) |
15+
| [Borghans_BiophysChem1997](Benchmark-Models/Borghans_BiophysChem1997/) | 1 | 23 | 0 | 0 | 0 | 111 | 1 | log10-normal | 3 | [\[1\]](http://identifiers.org/doi/10.1016/s0301-4622(97)00010-0) |
1616
| [Brannmark_JBC2010](Benchmark-Models/Brannmark_JBC2010/) | 8 | 22 | 0 | 1 | 0 | 43 | 3 | normal | 9 | [\[1\]](http://identifiers.org/doi/10.1074/jbc.M110.106849) |
1717
| [Bruno_JExpBot2016](Benchmark-Models/Bruno_JExpBot2016/) | 6 | 13 | 0 | 0 | 0 | 77 | 5 | normal | 7 | [\[1\]](http://identifiers.org/doi/10.1093/jxb/erw356) |
1818
| [Chen_MSB2009](Benchmark-Models/Chen_MSB2009/) | 4 | 155 | 0 | 0 | 0 | 120 | 3 | normal | 500 | [\[1\]](http://identifiers.org/doi/10.1038/msb.2008.74) |
1919
| [Crauste_CellSystems2017](Benchmark-Models/Crauste_CellSystems2017/) | 1 | 12 | 0 | 0 | 0 | 21 | 4 | normal | 5 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2017.01.014) |
20-
| [Elowitz_Nature2000](Benchmark-Models/Elowitz_Nature2000/) | 1 | 21 | 0 | 0 | 0 | 58 | 1 | normal | 8 | [\[1\]](http://identifiers.org/doi/10.1038/35002125) |
20+
| [Elowitz_Nature2000](Benchmark-Models/Elowitz_Nature2000/) | 1 | 21 | 0 | 0 | 0 | 58 | 1 | log10-normal | 8 | [\[1\]](http://identifiers.org/doi/10.1038/35002125) |
2121
| [Fiedler_BMC2016](Benchmark-Models/Fiedler_BMC2016/) | 3 | 22 | 0 | 0 | 0 | 72 | 2 | normal | 6 | [\[1\]](http://identifiers.org/doi/10.1186/s12918-016-0319-7) |
2222
| [Froehlich_CellSystems2018](Benchmark-Models/Froehlich_CellSystems2018/) | 9169 | 4231 | 0 | 0 | 9169 | 9169 | 1 | normal | 1396 | [\[1\]](http://identifiers.org/doi/10.1126/scisignal.aat0229) |
2323
| [Fujita_SciSignal2010](Benchmark-Models/Fujita_SciSignal2010/) | 6 | 19 | 0 | 0 | 0 | 144 | 3 | normal | 9 | [\[1\]](http://identifiers.org/doi/10.1126/scisignal.2000810) |
2424
| [Giordano_Nature2020](Benchmark-Models/Giordano_Nature2020/) | 1 | 50 | 0 | 0 | 0 | 313 | 7 | normal | 13 | [\[1\]](http://identifiers.org/pubmed/32322102) |
2525
| [Isensee_JCB2018](Benchmark-Models/Isensee_JCB2018/) | 123 | 46 | 0 | 1 | 0 | 687 | 3 | normal | 25 | [\[1\]](http://identifiers.org/doi/10.1083/jcb.201708053) |
26-
| [Laske_PLOSComputBiol2019](Benchmark-Models/Laske_PLOSComputBiol2019/) | 3 | 13 | 0 | 0 | 0 | 42 | 13 | normal | 41 | [\[1\]](http://identifiers.org/biomodels.db/BIOMD0000000463) [\[2\]](http://identifiers.org/biomodels.db/MODEL1307270000) [\[3\]](http://identifiers.org/pubmed/22593159) |
27-
| [Lucarelli_CellSystems2018](Benchmark-Models/Lucarelli_CellSystems2018/) | 16 | 84 | 0 | 0 | 0 | 1755 | 65 | normal | 33 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2017.11.010) |
26+
| [Laske_PLOSComputBiol2019](Benchmark-Models/Laske_PLOSComputBiol2019/) | 3 | 13 | 0 | 0 | 0 | 42 | 13 | normal; log-normal | 41 | [\[1\]](http://identifiers.org/biomodels.db/BIOMD0000000463) [\[2\]](http://identifiers.org/biomodels.db/MODEL1307270000) [\[3\]](http://identifiers.org/pubmed/22593159) |
27+
| [Lucarelli_CellSystems2018](Benchmark-Models/Lucarelli_CellSystems2018/) | 16 | 84 | 0 | 0 | 0 | 1755 | 65 | log10-normal; normal | 33 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2017.11.010) |
2828
| [Okuonghae_ChaosSolitonsFractals2020](Benchmark-Models/Okuonghae_ChaosSolitonsFractals2020/) | 1 | 16 | 0 | 0 | 0 | 92 | 2 | normal | 9 | [\[1\]](http://identifiers.org/doi/10.1016/j.chaos.2020.110032) |
2929
| [Oliveira_NatCommun2021](Benchmark-Models/Oliveira_NatCommun2021/) | 1 | 12 | 0 | 0 | 0 | 120 | 2 | normal | 9 | [\[1\]](http://identifiers.org/doi/10.1038/s41467-020-19798-3) |
30-
| [Perelson_Science1996](Benchmark-Models/Perelson_Science1996/) | 1 | 3 | 0 | 0 | 0 | 16 | 1 | normal | 4 | [\[1\]](http://identifiers.org/doi/10.1126/science.271.5255.1582) |
30+
| [Perelson_Science1996](Benchmark-Models/Perelson_Science1996/) | 1 | 3 | 0 | 0 | 0 | 16 | 1 | log10-normal | 4 | [\[1\]](http://identifiers.org/doi/10.1126/science.271.5255.1582) |
3131
| [Rahman_MBS2016](Benchmark-Models/Rahman_MBS2016/) | 1 | 9 | 0 | 0 | 0 | 23 | 1 | normal | 7 | [\[1\]](http://identifiers.org/doi/10.1016/j.mbs.2016.07.009) |
3232
| [Raimundez_PCB2020](Benchmark-Models/Raimundez_PCB2020/) | 170 | 136 | 0 | 4 | 0 | 627 | 79 | normal | 22 | [\[1\]](http://identifiers.org/doi/10.1371/journal.pcbi.1007147) |
3333
| [SalazarCavazos_MBoC2020](Benchmark-Models/SalazarCavazos_MBoC2020/) | 4 | 6 | 0 | 0 | 0 | 18 | 3 | normal | 75 | [\[1\]](http://identifiers.org/doi/10.1091/mbc.E19-09-0548) |
34-
| [Schwen_PONE2014](Benchmark-Models/Schwen_PONE2014/) | 19 | 30 | 0 | 0 | 0 | 286 | 4 | normal | 11 | [\[1\]](http://identifiers.org/doi/10.1371/journal.pone.0133653) |
34+
| [Schwen_PONE2014](Benchmark-Models/Schwen_PONE2014/) | 19 | 30 | 0 | 0 | 0 | 286 | 4 | log10-normal | 11 | [\[1\]](http://identifiers.org/doi/10.1371/journal.pone.0133653) |
3535
| [Sneyd_PNAS2002](Benchmark-Models/Sneyd_PNAS2002/) | 9 | 15 | 0 | 0 | 0 | 135 | 1 | normal | 6 | [\[1\]](http://identifiers.org/doi/10.1073/pnas.032281999) |
3636
| [Weber_BMC2015](Benchmark-Models/Weber_BMC2015/) | 2 | 36 | 0 | 1 | 0 | 135 | 8 | normal | 7 | [\[1\]](http://identifiers.org/doi/10.1186/s12918-015-0147-1) |
3737
| [Zhao_QuantBiol2020](Benchmark-Models/Zhao_QuantBiol2020/) | 7 | 28 | 0 | 0 | 0 | 82 | 1 | normal | 5 | [\[1\]](http://identifiers.org/pubmed/32219006) |

scripts/overview.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def get_summary(
3434
petab_problem_id: str = None,
3535
) -> Dict:
3636
"""Get dictionary with stats for the given PEtab problem"""
37+
print(petab_problem_id)
3738
return {
3839
'petab_problem_id':
3940
petab_problem_id,
@@ -86,12 +87,32 @@ def get_reference_uris(sbml_model: libsbml.Model) -> List[str]:
8687

8788

8889
def get_noise_distributions(observable_df):
90+
8991
if petab.NOISE_DISTRIBUTION in observable_df.columns:
90-
noise_distrs = ['normal' if dist is np.nan else dist for dist in
91-
observable_df[petab.NOISE_DISTRIBUTION]]
92-
noise_distrs = set(noise_distrs)
92+
observable_df = observable_df.fillna(
93+
value={petab.NOISE_DISTRIBUTION: petab.NORMAL})
94+
if petab.OBSERVABLE_TRANSFORMATION in observable_df.columns:
95+
observable_df = observable_df.fillna(
96+
value={petab.OBSERVABLE_TRANSFORMATION: petab.LIN})
97+
noise_distrs = [tuple(e.values) for _, e in observable_df[
98+
[petab.OBSERVABLE_TRANSFORMATION,
99+
petab.NOISE_DISTRIBUTION]].iterrows()]
100+
else:
101+
noise_distrs = [(petab.LIN, e) for e in
102+
observable_df[petab.NOISE_DISTRIBUTION]]
103+
93104
else:
94-
noise_distrs = {'normal'}
105+
if petab.OBSERVABLE_TRANSFORMATION in observable_df.columns:
106+
observable_df = observable_df.fillna(
107+
value={petab.OBSERVABLE_TRANSFORMATION: petab.LIN})
108+
noise_distrs = [(e, petab.NORMAL) for e in
109+
observable_df[petab.OBSERVABLE_TRANSFORMATION]]
110+
else:
111+
noise_distrs = {(petab.LIN, petab.NORMAL)}
112+
113+
noise_distrs = set(noise_distrs)
114+
noise_distrs = ['-'.join(nd) if nd[0] != petab.LIN else
115+
nd[1] for nd in noise_distrs]
95116
return "; ".join(noise_distrs)
96117

97118

0 commit comments

Comments
 (0)