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

Uploaded Python 3

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

Hashes for momapy_kb-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ebd35f5c6119a133f4f061e7592d91a73ba6830e66f4efa8661911a31b74970e
MD5 da0bfbce9e611c2535da81ee426bba9c
BLAKE2b-256 9f791b480938af4284da43d5b6239d2b6c5d4ecaffc51318284bd4959822a78a

See more details on using hashes here.

Provenance

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

Hashes for momapy_kb-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4907c6d7631bc19a177970ccd4237fabada6dd4e92d0e052912f319ee4db32e2
MD5 8fe962b142808f11d1bb479db8eadf76
BLAKE2b-256 d27bef94885ca8c0fd52dd80aa29eb811d63dc1e549d83c5bed084b6c8306a0d

See more details on using hashes here.

Provenance

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