{"id":9716,"library":"edam-ontology","title":"EDAM Ontology Python Package","description":"The edam-ontology library provides versioned, Python-packaged data for the EDAM ontology (http://edamontology.org/). It offers convenient access to the ontology as an `owlready2` World object, enabling programmatic querying and navigation. The current version is 1.25.3, with releases typically tied to new EDAM ontology versions and Python compatibility updates.","status":"active","version":"1.25.3","language":"en","source_language":"en","source_url":"https://github.com/edamontology/edam-ontology.py","tags":["ontology","bioinformatics","data-science","semantics","owlready2"],"install":[{"cmd":"pip install edam-ontology","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Required to load and query the ontology data.","package":"owlready2","optional":false}],"imports":[{"note":"EDAM is the primary entry point, an owlready2.World object.","symbol":"EDAM","correct":"from edam_ontology import EDAM"},{"note":"Provides the semantic version string of the packaged EDAM ontology.","symbol":"EDAM_ONTOLOGY_VERSION","correct":"from edam_ontology import EDAM_ONTOLOGY_VERSION"}],"quickstart":{"code":"from edam_ontology import EDAM, EDAM_ONTOLOGY_VERSION\n\nprint(f\"EDAM Ontology version: {EDAM_ONTOLOGY_VERSION}\")\n\n# EDAM is an OWLReady2 World object that can be queried.\n# For example, count all individuals (entities) in the ontology:\nnum_entities = len(EDAM.individuals())\nprint(f\"Number of EDAM entities: {num_entities}\")\n\n# Accessing a specific class (e.g., 'data'):\ndata_class = EDAM.data\nif data_class:\n    print(f\"Found EDAM class: {data_class.label.first()}\")\nelse:\n    print(\"EDAM.data class not found.\")","lang":"python","description":"This quickstart demonstrates how to import the EDAM ontology and its version, and then perform a basic query to count entities and access a specific class using the `owlready2` API."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or higher.","message":"Version 1.25.3 dropped support for Python 3.5-3.8. The library now requires Python 3.9 or newer.","severity":"breaking","affected_versions":"1.25.3 and later"},{"fix":"Refer to the `owlready2` documentation (e.g., `owlready2.readthedocs.io`) to understand how to interact with OWL `World` objects, classes, properties, and individuals.","message":"The `EDAM` object is an `owlready2.World` instance. Effective use of the ontology requires familiarity with `owlready2`'s API for querying, navigating, and manipulating OWL ontologies.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure sufficient memory is available. For very large-scale or resource-limited applications, consider designing your workflow to only load necessary parts or explore alternative methods like SPARQL queries against an external EDAM endpoint if applicable.","message":"Loading the full EDAM ontology into memory (via `edam_ontology.EDAM`) can consume significant RAM (several hundred MBs), especially in resource-constrained environments.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed using `pip install edam-ontology` or activate the correct Python virtual environment where it is installed.","cause":"The `edam-ontology` package is not installed or the current Python environment does not have access to it.","error":"ModuleNotFoundError: No module named 'edam_ontology'"},{"fix":"Upgrade to the latest version of the library using `pip install --upgrade edam-ontology`. If the problem persists, try a clean reinstall: `pip uninstall edam-ontology && pip install edam-ontology`.","cause":"This usually indicates an older version of `edam-ontology` that does not expose the `EDAM` object directly, or a corrupted installation.","error":"ImportError: cannot import name 'EDAM' from 'edam_ontology'"},{"fix":"When accessing EDAM entities like `EDAM.data` or `EDAM.tool`, these are `owlready2` class objects. Use their properties (e.g., `EDAM.data.label.first()`) or `owlready2` methods to query them, rather than attempting to call them like `EDAM.data()`.","cause":"You are trying to call an EDAM class directly, expecting it to be a function or a constructor, instead of treating it as an `owlready2` class object.","error":"TypeError: 'owlready2.entity.ThingClass' object is not callable"}]}