From 1309fd313d0cd84287056af13ccfd314c3ba69eb Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Feb 2022 11:57:38 +0100 Subject: [PATCH 1/3] Overview table: link to respective publication Add reference links to table based on SBML annotations. NOTE: Not all current models are properly annotated. --- Benchmark-Models/model_info.py | 27 +++++++++++++-- README.md | 63 +++++++++++++++++----------------- 2 files changed, 57 insertions(+), 33 deletions(-) diff --git a/Benchmark-Models/model_info.py b/Benchmark-Models/model_info.py index 8998ee0..93b3e3c 100755 --- a/Benchmark-Models/model_info.py +++ b/Benchmark-Models/model_info.py @@ -2,13 +2,13 @@ """Print some stats for each benchmark problem""" import os -from typing import Dict +from typing import Dict, List +import libsbml import numpy as np import pandas as pd import petab - markdown_columns = { 'conditions': 'Conditions', 'estimated_parameters': 'Estimated Parameters', @@ -17,6 +17,7 @@ 'name': 'Model ID', 'observables': 'Observables', 'species': 'Species', + 'described_by': 'References', } index_column = 'name' @@ -42,9 +43,25 @@ def get_problem_info( len(problem.measurement_df[petab.OBSERVABLE_ID].unique()), 'species': len(problem.sbml_model.getListOfSpecies()), + 'described_by': + get_described_by(problem.sbml_model), } +def get_described_by(sbml_model: libsbml.Model) -> List[str]: + """Get publication URIs from SBML is-described-by annotatation""" + cv_terms = sbml_model.getCVTerms() + reference_uris = [] + for anno in cv_terms: + if anno.getBiologicalQualifierType() != libsbml.BQB_IS_DESCRIBED_BY: + continue + resources = anno.getResources() + for i in range(resources.getNumAttributes()): + uri = resources.getValue(i) + reference_uris.append(uri) + return reference_uris + + def get_overview_table(path: str = None) -> pd.DataFrame: """Get overview table with stats for all benchmark problems""" model_list = os.scandir(path=path) @@ -70,8 +87,14 @@ def main( pd.options.display.width = 0 if markdown: + # directory as markdown link df.rename(index=lambda x: f"[{x}](Benchmark-Models/{x}/)", inplace=True) + # references to markdown links + df['described_by'] = df['described_by'].apply( + lambda x: " ".join([f"[\\[{i + 1}\\]]({uri})" + for i, uri in enumerate(x)]) + ) df.index.rename(markdown_columns[index_column], inplace=True) df.rename(columns=markdown_columns, inplace=True) print(df.to_markdown()) diff --git a/README.md b/README.md index 90679a8..bc14522 100644 --- a/README.md +++ b/README.md @@ -4,37 +4,38 @@ A collection of mathematical models with experimental data in the [PEtab](https: Contributions to the collection are very welcome. For this, please create a new branch, add your model and test your files with the provided functions, and start a pull request. We will then check your model and merge it into the collection. We are continuously working on the extension of the collection. ## Overview -| Model ID | Conditions | Estimated Parameters | Events | Measurements | Observables | Species | -|:---------------------------------------------------------------------------------------------|-------------:|-----------------------:|---------:|---------------:|--------------:|----------:| -| [Alkan_SciSignal2018](Benchmark-Models/Alkan_SciSignal2018/) | 73 | 56 | 0 | 1733 | 12 | 36 | -| [Bachmann_MSB2011](Benchmark-Models/Bachmann_MSB2011/) | 36 | 113 | 0 | 541 | 20 | 25 | -| [Beer_MolBioSystems2014](Benchmark-Models/Beer_MolBioSystems2014/) | 19 | 72 | 0 | 27132 | 2 | 4 | -| [Bertozzi_PNAS2020](Benchmark-Models/Bertozzi_PNAS2020/) | 2 | 3 | 0 | 138 | 1 | 3 | -| [Blasi_CellSystems2016](Benchmark-Models/Blasi_CellSystems2016/) | 1 | 9 | 0 | 252 | 15 | 16 | -| [Boehm_JProteomeRes2014](Benchmark-Models/Boehm_JProteomeRes2014/) | 1 | 9 | 0 | 48 | 3 | 8 | -| [Borghans_BiophysChem1997](Benchmark-Models/Borghans_BiophysChem1997/) | 1 | 23 | 0 | 111 | 1 | 3 | -| [Brannmark_JBC2010](Benchmark-Models/Brannmark_JBC2010/) | 8 | 22 | 0 | 43 | 3 | 9 | -| [Bruno_JExpBot2016](Benchmark-Models/Bruno_JExpBot2016/) | 6 | 13 | 0 | 77 | 5 | 7 | -| [Chen_MSB2009](Benchmark-Models/Chen_MSB2009/) | 4 | 155 | 0 | 120 | 3 | 500 | -| [Crauste_CellSystems2017](Benchmark-Models/Crauste_CellSystems2017/) | 1 | 12 | 0 | 21 | 4 | 5 | -| [Elowitz_Nature2000](Benchmark-Models/Elowitz_Nature2000/) | 1 | 21 | 0 | 58 | 1 | 8 | -| [Fiedler_BMC2016](Benchmark-Models/Fiedler_BMC2016/) | 3 | 22 | 0 | 72 | 2 | 6 | -| [Fujita_SciSignal2010](Benchmark-Models/Fujita_SciSignal2010/) | 6 | 19 | 0 | 144 | 3 | 9 | -| [Giordano_Nature2020](Benchmark-Models/Giordano_Nature2020/) | 1 | 50 | 0 | 313 | 7 | 13 | -| [Isensee_JCB2018](Benchmark-Models/Isensee_JCB2018/) | 123 | 46 | 0 | 687 | 3 | 25 | -| [Laske_PLOSComputBiol2019](Benchmark-Models/Laske_PLOSComputBiol2019/) | 3 | 13 | 0 | 42 | 13 | 41 | -| [Lucarelli_CellSystems2018](Benchmark-Models/Lucarelli_CellSystems2018/) | 16 | 84 | 0 | 1755 | 65 | 33 | -| [Okuonghae_ChaosSolitonsFractals2020](Benchmark-Models/Okuonghae_ChaosSolitonsFractals2020/) | 1 | 16 | 0 | 92 | 2 | 9 | -| [Oliveira_NatCommun2021](Benchmark-Models/Oliveira_NatCommun2021/) | 1 | 12 | 0 | 120 | 2 | 9 | -| [Perelson_Science1996](Benchmark-Models/Perelson_Science1996/) | 1 | 3 | 0 | 16 | 1 | 4 | -| [Rahman_MBS2016](Benchmark-Models/Rahman_MBS2016/) | 1 | 9 | 0 | 23 | 1 | 7 | -| [Raimundez_PCB2020](Benchmark-Models/Raimundez_PCB2020/) | 170 | 136 | 0 | 627 | 79 | 22 | -| [SalazarCavazos_MBoC2020](Benchmark-Models/SalazarCavazos_MBoC2020/) | 4 | 6 | 0 | 18 | 3 | 75 | -| [Schwen_PONE2014](Benchmark-Models/Schwen_PONE2014/) | 19 | 30 | 0 | 286 | 4 | 11 | -| [Sneyd_PNAS2002](Benchmark-Models/Sneyd_PNAS2002/) | 9 | 15 | 0 | 135 | 1 | 6 | -| [Weber_BMC2015](Benchmark-Models/Weber_BMC2015/) | 2 | 36 | 0 | 135 | 8 | 7 | -| [Zhao_QuantBiol2020](Benchmark-Models/Zhao_QuantBiol2020/) | 7 | 28 | 0 | 82 | 1 | 5 | -| [Zheng_PNAS2012](Benchmark-Models/Zheng_PNAS2012/) | 1 | 46 | 0 | 60 | 15 | 15 | + +| Model ID | Conditions | Estimated Parameters | Events | Measurements | Observables | Species | References | +|:---------------------------------------------------------------------------------------------|-------------:|-----------------------:|---------:|---------------:|--------------:|----------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Alkan_SciSignal2018](Benchmark-Models/Alkan_SciSignal2018/) | 73 | 56 | 0 | 1733 | 12 | 36 | [\[1\]](http://identifiers.org/doi/10.1126/scisignal.aat0229) | +| [Bachmann_MSB2011](Benchmark-Models/Bachmann_MSB2011/) | 36 | 113 | 0 | 541 | 20 | 25 | [\[1\]](http://identifiers.org/doi/10.1038/msb.2011.50) | +| [Beer_MolBioSystems2014](Benchmark-Models/Beer_MolBioSystems2014/) | 19 | 72 | 0 | 27132 | 2 | 4 | [\[1\]](http://identifiers.org/doi/10.1039/c3mb70594c) | +| [Bertozzi_PNAS2020](Benchmark-Models/Bertozzi_PNAS2020/) | 2 | 3 | 0 | 138 | 1 | 3 | [\[1\]](http://identifiers.org/pubmed/32616574) | +| [Blasi_CellSystems2016](Benchmark-Models/Blasi_CellSystems2016/) | 1 | 9 | 0 | 252 | 15 | 16 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2016.01.002) | +| [Boehm_JProteomeRes2014](Benchmark-Models/Boehm_JProteomeRes2014/) | 1 | 9 | 0 | 48 | 3 | 8 | [\[1\]](http://identifiers.org/doi/10.1021/pr5006923) | +| [Borghans_BiophysChem1997](Benchmark-Models/Borghans_BiophysChem1997/) | 1 | 23 | 0 | 111 | 1 | 3 | [\[1\]](http://identifiers.org/doi/10.1016/s0301-4622(97)00010-0) | +| [Brannmark_JBC2010](Benchmark-Models/Brannmark_JBC2010/) | 8 | 22 | 0 | 43 | 3 | 9 | [\[1\]](http://identifiers.org/doi/10.1074/jbc.M110.106849) | +| [Bruno_JExpBot2016](Benchmark-Models/Bruno_JExpBot2016/) | 6 | 13 | 0 | 77 | 5 | 7 | [\[1\]](http://identifiers.org/doi/10.1093/jxb/erw356) | +| [Chen_MSB2009](Benchmark-Models/Chen_MSB2009/) | 4 | 155 | 0 | 120 | 3 | 500 | [\[1\]](http://identifiers.org/doi/10.1038/msb.2008.74) | +| [Crauste_CellSystems2017](Benchmark-Models/Crauste_CellSystems2017/) | 1 | 12 | 0 | 21 | 4 | 5 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2017.01.014) | +| [Elowitz_Nature2000](Benchmark-Models/Elowitz_Nature2000/) | 1 | 21 | 0 | 58 | 1 | 8 | [\[1\]](http://identifiers.org/doi/10.1038/35002125) | +| [Fiedler_BMC2016](Benchmark-Models/Fiedler_BMC2016/) | 3 | 22 | 0 | 72 | 2 | 6 | [\[1\]](http://identifiers.org/doi/10.1186/s12918-016-0319-7) | +| [Fujita_SciSignal2010](Benchmark-Models/Fujita_SciSignal2010/) | 6 | 19 | 0 | 144 | 3 | 9 | | +| [Giordano_Nature2020](Benchmark-Models/Giordano_Nature2020/) | 1 | 50 | 0 | 313 | 7 | 13 | [\[1\]](http://identifiers.org/pubmed/32322102) | +| [Isensee_JCB2018](Benchmark-Models/Isensee_JCB2018/) | 123 | 46 | 0 | 687 | 3 | 25 | [\[1\]](http://identifiers.org/doi/10.1083/jcb.201708053) | +| [Laske_PLOSComputBiol2019](Benchmark-Models/Laske_PLOSComputBiol2019/) | 3 | 13 | 0 | 42 | 13 | 41 | [\[1\]](http://identifiers.org/biomodels.db/BIOMD0000000463) [\[2\]](http://identifiers.org/biomodels.db/MODEL1307270000) [\[3\]](http://identifiers.org/pubmed/22593159) | +| [Lucarelli_CellSystems2018](Benchmark-Models/Lucarelli_CellSystems2018/) | 16 | 84 | 0 | 1755 | 65 | 33 | [\[1\]](http://identifiers.org/doi/10.1016/j.cels.2017.11.010) | +| [Okuonghae_ChaosSolitonsFractals2020](Benchmark-Models/Okuonghae_ChaosSolitonsFractals2020/) | 1 | 16 | 0 | 92 | 2 | 9 | | +| [Oliveira_NatCommun2021](Benchmark-Models/Oliveira_NatCommun2021/) | 1 | 12 | 0 | 120 | 2 | 9 | | +| [Perelson_Science1996](Benchmark-Models/Perelson_Science1996/) | 1 | 3 | 0 | 16 | 1 | 4 | [\[1\]](http://identifiers.org/doi/10.1126/science.271.5255.1582) | +| [Rahman_MBS2016](Benchmark-Models/Rahman_MBS2016/) | 1 | 9 | 0 | 23 | 1 | 7 | | +| [Raimundez_PCB2020](Benchmark-Models/Raimundez_PCB2020/) | 170 | 136 | 0 | 627 | 79 | 22 | | +| [SalazarCavazos_MBoC2020](Benchmark-Models/SalazarCavazos_MBoC2020/) | 4 | 6 | 0 | 18 | 3 | 75 | | +| [Schwen_PONE2014](Benchmark-Models/Schwen_PONE2014/) | 19 | 30 | 0 | 286 | 4 | 11 | [\[1\]](http://identifiers.org/doi/10.1371/journal.pone.0133653) | +| [Sneyd_PNAS2002](Benchmark-Models/Sneyd_PNAS2002/) | 9 | 15 | 0 | 135 | 1 | 6 | [\[1\]](http://identifiers.org/doi/10.1073/pnas.032281999) | +| [Weber_BMC2015](Benchmark-Models/Weber_BMC2015/) | 2 | 36 | 0 | 135 | 8 | 7 | [\[1\]](http://identifiers.org/doi/10.1186/s12918-015-0147-1) | +| [Zhao_QuantBiol2020](Benchmark-Models/Zhao_QuantBiol2020/) | 7 | 28 | 0 | 82 | 1 | 5 | [\[1\]](http://identifiers.org/pubmed/32219006) | +| [Zheng_PNAS2012](Benchmark-Models/Zheng_PNAS2012/) | 1 | 46 | 0 | 60 | 15 | 15 | [\[1\]](http://identifiers.org/doi/10.1073/pnas.1201240109) | ## License From d807e934ee53892792eb946c9fb2acb2a269c1b6 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Feb 2022 12:21:39 +0100 Subject: [PATCH 2/3] Update Benchmark-Models/model_info.py Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- Benchmark-Models/model_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Benchmark-Models/model_info.py b/Benchmark-Models/model_info.py index 93b3e3c..3053276 100755 --- a/Benchmark-Models/model_info.py +++ b/Benchmark-Models/model_info.py @@ -49,7 +49,7 @@ def get_problem_info( def get_described_by(sbml_model: libsbml.Model) -> List[str]: - """Get publication URIs from SBML is-described-by annotatation""" + """Get publication URIs from SBML is-described-by annotation""" cv_terms = sbml_model.getCVTerms() reference_uris = [] for anno in cv_terms: From 4959adbb627f85708090478899212f056e450483 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 7 Feb 2022 12:23:44 +0100 Subject: [PATCH 3/3] review comments --- Benchmark-Models/model_info.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Benchmark-Models/model_info.py b/Benchmark-Models/model_info.py index 3053276..be91418 100755 --- a/Benchmark-Models/model_info.py +++ b/Benchmark-Models/model_info.py @@ -17,7 +17,7 @@ 'name': 'Model ID', 'observables': 'Observables', 'species': 'Species', - 'described_by': 'References', + 'reference_uris': 'References', } index_column = 'name' @@ -43,12 +43,12 @@ def get_problem_info( len(problem.measurement_df[petab.OBSERVABLE_ID].unique()), 'species': len(problem.sbml_model.getListOfSpecies()), - 'described_by': - get_described_by(problem.sbml_model), + 'reference_uris': + get_reference_uris(problem.sbml_model), } -def get_described_by(sbml_model: libsbml.Model) -> List[str]: +def get_reference_uris(sbml_model: libsbml.Model) -> List[str]: """Get publication URIs from SBML is-described-by annotation""" cv_terms = sbml_model.getCVTerms() reference_uris = [] @@ -80,7 +80,7 @@ def get_overview_table(path: str = None) -> pd.DataFrame: def main( - markdown: bool = False, + markdown: bool = False, ): df = get_overview_table() @@ -91,9 +91,9 @@ def main( df.rename(index=lambda x: f"[{x}](Benchmark-Models/{x}/)", inplace=True) # references to markdown links - df['described_by'] = df['described_by'].apply( + df['reference_uris'] = df['reference_uris'].apply( lambda x: " ".join([f"[\\[{i + 1}\\]]({uri})" - for i, uri in enumerate(x)]) + for i, uri in enumerate(x)]) ) df.index.rename(markdown_columns[index_column], inplace=True) df.rename(columns=markdown_columns, inplace=True) @@ -104,6 +104,7 @@ def main( if __name__ == '__main__': import sys + markdown = False if '--markdown' in sys.argv: markdown = True