A parser for SBML
Project description
rust_sbml
Parser for the Systems Biology Markup Language (SBML):
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
For example,
use rust_sbml::Model;
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 = Model::parse(example);
println!("{:?}", result.unwrap());
See write_to_file.rs for an example on serializing to a file.
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())
Milestones
-
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.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
README.md is automatically generated on CI using cargo-readme. Please, modify README.tpl or lib.rs instead (check the github worflow for more details).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for rust_sbml-0.5.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63b5c45cdf7bd917cbdd60acb1fad308d592cfaef2e77a7c4eb5fea07dafabf0 |
|
MD5 | c0f03de1a8d83c5ef414124e502289e7 |
|
BLAKE2b-256 | 79ca4a1ed879e112dcf944d1db17a63a32f9bc9b78b7e83bbeaacc45c8573084 |
Hashes for rust_sbml-0.5.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d8ed084d253c180ecdffc97719a84c1c93ed4b82b694716cd897327bbf47d1 |
|
MD5 | 390b0e569d47a2bb05f77804da0715ec |
|
BLAKE2b-256 | 85427eb974a3deb5c02fd0a279bdffb66e0e52e0dfccc84eddacb19d25ef64b3 |