create_model
Build one SBML model from SPARCED input tables. Optionally split it afterwards into stochastic and deterministic SBML files.
Requires Python 3.11 or later.
Install
pip install create_model
From a clone of this repository:
pip install -e ".[dev]"
After either install, the create_model command is available on your PATH. If your environment does not put Scripts on PATH, python -m create_model is equivalent.
Build
create_model --config tests/data/config.yaml
Writes SPARCED_I.xml (One4All) to tests/data/output/ by default.
Partition
After a successful build:
create_model --config tests/data/config.yaml --partition-sbml
Writes:
stochastic-gene-expression.xmldeterministic-interactions.xml
Reactions are split by the species table solver column: any reaction with a Stochastic species as a reactant or product goes to the stochastic model; modifier-only links do not. The rest go to the deterministic model (disjoint). Each partition is then reduced to the species and parameters that participate in its reactions. Species that appear in no reaction are still kept, assigned by their solver label (stochastic-labeled unused species go to the stochastic model; remaining unused species go deterministic), so the union of partition species covers the One4All model. Model @id attributes are sanitized to valid SBML SIds (hyphens → underscores); output filenames keep the configured names.
Verifies reaction/species/global coverage against the One4All model by default (--no-verify to skip).
Useful flags
| Flag | Meaning |
|---|---|
-c, --config PATH |
YAML configuration file (required) |
-o DIR |
Override output directory |
--sbml PATH |
One4All SBML to partition (default: <output>/<model>.xml) |
--no-verify |
Skip checks after --partition-sbml |
-v |
Debug logging |
Config
tests/data/config.yaml is an example. Paths are relative to the config file unless absolute.
name: "SPARCED-I"
version: "1.4"
description: "Configuration for loading model input tables and writing SBML"
compilation:
directory: "."
files:
compartments: "SPARCED-Compartments.tsv"
ratelaws: "SPARCED-Ratelaws.tsv"
species: "SPARCED-Species.tsv"
parameters: "SPARCED-Parameters.tsv"
annotations: "SPARCED-Annotations.tsv"
output:
directory: "output"
keep_antimony: true
partition:
stochastic_model_id: "stochastic-gene-expression"
deterministic_model_id: "deterministic-interactions"
compilation.files lists the TSV tables, output controls where the One4All SBML (and optional Antimony) is written, and partition sets the split model IDs.
Releasing
Publishing runs on GitHub Release publish (publish.yml). It builds an sdist and wheel and uploads them to PyPI with trusted publishing. Before the first release, create a pypi GitHub Environment and register this repository as a trusted publisher on PyPI for the create_model project.
Metadata
Release files for create-model 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| create_model-0.1.1.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| create_model-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.4 kB
Release files / create_model-0.1.1.tar.gz
| Download URL | create_model-0.1.1.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f00a6455df069e905f594484af54dc5a0ebd66b73c96c3a8d5cf62dad82acd93
|
|
BLAKE2b-256 checksum How to use checksums |
25a063c736611a412b2b35297efd1b66aa40b4cff3985904aaa924831fe077de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logRelease files / create_model-0.1.1-py3-none-any.whl
| Download URL | create_model-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d729216856b6c8b6d1e61b2c28d1e3e4630dbbf038c15a8208c75ea038cc37a
|
|
BLAKE2b-256 checksum How to use checksums |
10fbfdb5dd4e136cf56cbf02637a48eafbbb05ff4a5417fa5075a4b012fbd23f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency log