Package: sbmlxdf
sbmlxdf - convert between SBML and tabular structuressbmlxdfis lightweight and transparent converter from
SBML to pandas Dataframes (sbml2df) and
from pandas Dataframes to SBML (df2sbml).sbmlxdf supports, with few exceptions, all functionality ofSBML L3V2
corepackage [1] and extension packagesFlux Balance Constraints
(fbc)[2],Groups (groups)[3] andDistributions
(distrib)[4].usinglibSBML APIfor accessing SBML [5].Note:python-libsbml-experimentalPython package is required only,
when using features of SBML extension packagedistrib.python-libsbmlPython package can be used in all other cases.python-libsbmlandpython-libsbml-experimentalboth share the
same top level identifierlibsbml(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-experimentalBenefitskinetic modelers with and without programming skillsovercome hesitation of creating own models in SBMLhave a tool for flexible kinetic modelling using spreadsheetsinspect SBML modelscreate/extend SBML modelsuse latest SBML featuresgenerate ‘correct’ SBML modelsPython programmersget access to SBML model data via pandas DataFrames,
e.g. for use in their optimizerscan evaluate different model design strategiesFeaturessupport of SBML L3V2 core [1], including:model history, miriam-annotations, xml-annotationsunits of measurementlocal/global parametersfunction definitionsFlux Balance Constraints package [2]Groups package [3]Distributions package [4]sbmxdfdoes not intent to support SBML packages related to graphical
representations of network models. I.e. packagesLayoutandRenderingare not supported. Other released SBML packages as of July
2021, seepackage statusi.e.Hierarchical Model Composition,Multistate and Multicomponent SpeciesandQualitative Modelsare
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)Convert SBML model to spreadsheetCheck SBML compliance of spreadsheet model and convert to SBMLAccess SBML model data>>>importsbmlxdf>>>>>>model=sbmlxdf.Model('BIOMD0000000010_url.xml')>>>model.to_excel('BIOMD0000000010_ulr.xlsx')>>>importsbmlxdf>>>>>>upd_model=sbmlxdf.Model('BIO10_upd.xlsx')>>>print('SBML validation result:',upd_model.validate_sbml('tmp.xml'))>>>upd_model.export_sbml('BIO10_upd.xml')>>>importsbmlxdf>>>>>>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])>>>>>>forid,reactionindf_r.iterrows():>>>print('reaction:',id)>>>forrecordinsbmlxdf.extract_records(reaction['reactants']):>>>print('  reactant: ',sbmlxdf.extract_params(record))>>>forrecordinsbmlxdf.extract_records(reaction['products']):>>>print('  product:  ',sbmlxdf.extract_params(record))DocumentationIntroductory tutorials, how-to's and other useful documentation are available
onRead the DocsInstallingsbmlxdfis available on PyPI:$python-mpipinstallsbmlxdfLicenseGPLv3Peter Schubert, October 2020References[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