Skip to main content

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


Download files

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

Source Distribution

momapy_kb-0.2.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

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

momapy_kb-0.2.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file momapy_kb-0.2.0.tar.gz.

File metadata

  • Download URL: momapy_kb-0.2.0.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

Hashes for momapy_kb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ef610dde2ef0cfaee39bb96640540eafb86b5affb85d79e66642615c0aa74eb1
MD5 da8354b2862548d4ab8bd9685f19eb63
BLAKE2b-256 b4620ce75c2ec84aeec46eb7bfc53a739f81d165815d976e4792edeb2d9786ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for momapy_kb-0.2.0.tar.gz:

Publisher: release.yml on adrienrougny/momapy_kb

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

File details

Details for the file momapy_kb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: momapy_kb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momapy_kb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51e0cda4459f999ef6f964ffa9216e83645b8fa34db922e57b0195afcfdd25ae
MD5 d933270acb9368db9a77cf9a729cb2ba
BLAKE2b-256 c941ce67600eb779ca82876d25b50ee5ac026a298a0e8aa5952201c1580c0378

See more details on using hashes here.

Provenance

The following attestation bundles were made for momapy_kb-0.2.0-py3-none-any.whl:

Publisher: release.yml on adrienrougny/momapy_kb

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

Supported by

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