rust_sbml 0.4.0

A parser for SBML
Documentation

Crates.io pypi Documentation Build Codecov

A parser for SBML

This is a parser for the Systems Biology Markup Language (SBML):

Example

let example=r#"<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version2/core" level="3" version="2">
    <model timeUnits="second" extentUnits="mole" substanceUnits="mole">
    </model>
</sbml>"#;
let result = parse_document(example);

Getting started

Rust

Add it to your Cargo.toml with no default features to avoid all PyO3 nuisances.

[dependencies.rust_sbml]
version = "0.3.0"
default_features=false

Python

It has only been tested on Linux.

Using pip

pip install rust_sbml

From source

Clone the repository.

git clone https://github.com/carrascomj/rust_sbml.git

You need maturin for building it.

python -m pip install maturin
  • Build locally
    maturin build --release
    pip install .
    
  • Build on virtualenv (no pip install required)
    # --release can be omitted to speed up compilation time
    maturin develop --release
    

Having it installed, you can use it as a normal Python package.

from rust_sbml import Model

sbml = Model("examples/EcoliCore.xml")
reaction = sbml.getListOfReactions()[0]
print(reaction.getListOfReactants())

Milestone

  • getListOfSpecies() (id, name)
  • getListOfCompartments() (id, name)
  • getListOfReactions() (id, name)
    • .getListOfReactants() (id, name)
    • .getListOfProducts() (id, name)
  • Capable of retrieving FBC bounds.
  • Published to pypi
  • Kinetic Laws.
  • Metadata.
  • Test suite with python calls.
  • Test suite with libsbml comparison trough cobrapy.