sbmlxdf


Namesbmlxdf JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://gitlab.cs.uni-duesseldorf.de/schubert/sbmlxdf
Summaryconvert between SBML and tabular structures
upload_time2024-01-22 15:18:12
maintainer
docs_urlNone
authorPeter Schubert
requires_python>=3.9
licenseGPLv3
keywords modeling standardization sbml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## sbmlxdf - convert between SBML and tabular structures

**sbmlxdf** is lightweight and transparent converter from
SBML to pandas Dataframes (sbml2df) and
from pandas Dataframes to SBML (df2sbml).

sbmlxdf supports, with few exceptions, all functionality of **SBML L3V2
core** package [1] and extension packages **Flux Balance Constraints
(fbc)** [2], **Groups (groups)** [3] and **Distributions
(distrib)** [4].

using **libSBML API** for accessing SBML [5].

Note: **python-libsbml-experimental** Python package is required only,
when using features of SBML extension package `distrib`. 
**python-libsbml** Python package can be used in all other cases.
**python-libsbml** and **python-libsbml-experimental** both share the 
same top level identifier **libsbml** (`import libsbml`). Conflicts can be resolved by
pip uninstalling both packages and subsequntly installing the 
favoured package: e.g.

    $ pip3 uninstall python-libsbml-experimental
    $ pip3 uninstall python-libsbml
    $ pip3 install python-libsbml-experimental

## Benefits

### kinetic modelers with and without programming skills
- overcome hesitation of creating own models in SBML
- have a tool for flexible kinetic modelling using spreadsheets
- inspect SBML models
- create/extend SBML models
- use latest SBML features
- generate ‘correct’ SBML models

### Python programmers
- get access to SBML model data via pandas DataFrames,
  e.g. for use in their optimizers
- can evaluate different model design strategies

## Features
- support of SBML L3V2 core [1], including:

  - model history, miriam-annotations, xml-annotations
  - units of measurement
  - local/global parameters
  - function definitions
  - Flux Balance Constraints package [2]
  - Groups package [3]
  - Distributions package [4]

 **sbmxdf** does not intent to support SBML packages related to graphical
 representations of network models. I.e. packages **Layout** and
 **Rendering** are not supported. Other released SBML packages as of July
 2021, see [package status](http://sbml.org/Documents/Specifications)
 i.e. **Hierarchical Model Composition**,
 **Multistate and Multicomponent Species** and **Qualitative Models** are
 not supported at the moment, but might be included in future versions.

## Small Python examples

(Note: Users without programming experience may use a command line interface
to convert between SBML format and spreadsheet format)

   1. Convert SBML model to spreadsheet
   2. Check SBML compliance of spreadsheet model and convert to SBML
   3. Access SBML model data

```python
>>> import sbmlxdf
>>>
>>> model = sbmlxdf.Model('BIOMD0000000010_url.xml')
>>> model.to_excel('BIOMD0000000010_ulr.xlsx')
```

```python
>>> import sbmlxdf
>>>
>>> upd_model = sbmlxdf.Model('BIO10_upd.xlsx')
>>> print('SBML validation result:', upd_model.validate_sbml('tmp.xml'))
>>> upd_model.export_sbml('BIO10_upd.xml')
```

```python
>>> import sbmlxdf
>>>
>>> model = sbmlxdf.Model('BIO10_upd.xml')
>>> model_df = model.to_df()
>>> print(model_df.keys())
>>>
>>> df_r = model_df['reactions']
>>>
>>> print(len(df_r), 'reactions found, first reaction:' )
>>> print(df_r.iloc[0])
>>>
>>> for id, reaction in df_r.iterrows():
>>>   print('reaction:', id)
>>>   for record in sbmlxdf.extract_records(reaction['reactants']):
>>>      print('  reactant: ', sbmlxdf.extract_params(record))
>>>   for record in sbmlxdf.extract_records(reaction['products']):
>>>      print('  product:  ', sbmlxdf.extract_params(record))
```

## Documentation

Introductory tutorials, how-to's and other useful documentation are available
on [Read the Docs](https://sbmlxdf.readthedocs.io/en/latest/index.html)

## Installing

**sbmlxdf** is available on PyPI:

```console
$ python -m pip install sbmlxdf
```

## License

[GPLv3](LICENSE.txt)


Peter Schubert, October 2020

### References

[1]: The Systems Biology Markup Language (SBML): Language Specification for
Level 3 Version 2 Core (Release 2) Authors: Michael Hucka, Frank T. Bergmann,
Claudine Chaouiya, Andreas Dräger, Stefan Hoops, Sarah M. Keating, Matthias
König, Nicolas Le Novère, Chris J. Myers, Brett G. Olivier, Sven Sahle,
James C. Schaff, Rahuman Sheriff, Lucian P. Smith, Dagmar Waltemath,
Darren J. Wilkinson, and Fengkai Zhang

[2]: Olivier, B. G., & Bergmann, F. T. (2018). SBML Level 3 Package:
Flux Balance Constraints version 2. Journal of Integrative Bioinformatics,
15(1), 20170082.

[3]: Hucka, M., & Smith, L. P. (2016). SBML Level 3 package: Groups,
Version 1 Release 1. Journal of Integrative Bioinformatics, 13(3), 290.

[4]: Smith, L. P., Moodie, S. L., Bergmann, F. T., Gillespie, C., Keating,
S. M., König, M., Myers, C. J., Swat, M. J., Wilkinson, D.J.,
and Hucka, M. (2020). The Distributions Package for SBML Level 3.
Retrieved from from COMBINE, https://identifiers.org/combine.specifications/
sbml.level-3.version-1.distrib.version-1.release-1

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.cs.uni-duesseldorf.de/schubert/sbmlxdf",
    "name": "sbmlxdf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "modeling,standardization,SBML",
    "author": "Peter Schubert",
    "author_email": "peter.schubert@hhu.de",
    "download_url": "https://files.pythonhosted.org/packages/b1/73/95d880fd42368aba17a530af98b9f2a62515eff1faeab53be565469261e1/sbmlxdf-1.0.0.tar.gz",
    "platform": null,
    "description": "## sbmlxdf - convert between SBML and tabular structures\n\n**sbmlxdf** is lightweight and transparent converter from\nSBML to pandas Dataframes (sbml2df) and\nfrom pandas Dataframes to SBML (df2sbml).\n\nsbmlxdf supports, with few exceptions, all functionality of **SBML L3V2\ncore** package [1] and extension packages **Flux Balance Constraints\n(fbc)** [2], **Groups (groups)** [3] and **Distributions\n(distrib)** [4].\n\nusing **libSBML API** for accessing SBML [5].\n\nNote: **python-libsbml-experimental** Python package is required only,\nwhen using features of SBML extension package `distrib`. \n**python-libsbml** Python package can be used in all other cases.\n**python-libsbml** and **python-libsbml-experimental** both share the \nsame top level identifier **libsbml** (`import libsbml`). Conflicts can be resolved by\npip uninstalling both packages and subsequntly installing the \nfavoured package: e.g.\n\n    $ pip3 uninstall python-libsbml-experimental\n    $ pip3 uninstall python-libsbml\n    $ pip3 install python-libsbml-experimental\n\n## Benefits\n\n### kinetic modelers with and without programming skills\n- overcome hesitation of creating own models in SBML\n- have a tool for flexible kinetic modelling using spreadsheets\n- inspect SBML models\n- create/extend SBML models\n- use latest SBML features\n- generate \u2018correct\u2019 SBML models\n\n### Python programmers\n- get access to SBML model data via pandas DataFrames,\n  e.g. for use in their optimizers\n- can evaluate different model design strategies\n\n## Features\n- support of SBML L3V2 core [1], including:\n\n  - model history, miriam-annotations, xml-annotations\n  - units of measurement\n  - local/global parameters\n  - function definitions\n  - Flux Balance Constraints package [2]\n  - Groups package [3]\n  - Distributions package [4]\n\n **sbmxdf** does not intent to support SBML packages related to graphical\n representations of network models. I.e. packages **Layout** and\n **Rendering** are not supported. Other released SBML packages as of July\n 2021, see [package status](http://sbml.org/Documents/Specifications)\n i.e. **Hierarchical Model Composition**,\n **Multistate and Multicomponent Species** and **Qualitative Models** are\n not supported at the moment, but might be included in future versions.\n\n## Small Python examples\n\n(Note: Users without programming experience may use a command line interface\nto convert between SBML format and spreadsheet format)\n\n   1. Convert SBML model to spreadsheet\n   2. Check SBML compliance of spreadsheet model and convert to SBML\n   3. Access SBML model data\n\n```python\n>>> import sbmlxdf\n>>>\n>>> model = sbmlxdf.Model('BIOMD0000000010_url.xml')\n>>> model.to_excel('BIOMD0000000010_ulr.xlsx')\n```\n\n```python\n>>> import sbmlxdf\n>>>\n>>> upd_model = sbmlxdf.Model('BIO10_upd.xlsx')\n>>> print('SBML validation result:', upd_model.validate_sbml('tmp.xml'))\n>>> upd_model.export_sbml('BIO10_upd.xml')\n```\n\n```python\n>>> import sbmlxdf\n>>>\n>>> model = sbmlxdf.Model('BIO10_upd.xml')\n>>> model_df = model.to_df()\n>>> print(model_df.keys())\n>>>\n>>> df_r = model_df['reactions']\n>>>\n>>> print(len(df_r), 'reactions found, first reaction:' )\n>>> print(df_r.iloc[0])\n>>>\n>>> for id, reaction in df_r.iterrows():\n>>>   print('reaction:', id)\n>>>   for record in sbmlxdf.extract_records(reaction['reactants']):\n>>>      print('  reactant: ', sbmlxdf.extract_params(record))\n>>>   for record in sbmlxdf.extract_records(reaction['products']):\n>>>      print('  product:  ', sbmlxdf.extract_params(record))\n```\n\n## Documentation\n\nIntroductory tutorials, how-to's and other useful documentation are available\non [Read the Docs](https://sbmlxdf.readthedocs.io/en/latest/index.html)\n\n## Installing\n\n**sbmlxdf** is available on PyPI:\n\n```console\n$ python -m pip install sbmlxdf\n```\n\n## License\n\n[GPLv3](LICENSE.txt)\n\n\nPeter Schubert, October 2020\n\n### References\n\n[1]: The Systems Biology Markup Language (SBML): Language Specification for\nLevel 3 Version 2 Core (Release 2) Authors: Michael Hucka, Frank T. Bergmann,\nClaudine Chaouiya, Andreas Dr\u00e4ger, Stefan Hoops, Sarah M. Keating, Matthias\nK\u00f6nig, Nicolas Le Nov\u00e8re, Chris J. Myers, Brett G. Olivier, Sven Sahle,\nJames C. Schaff, Rahuman Sheriff, Lucian P. Smith, Dagmar Waltemath,\nDarren J. Wilkinson, and Fengkai Zhang\n\n[2]: Olivier, B. G., & Bergmann, F. T. (2018). SBML Level 3 Package:\nFlux Balance Constraints version 2. Journal of Integrative Bioinformatics,\n15(1), 20170082.\n\n[3]: Hucka, M., & Smith, L. P. (2016). SBML Level 3 package: Groups,\nVersion 1 Release 1. Journal of Integrative Bioinformatics, 13(3), 290.\n\n[4]: Smith, L. P., Moodie, S. L., Bergmann, F. T., Gillespie, C., Keating,\nS. M., K\u00f6nig, M., Myers, C. J., Swat, M. J., Wilkinson, D.J.,\nand Hucka, M. (2020). The Distributions Package for SBML Level 3.\nRetrieved from from COMBINE, https://identifiers.org/combine.specifications/\nsbml.level-3.version-1.distrib.version-1.release-1\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "convert between SBML and tabular structures",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://gitlab.cs.uni-duesseldorf.de/schubert/sbmlxdf/-/issues",
        "Documentation": "https://sbmlxdf.readthedocs.io",
        "Homepage": "https://gitlab.cs.uni-duesseldorf.de/schubert/sbmlxdf",
        "Source Code": "https://gitlab.cs.uni-duesseldorf.de/schubert/sbmlxdf"
    },
    "split_keywords": [
        "modeling",
        "standardization",
        "sbml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "841e6c60c9be1f587cba4a7be4082adf838dad50d00573fc8c5d0269770e9612",
                "md5": "aa30b6b5a007bd88fb35c55677e8d951",
                "sha256": "60a263d5e3aa2f13a5ebc13bc00d4a54f8df9367e5eb5ddd716186a22f958e37"
            },
            "downloads": -1,
            "filename": "sbmlxdf-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa30b6b5a007bd88fb35c55677e8d951",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 50852,
            "upload_time": "2024-01-22T15:18:10",
            "upload_time_iso_8601": "2024-01-22T15:18:10.995442Z",
            "url": "https://files.pythonhosted.org/packages/84/1e/6c60c9be1f587cba4a7be4082adf838dad50d00573fc8c5d0269770e9612/sbmlxdf-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b17395d880fd42368aba17a530af98b9f2a62515eff1faeab53be565469261e1",
                "md5": "2a9f0b2f158099e84448a6e0eab5360c",
                "sha256": "8c203d59c5d52d7e97f8ebcda5cb5b6ccf7c06eeaf6a130a93b8310aef3c1d1b"
            },
            "downloads": -1,
            "filename": "sbmlxdf-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2a9f0b2f158099e84448a6e0eab5360c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 46407,
            "upload_time": "2024-01-22T15:18:12",
            "upload_time_iso_8601": "2024-01-22T15:18:12.543803Z",
            "url": "https://files.pythonhosted.org/packages/b1/73/95d880fd42368aba17a530af98b9f2a62515eff1faeab53be565469261e1/sbmlxdf-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-22 15:18:12",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sbmlxdf"
}
        
Elapsed time: 0.20018s