Skip to main content

gocam

gocam is a Python data model and command-line interface for working with Gene Ontology Causal Activity Models (GO-CAMs). It provides Pydantic models for validated GO-CAM data, tools for fetching published models, and optional translations to formats such as CX2 and gene-centered networks.

Learn more about GO-CAMs or explore published models in the GO-CAM browser.

Installation

Install gocam from PyPI:

pip install gocam

This installs both the Python package and the gocam command.

Quick start

Fetch a published model as YAML from the command line:

gocam fetch 5b91dbd100002057 > model.yaml

Fetch and translate a published model from Python:

from gocam.translation import MinervaWrapper

model = MinervaWrapper().fetch_model("5b91dbd100002057")
print(model.title)

Load and validate a local JSON model:

from pathlib import Path

from gocam.datamodel import Model

model = Model.model_validate_json(Path("model.json").read_text())
print(model.id)

See the getting-started guide for JSON output, local YAML loading, serialization, and more complete examples.

Documentation

Development

The source schema is src/gocam/schema/gocam.yaml. This repository also contains reusable Python code and internal scripts used by the GO Release pipeline. One-off and exploratory analyses belong in the gocam-analysis repository.

Install uv, clone the repository, and create the complete development environment:

git clone https://github.com/geneontology/gocam-py.git
cd gocam-py
uv sync --all-extras

CX2-related development requires Graphviz to be installed on the system before syncing the optional dependencies.

Run the standard project checks:

make test
make lint-python
make type-check

Regenerate schema-derived outputs when intentionally changing the schema:

make src/gocam/datamodel/gocam.py
make gen-project
make gendoc

The generated project/ directory is disposable local output. Versioned generated schema artifacts are distributed through GitHub Releases.

Metadata

Release files for gocam 0.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gocam 0.13.0
File Size Uploaded
gocam-0.13.0.tar.gz 422.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gocam 0.13.0
File Interpreter ABI Platform
gocam-0.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 488.8 kB

Release files / gocam-0.13.0.tar.gz

Download URL gocam-0.13.0.tar.gz
Size 422.5 kB
Tags Source
SHA-256 checksum
How to use checksums
41e7afc66aec0715dd8d61386b82eb508c20d1756ff5b99a9a069e5b72f1b40e
BLAKE2b-256 checksum
How to use checksums
6826e00feff06180432ef5041db0a99b4a1e752c7ffe05c191eac3ef54df7506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / gocam-0.13.0-py3-none-any.whl

Download URL gocam-0.13.0-py3-none-any.whl
Size 66.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
639291a563ab8e13acaea8c15f0b57b68f6bb5d1d01f2a340356e7f271b2496b
BLAKE2b-256 checksum
How to use checksums
04372654c7d12b7063cfe86854def388f5752e0d0d117cb23a9e024853d2f6a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page