This document provides step-by-step instructions for mapping a new ontology to the Basic Formal Ontology (BFO), Common Core Ontologies (CCO), and Relations Ontology (RO) using our established methodology.
-
Required Software
-
Required Knowledge
- Basic understanding of OWL/RDF ontologies
- Basic understanding of semantic web technologies
- Familiarity with your source ontology
- Basic command line usage
-
Required Files
- Your source ontology file (OWL/RDF format)
- Latest versions of BFO, CCO, and RO ontologies
-
Fork the Template Repository
git clone https://github.com/BFO-Mappings/PROV-to-BFO.git your-ontology-to-bfo cd your-ontology-to-bfo rm -rf .git git init
-
Update Configuration Edit
src/Makefile
:config.ONTOLOGY_FILE := your-ontology-edit.ttl config.ONTOLOGY_PREFIX := your-ontology-bfo-directmappings config.ONTOLOGY_IRI := https://your-repo-url/main config.ALIGNMENT_FILES := your-ontology-bfo-directmappings.ttl your-ontology-ro-directmappings.ttl your-ontology-cco-directmappings.ttl
-
Setup Directory Structure
mkdir -p src/imports/YOUR-ONTOLOGY mkdir -p src/sparql mkdir -p build/lib
-
Import Your Ontology
- Copy your ontology file to
src/imports/YOUR-ONTOLOGY/
- Create an import file listing terms to be mapped
- Copy your ontology file to
-
Setup Mapping Files Create three new files:
touch your-ontology-bfo-directmappings.ttl touch your-ontology-ro-directmappings.ttl touch your-ontology-cco-directmappings.ttl
-
Initialize Mapping Files Add basic metadata to each file:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix your: <your-ontology-namespace#> . # Add other necessary prefixes <your-mapping-iri> a owl:Ontology ; rdfs:label "Your Ontology mappings for BFO/CCO/RO"@en ; owl:versionInfo "YYYY-MM-DD"@en ; # Add other metadata .
-
Analyze Source Terms
# Generate list of terms to map make analyze-terms
-
Create Direct Mappings For each class/property, add appropriate mapping axioms:
your:SomeClass rdf:type owl:Class . [] rdf:type owl:Axiom ; owl:annotatedSource your:SomeClass ; owl:annotatedProperty rdfs:subClassOf ; owl:annotatedTarget bfo:SomeOtherClass ; sssom:object_label "Label" ; rdfs:comment "Justification for mapping"@en .
-
Create Complex Mappings For terms requiring more complex relationships:
# Using SWRL Rules [ rdf:type swrl:Imp ; swrl:body [...] ; swrl:head [...] ; rdfs:comment "Rule explanation"@en ] . # Using Property Chains your:property owl:propertyChainAxiom (property1 property2) .
-
Run Basic Tests
make test-edit
-
Check for Unmapped Terms
make unmapped
-
Verify Consistency
make reason
-
Test with Example Instances
- Create example instances in your editor file
- Run reasoner to verify
make verify
-
Add Mapping Justifications For each mapping, ensure proper documentation:
- Clear rdfs:comment explaining the mapping
- SSSOM metadata for mapping provenance
- References to source documentation
-
Update README
- Document any ontology-specific considerations
- Add usage examples
- List contributors
-
Generate Reports
make report
-
Inconsistent Ontology
- Use
make explain
to identify the source - Check for conflicting axioms
- Verify mapping directions
- Use
-
Missing Terms
- Verify import file includes all necessary terms
- Check namespace declarations
- Ensure proper MIREOT extraction
-
Reasoner Timeout
- Consider breaking down complex rules
- Optimize property chains
- Remove unnecessary axioms
-
Mapping Creation
- Always provide justification for mappings
- Use the most specific mapping relation possible
- Document any assumptions made
-
Testing
- Create test cases for each mapping type
- Include edge cases in examples
- Verify bidirectional inference
-
Documentation
- Keep comments current
- Document any mapping patterns
- Include references to source specifications
For questions or issues:
- Check existing GitHub issues
- Review the documentation
- Create a new issue with:
- Clear description
- Minimal example
- Error messages
- Environment details
This methodology is provided under CC0 1.0 Universal.