Microbial ecophysiological trait and phenotype ontology
METPO releases are available from multiple sources:
BioPortal (Recommended for browsing and search):
- https://bioportal.bioontology.org/ontologies/METPO
- Browse classes, search terms, and visualize the hierarchy
- API access available
GitHub Releases:
- See Releases
- Download OWL, OBO, and JSON formats
Direct OWL file:
- Latest release:
metpo.owlin this repository
Editors of this ontology should use the edit version, src/ontology/metpo-edit.owl
The canonical IRI for every METPO term is under the https://w3id.org/metpo/ namespace, with a bare 7-digit local identifier:
- Term IRI:
https://w3id.org/metpo/<id>(e.g.https://w3id.org/metpo/1000482) - The ontology prefix
METPO:expands tohttps://w3id.org/metpo/ - Ontology document IRI:
https://w3id.org/metpo/metpo.owl(it sits under thehttps://w3id.org/metpo/delegation, as do the version IRIs and release products, e.g.https://w3id.org/metpo/releases/<date>/metpo.owl; the barehttps://w3id.org/metpo.owlis outside the delegation and does not resolve)
Do not use http://purl.obolibrary.org/obo/METPO_<id>. METPO is not registered in the OBO Foundry, so those PURLs do not resolve (HTTP 404) and are not METPO identifiers. The canonical METPO identifier namespace is https://w3id.org/metpo/ (resolved through the w3id.org host); purl.obolibrary.org is not used by METPO. (Term-IRI resolution behavior is still being finalized; see issues #450 and #435.)
Please use this GitHub repository's Issue tracker to request new terms/classes or report errors or specific concerns related to the ontology.
- Python: 3.11 or higher
- Package Manager: uv (recommended)
- ROBOT: For ontology processing (see ROBOT installation)
- MongoDB: For database workflows (optional)
# Check your environment
make check-env
# Install core dependencies only
make install
# Install for specific workflows
make install-dev # Development tools (oaklib, rdflib, semsql)
make install-databases # BactoTraits/Madin workflows (pandas, pymongo)
make install-analysis # Analysis/visualization scripts (matplotlib, numpy, levenshtein)
# Install everything
make install-allThis ontology repository was created using the Ontology Development Kit (ODK).
METPO research relies on numerous external data sources and ontologies. See ACKNOWLEDGMENTS.md for complete citations and attributions for:
- BactoTraits, Madin et al., and BacDive microbial trait databases
- 24+ ontologies from OBO Foundry and BioPortal
- Semsql databases, embedding infrastructure, and software tools
- https://docs.google.com/spreadsheets/d/1_Lr-9_5QHi8QLvRyTZFSciUhzGKD4DbUObyTpJ16_RU/edit?gid=0#gid=0
- Historical development discussion: berkeleybop/group-meetings #155 (Note: May require repository access)
METPO is intended to drive mining knowledge out of papers from journals like IJSEM and expressing the findings with classes and predicates from METPO or the Biolink model, which would then become part of KG-Microbe.
We strive to keep our class hierarchies pure. Reuse of terms from OBO Foundry ontologies and the use of logical axioms are high but secondary priorities.
This repository supports multiple research workflows beyond ontology development:
The core METPO ontology is built using the Ontology Development Kit (ODK). The root Python code and Makefiles are not involved in ontology releases.
Building the ontology (requires Docker):
cd src/ontology
make squeaky-clean # Clean all generated files
./run.sh make all # Full build with Docker wrapperThe build process fetches the latest CSV data from Google Sheets, generates ROBOT template output, and builds all ontology format files (OWL, OBO, JSON).
Creating a release:
cd src/ontology
./run.sh prepare_release # Copies files to project rootSee src/ontology/README-editors.md for detailed instructions.
The OntoGPT-based literature-mining pipeline (formerly literature_mining/) and the metpo.literature_mining package, including the ICBO 2025 extraction examples, were retired from this repo during scope-narrowing and archived at turbomam/metpo-attic.
Presentation materials: See docs/presentations/icbo_2025/ for slides and analysis from ICBO 2025. The Python scripts that generated the figures for that talk (formerly in metpo/presentations/) were also retired and are archived at turbomam/metpo-attic.
Import and reconcile microbial trait databases (BactoTraits, Madin et al.) with METPO terminology.
make install-databases
# Import datasets to MongoDB
make import-bactotraits
make import-madin
# Generate reconciliation reports
make all-reportsOutputs:
reports/bactotraits-metpo-reconciliation.yamlreports/madin-metpo-reconciliation.yamlreports/synonym-sources.tsv
METPO has gone through three numbering eras. All IDs ever used — across current templates, historical BioPortal submissions, and tagged releases — are tracked to prevent reuse.
# Regenerate the id allocation audit report
make audit-ids # writes reports/id-allocation-audit.md
# Regenerate the deprecated IDs template (TSV) used to build the OWL component
make -C src/ontology -f metpo.Makefile regenerate-deprecated
# or just let the normal build pick it up:
make -C src/ontology -f metpo.Makefile components/metpo_sheet.owlsrc/templates/deprecated.tsv is a ROBOT template that marks every burned ID as
owl:deprecated true with an "obsolete ..." label. It is committed to the repo and
merged into metpo.owl during every release build. Never reuse a burned ID — consult
reports/id-allocation-audit.md for the full list and the next safe IDs to allocate.
Semantic matching between METPO and other microbial ontologies (mapping candidates, definition gap-filling, synonym discovery). The strategy is documented in docs/embedding-strategy.md: the OLS4 embeddings search API first, then proven tooling for anything OLS does not host.
Implementations:
cross-ontology-search(metpo/pipeline/cross_ontology_search.py) — OLS4 search with local embedding re-ranking.assess-ontology-by-api-search— a label-based OLS4/BioPortal search baseline.
See docs/cli-reference.md for options.
External ontology files are treated as build artifacts, not committed. The external/ directory is git-ignored; download what you need on demand:
make install-dev
# Download microbial ontologies from BioPortal into external/ontologies/bioportal/
make download-external-bioportal-ontologiesHistorical METPO BioPortal submissions were downloaded once and processed into metadata/ontology/historical_submissions/entity_extracts/ (committed), which is what the ID-allocation audit reads. For semantic matching against external ontologies, see the embedding strategy in docs/embedding-strategy.md.
- Ontology editing:
src/ontology/README-editors.md - CLI reference:
docs/cli-reference.md- Complete guide to all command-line tools - Deprecation workflow:
docs/deprecation-workflow.md— how to deprecate terms and allocate new IDs - ID allocation and deprecation:
reports/id-allocation-audit.md— auto-generated list of all active and burned IDs, next safe IDs to allocate - Historical analysis:
metadata/ontology/historical_submissions/README.md - Database metadata:
metadata/databases/README.md - Development guide:
CLAUDE.md - Analysis reports:
reports/
# Check environment setup
make check-env
# Generate all analysis reports
make all-reports
# Test complete workflow reproducibility
make test-workflow
# Clean generated data
make clean-dataMETPO is released under the Creative Commons Attribution 4.0 International License (CC-BY-4.0).
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made
See LICENSE for full details.