Skip to content

momapy

momapy is a library for working with molecular maps. It currently supports SBGN and CellDesigner maps. Its key feature is its definition of a map, that is formed of two entities: a model, that describes what concepts are represented, and a layout, that describes how these concepts are represented. This definition is borrowed from SBML and its extensions layout+render, that allow users to add a layout to an SBML model. momapy aims at extending this definition to SBGN and CellDesigner maps.

Features of momapy:

Image title

Installation

momapy is available as a Python package and can be installed with pip as follows:

pip install momapy

Usage

Typical usage of momapy includes reading a map and exploring its model:

1
2
3
4
5
6
import momapy.sbgn.io.sbgnml
from momapy.io import read

map_ = read("my_map.sbgn").obj
for process in map_.model.processes:
    print(process)

Or rendering its layout:

1
2
3
4
import momapy.rendering.skia
from momapy.rendering.core import render_map

render_map(map_, "my_file.pdf", format_="pdf", renderer="skia")

User manual

A user manual showcasing the main feature of momapy is available here: User manual.

Documentation

A complete documentaton for momapy's API is available here: API reference.