libsbgnpy are python utilities for working with SBGN.
Project description
libsbgnpy: Python library for SBGN
Python library to work with the Systems Biology Graphical Notation (SBGN). This library is based on the SBGN XML schema and supports reading, writing and validation of SBGN files.
The initial library was generated using xsdata. Additional utility functions for reading, writing, and rendering SBGN documents are provided.
Documentation with examples is available at https://matthiaskoenig.github.io/libsbgnpy/.
map = Map(
id="ethanol_example",
language=MapLanguage.PROCESS_DESCRIPTION,
bbox=Bbox(x=0, y=0, w=363, h=253),
)
# add map to new sbgn
sbgn = Sbgn(map=[map])
# create glyphs and add to map
map.glyph.extend(
[
Glyph(
class_value=GlyphClass.SIMPLE_CHEMICAL,
id="ethanol",
label=Label(text="Ethanol"),
bbox=Bbox(x=40, y=120, w=60, h=60),
),
Glyph(
class_value=GlyphClass.SIMPLE_CHEMICAL,
id="ethanal",
label=Label(text="Ethanal"),
bbox=Bbox(x=220, y=110, w=60, h=60),
),
Glyph(
class_value=GlyphClass.MACROMOLECULE,
id="adh1",
label=Label(text="ADH1"),
bbox=Bbox(x=106, y=20, w=108, h=60),
),
...
# glyph with ports (process)
Glyph(
class_value=GlyphClass.PROCESS,
id="pn1",
orientation=GlyphOrientation.HORIZONTAL,
bbox=Bbox(x=148, y=168, w=24, h=24),
port=[
Port(x=136, y=180, id="pn1.1"),
Port(x=184, y=180, id="pn1.2"),
],
),
]
)
write_sbgn_to_file(sbgn, f"{prefix}_glyphs.sbgn")
render_sbgn(sbgn, f"{prefix}_glyphs.png")
How to cite
Installation
libsbgnpy is available from pypi
pip install libsbgnpy
License
- Source Code: MIT
- Documentation: CC BY-SA 4.0
Funding
Matthias König (MK) was supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (LiSyM, grant number 031L0054). MK is supported by the Federal Ministry of Education and Research (BMBF, Germany) within ATLAS by grant number 031L0304B and by the German Research Foundation (DFG) within the Research Unit Program FOR 5151 QuaLiPerF (Quantifying Liver Perfusion-Function Relationship in Complex Resection - A Systems Medicine Approach) by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).
© 2016-2026 Matthias König
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libsbgnpy-0.5.2.tar.gz.
File metadata
- Download URL: libsbgnpy-0.5.2.tar.gz
- Upload date:
- Size: 14.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1087cd2cad1580b2dc3e0727f27f199add7bf828482e4cafd9ac800624c7d820
|
|
| MD5 |
69dc50ba1b9f38caaf225fd13ca4aa20
|
|
| BLAKE2b-256 |
fa00c8edc8b94913bc970c2e6a0e41e5dd9d6c468e72609248c82e5ea31932bb
|
Provenance
The following attestation bundles were made for libsbgnpy-0.5.2.tar.gz:
Publisher:
main.yml on matthiaskoenig/libsbgnpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libsbgnpy-0.5.2.tar.gz -
Subject digest:
1087cd2cad1580b2dc3e0727f27f199add7bf828482e4cafd9ac800624c7d820 - Sigstore transparency entry: 901358715
- Sigstore integration time:
-
Permalink:
matthiaskoenig/libsbgnpy@1e646af8dc76481d6defd7e08cfd59b541b11a1c -
Branch / Tag:
refs/tags/0.5.2 - Owner: https://github.com/matthiaskoenig
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@1e646af8dc76481d6defd7e08cfd59b541b11a1c -
Trigger Event:
push
-
Statement type:
File details
Details for the file libsbgnpy-0.5.2-py3-none-any.whl.
File metadata
- Download URL: libsbgnpy-0.5.2-py3-none-any.whl
- Upload date:
- Size: 104.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ed0b115a9d0a782413362bf21fcc2b58b73da1bac02d1bf0cdcd25992c8b864
|
|
| MD5 |
ede7d4193407672d85a1b6578da68906
|
|
| BLAKE2b-256 |
5fdec0faadb92a053d968afcb6ecb6e7475998b5a417120c9130fa3e1dadab29
|
Provenance
The following attestation bundles were made for libsbgnpy-0.5.2-py3-none-any.whl:
Publisher:
main.yml on matthiaskoenig/libsbgnpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libsbgnpy-0.5.2-py3-none-any.whl -
Subject digest:
8ed0b115a9d0a782413362bf21fcc2b58b73da1bac02d1bf0cdcd25992c8b864 - Sigstore transparency entry: 901358817
- Sigstore integration time:
-
Permalink:
matthiaskoenig/libsbgnpy@1e646af8dc76481d6defd7e08cfd59b541b11a1c -
Branch / Tag:
refs/tags/0.5.2 - Owner: https://github.com/matthiaskoenig
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@1e646af8dc76481d6defd7e08cfd59b541b11a1c -
Trigger Event:
push
-
Statement type: