Momapy maps to KB
Project description
momapy_kb
A library to integrate momapy maps into graph databases and logic programming backends.
Features
- Multiple LPG backends -- Neo4j, FalkorDB, FalkorDBLite (embedded), via fieldz_kb
- Clingo/ASP backend -- convert maps to logic programming facts
- File-based loading -- save maps directly from CellDesigner, SBGN, and SBML files
- Collection management -- organize maps into named collections
- Custom type plugins -- handles momapy-specific types (LayoutModelMapping, NoneValue, FrozenSurjectionDict)
- Layout element queries -- query model elements and retrieve corresponding layout elements for rendering
Installation
pip install momapy-kb[neo4j] # Neo4j support
pip install momapy-kb[falkordb] # FalkorDB support
pip install momapy-kb[falkordblite] # FalkorDBLite (embedded) support
pip install momapy-kb[clingo] # Clingo/ASP support
pip install momapy-kb[all] # Everything
Quick example
import momapy_kb.lpg.session
import momapy_kb.lpg.backends.neo4j
backend = momapy_kb.lpg.backends.neo4j.Neo4jBackend(
hostname="localhost",
username="neo4j",
password="password",
)
with momapy_kb.lpg.session.Session(backend) as session:
# Save a map from a CellDesigner file
session.save_from_file("model.xml", integration_mode="hash")
# Query model elements
results = session.execute_query_as_objects(
"MATCH (n:Macromolecule) RETURN n"
)
# Get layout elements for rendering
layout_results = session.cypher_query_as_layout_elements(
"MATCH (n:GenericProcess) RETURN n"
)
Documentation
Full documentation is available at https://adrienrougny.github.io/momapy_kb/.
License
MIT. See LICENSE for 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 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 momapy_kb-0.2.2.tar.gz.
File metadata
- Download URL: momapy_kb-0.2.2.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebd35f5c6119a133f4f061e7592d91a73ba6830e66f4efa8661911a31b74970e
|
|
| MD5 |
da0bfbce9e611c2535da81ee426bba9c
|
|
| BLAKE2b-256 |
9f791b480938af4284da43d5b6239d2b6c5d4ecaffc51318284bd4959822a78a
|
Provenance
The following attestation bundles were made for momapy_kb-0.2.2.tar.gz:
Publisher:
release.yml on adrienrougny/momapy_kb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
momapy_kb-0.2.2.tar.gz -
Subject digest:
ebd35f5c6119a133f4f061e7592d91a73ba6830e66f4efa8661911a31b74970e - Sigstore transparency entry: 1317339158
- Sigstore integration time:
-
Permalink:
adrienrougny/momapy_kb@c1314c0a144b38c9c7b17f1d413a238050684d75 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/adrienrougny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c1314c0a144b38c9c7b17f1d413a238050684d75 -
Trigger Event:
push
-
Statement type:
File details
Details for the file momapy_kb-0.2.2-py3-none-any.whl.
File metadata
- Download URL: momapy_kb-0.2.2-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4907c6d7631bc19a177970ccd4237fabada6dd4e92d0e052912f319ee4db32e2
|
|
| MD5 |
8fe962b142808f11d1bb479db8eadf76
|
|
| BLAKE2b-256 |
d27bef94885ca8c0fd52dd80aa29eb811d63dc1e549d83c5bed084b6c8306a0d
|
Provenance
The following attestation bundles were made for momapy_kb-0.2.2-py3-none-any.whl:
Publisher:
release.yml on adrienrougny/momapy_kb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
momapy_kb-0.2.2-py3-none-any.whl -
Subject digest:
4907c6d7631bc19a177970ccd4237fabada6dd4e92d0e052912f319ee4db32e2 - Sigstore transparency entry: 1317339172
- Sigstore integration time:
-
Permalink:
adrienrougny/momapy_kb@c1314c0a144b38c9c7b17f1d413a238050684d75 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/adrienrougny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c1314c0a144b38c9c7b17f1d413a238050684d75 -
Trigger Event:
push
-
Statement type: