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.3.0.tar.gz (327.9 kB 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.3.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: momapy_kb-0.3.0.tar.gz
  • Upload date:
  • Size: 327.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momapy_kb-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c69f68dd120108caebeb08e95f7614b26316ddb299160a1fcc321ec31b253ce0
MD5 93c76a43bbc37c62d82c4a87c98c9210
BLAKE2b-256 bd23015cc3f47109ca8db15c903b3697d79ae5ce65a7b635b7d4185f71138572

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: momapy_kb-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06a4be6627f13123a33b43e91e984e5d7c5dbbb96a43a39205fde009655e3503
MD5 a2042366b1ae4e87e5caaf260d03939e
BLAKE2b-256 a81b1d36b5f623a603f6752352665866390e5da9b207cae792e053cc3bed2d22

See more details on using hashes here.

Provenance

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