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.1.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.1-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: momapy_kb-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ef8405c24e5c9e76a775198deff50c2d58a481ced2057a76077e044bc2c129f8
MD5 5661c37636a109220b07f0c5fb8081a3
BLAKE2b-256 c2e2b0c243f27a2991194903e1d5870556fb1ab88ec72e79af7633855c03a8b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for momapy_kb-0.2.1.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.1-py3-none-any.whl.

File metadata

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

Hashes for momapy_kb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd0e562e27e9f887b3c387cbb80e3eb4545b1b9f9cff36c72372ca14e6d9a826
MD5 2a3027368c04bf757d2c78a06c0e70c3
BLAKE2b-256 3d4a2ed3c6dc5ac45b91d2ec9535f23aa5942faa06d3a07df96c2518049e1cd0

See more details on using hashes here.

Provenance

The following attestation bundles were made for momapy_kb-0.2.1-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