Skip to main content

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.xml
  • deterministic-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. 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

create_model-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

create_model-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file create_model-0.1.0.tar.gz.

File metadata

  • Download URL: create_model-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for create_model-0.1.0.tar.gz
Algorithm Hash digest
SHA256 49c793a47b5ef7d5b72efc133a8a7f57d5f06c57f4c4921c886dc2d20b48d65c
MD5 c66989a5e1f4ee600b33a48245c03ace
BLAKE2b-256 64160e278614fd17189802fb5bcf64848171f4873ab92094fdd7f492101d91b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for create_model-0.1.0.tar.gz:

Publisher: publish.yml on JonahRileyHuggins/CreateModel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file create_model-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: create_model-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for create_model-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d21bd2ed8d075e941f9b1e03717f6adc96d87e4a347e6e7374ff478c1fb8767d
MD5 e310744063ed2afaffcd7f7c2c172f6e
BLAKE2b-256 2e2db15cd93f5891f690f45e5b9e574abdd45dcfc86b8a640192f2300365c028

See more details on using hashes here.

Provenance

The following attestation bundles were made for create_model-0.1.0-py3-none-any.whl:

Publisher: publish.yml on JonahRileyHuggins/CreateModel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page