diff --git a/tests/data/basic.owl.ttl b/tests/data/basic.owl.ttl
new file mode 100644
index 00000000..cb03d880
--- /dev/null
+++ b/tests/data/basic.owl.ttl
@@ -0,0 +1,234 @@
+@prefix : .
+@prefix a: .
+@prefix x: .
+@prefix y: .
+@prefix z: .
+@prefix owl: .
+@prefix rdf: .
+@prefix xml: .
+@prefix xsd: .
+@prefix rdfs: .
+@prefix oio: .
+@prefix xref: .
+@prefix skos: .
+@prefix UBERON: .
+@prefix sh: .
+@prefix category: .
+@prefix anatomy: .
+@base .
+@prefix inca: .
+
+
+:test.owl rdf:type owl:Ontology .
+
+[ inca:pattern "structure" ;
+ inca:replacement ""
+].
+
+
+[ sh:declare
+ [ sh:prefix "biolink" ; sh:namespace "https://w3id.org/biolink/vocab/"],
+ [ sh:prefix "a" ; sh:namespace "http://example.org/a/"],
+ [ sh:prefix "x" ; sh:namespace "http://example.org/x/"],
+ [ sh:prefix "y" ; sh:namespace "http://example.org/y/"],
+ [ sh:prefix "z" ; sh:namespace "http://example.org/z/"]
+ ] .
+
+ rdfs:label a owl:AnnotationProperty .
+
+
+## X ontology (base)
+
+x:organ a owl:Class ; category: anatomy: ;
+ rdfs:label "organ"@en .
+x:appendage a owl:Class ; category: anatomy: ;
+ rdfs:label "appendage" .
+x:tissue a owl:Class ; category: anatomy: ;
+ rdfs:label "tissue" .
+x:region a owl:Class ; category: anatomy: ;
+ rdfs:label "region" .
+
+x:lung a owl:Class ; category: anatomy: ;
+ rdfs:label "lung" ;
+ xref: "UBERON:0002048" ; # lung
+ xref: "BAD:ORGAN" ; ## deliberately broader
+ rdfs:subClassOf x:organ .
+
+x:heart a owl:Class ; category: anatomy: ;
+ rdfs:label "heart" ;
+ xref: "UBERON:0000948" ; ## heart
+ xref: "BAD:ORGAN" ; ## deliberately broader
+ rdfs:subClassOf x:organ .
+
+x:liver a owl:Class ; category: anatomy: ;
+ rdfs:label "liver" ;
+ xref: "UBERON:0002107" ; ## liver
+ xref: "BAD:ORGAN" ; ## deliberately broader
+ rdfs:subClassOf x:organ .
+
+x:bone_element a owl:Class ; category: anatomy: ;
+ rdfs:label "bone element" ;
+ xref: "UBERON:0001474" ; ## bone element
+ oio:hasBroadSynonym "bone" ;
+ rdfs:subClassOf x:organ .
+
+x:bone_tissue a owl:Class ; category: anatomy: ;
+ rdfs:label "bone tissue" ;
+ xref: "UBERON:0002481" ; ## bone tissue
+ oio:hasBroadSynonym "bone" ;
+ rdfs:subClassOf x:tissue .
+
+x:eyeball a owl:Class ; category: anatomy: ;
+ rdfs:label "eyeball" ;
+ xref: "UBERON:0010230" ; ## eyeball of camera-type eye
+ rdfs:subClassOf x:region .
+
+x:eye a owl:Class ; category: anatomy: ;
+ rdfs:label "eye" ;
+ xref: "UBERON:0000970" ; ## eye
+ rdfs:subClassOf x:organ .
+
+x:hand a owl:Class ; category: anatomy: ;
+ rdfs:label "manus" ;
+ oio:hasExactSynonym "hand" ;
+ xref: "UBERON:0002398" ; ## manus
+ rdfs:subClassOf x:appendage .
+
+x:foot a owl:Class ; category: anatomy: ;
+ rdfs:label "pes" ;
+ oio:hasExactSynonym "foot" ;
+ xref: "UBERON:0002387" ; ## pes
+ rdfs:subClassOf x:appendage .
+
+x:obsolete_leg a owl:Class ; category: anatomy: ;
+ rdfs:label "leg" ;
+ oio:hasRelatedSynonym "hindlimb" ;
+ owl:deprecated "true"^^xsd:boolean .
+
+x:hindlimb a owl:Class ; category: anatomy: ;
+ rdfs:label "hindlimb" ;
+ rdfs:subClassOf x:appendage .
+
+## Y ontology
+## this ontology is less precise and has a single concept for bone and eye
+
+y:organ a owl:Class ; category: anatomy: ;
+ rdfs:label "organs" .
+y:appendage a owl:Class ; category: anatomy: ;
+ rdfs:label "appendages" .
+y:tissue a owl:Class ; category: anatomy: ;
+ rdfs:label "tissues" .
+y:region a owl:Class ; category: anatomy: ;
+ rdfs:label "regions" .
+
+y:lung a owl:Class ; category: anatomy: ;
+ rdfs:label "lungs" ;
+ xref: "UBERON:0002048" ; # lung
+ rdfs:subClassOf y:organ .
+
+y:heart a owl:Class ; category: anatomy: ;
+ rdfs:label "hearts" ;
+ xref: "UBERON:0000948" ; ## heart
+ rdfs:subClassOf y:organ .
+
+y:liver a owl:Class ; category: anatomy: ;
+ rdfs:label "livers" ;
+ xref: "UBERON:0002107" ; ## liver
+ rdfs:subClassOf y:organ .
+
+y:bone a owl:Class ; category: anatomy: ;
+ rdfs:label "bones" ;
+ xref: "UBERON:0001474" ; ## bone element
+ oio:hasRelatedSynonym "bone element" ;
+ rdfs:subClassOf y:organ .
+
+y:eye a owl:Class ; category: anatomy: ;
+ rdfs:label "eyes" ;
+ xref: "UBERON:0000970" ; ## eye
+ rdfs:subClassOf y:organ .
+
+y:hand a owl:Class ; category: anatomy: ;
+ rdfs:label "hands" ;
+ xref: "UBERON:0002398" ; ## manus
+ rdfs:subClassOf y:appendage .
+
+y:foot a owl:Class ; category: anatomy: ;
+ rdfs:label "feet" ;
+ xref: "UBERON:0002387" ; ## pes
+ rdfs:subClassOf y:appendage .
+
+y:leg a owl:Class ; category: anatomy: ;
+ rdfs:label "legs" ;
+ oio:hasExactSynonym "leg" ;
+ rdfs:subClassOf y:appendage .
+
+## Z ontology
+
+z:organ a owl:Class ; category: anatomy: ;
+ xref: "BAD:ORGAN" ; ## deliberately broader
+ rdfs:label "ORGAN" .
+z:appendage a owl:Class ; category: anatomy: ;
+ rdfs:label "APPENDAGE" .
+z:tissue a owl:Class ; category: anatomy: ;
+ rdfs:label "TISSUE" .
+z:region a owl:Class ; category: anatomy: ;
+ rdfs:label "REGION" .
+
+z:lung a owl:Class ; category: anatomy: ;
+ xref: "UBERON:0002048" ; # lung
+ rdfs:subClassOf z:organ .
+
+z:heart a owl:Class ; category: anatomy: ;
+ xref: "UBERON:0000948" ; ## heart
+ rdfs:subClassOf z:organ .
+
+z:liver a owl:Class ; category: anatomy: ;
+ xref: "UBERON:0002107" ; ## liver
+ rdfs:subClassOf z:organ .
+
+z:bone_element a owl:Class ; category: anatomy: ;
+ xref: "UBERON:0001474" ; ## bone element
+ oio:hasBroadSynonym "bone" ;
+ rdfs:subClassOf z:organ .
+
+z:bone_tissue a owl:Class ; category: anatomy: ;
+ xref: "UBERON:0002481" ; ## bone tissue
+ oio:hasBroadSynonym "bone" ;
+ rdfs:subClassOf z:tissue .
+
+z:eyeball a owl:Class ; category: anatomy: ;
+ xref: "UBERON:0010230" ; ## eyeball of camera-type eye
+ rdfs:subClassOf z:region .
+
+z:eye a owl:Class ; category: anatomy: ;
+ xref: "UBERON:0000970" ; ## eye
+ rdfs:subClassOf z:organ .
+
+z:hand a owl:Class ; category: anatomy: ;
+ oio:hasExactSynonym "hand" ;
+ xref: "UBERON:0002398" ; ## manus
+ rdfs:subClassOf z:appendage .
+
+z:foot a owl:Class ; category: anatomy: ;
+ oio:hasExactSynonym "foot" ;
+ xref: "UBERON:0002387" ; ## pes
+ rdfs:subClassOf z:appendage .
+
+z:hindlimb a owl:Class ; category: anatomy: ;
+ rdfs:label "hindlimb" ;
+ rdfs:subClassOf z:appendage .
+
+z:tail a owl:Class ; category: anatomy: ;
+ rdfs:label "tail" ;
+ rdfs:subClassOf z:appendage .
+
+x:tail_structure a owl:Class ; category: anatomy: ;
+ rdfs:label "tail structure" ;
+ rdfs:subClassOf z:appendage .
+
+a:bone_of_hand a owl:Class ; category: anatomy: ;
+ rdfs:label "bone of hand" ;
+ rdfs:subClassOf a:organ .
+a:bone_of_foot a owl:Class ; category: anatomy: ;
+ rdfs:label "bone of foot" ;
+ rdfs:subClassOf a:organ .
diff --git a/tests/data/basic.ptable.tsv b/tests/data/basic.ptable.tsv
new file mode 100644
index 00000000..e44eb79e
--- /dev/null
+++ b/tests/data/basic.ptable.tsv
@@ -0,0 +1,86 @@
+x:appendage y:appendage 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+x:appendage z:appendage 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+x:bone_element y:bone 0.05883724076724989 0.05883724076724989 0.7646510369310004 0.11767448153449978
+x:bone_element z:bone_element 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:bone_element z:bone_tissue 0.18469903125906462 0.18469903125906462 0.2612038749637414 0.3693980625181293
+x:bone_tissue y:bone 0.11634950965480911 0.11634950965480911 0.5346019613807635 0.23269901930961823
+x:bone_tissue z:bone_element 0.18469903125906462 0.18469903125906462 0.2612038749637414 0.3693980625181293
+x:bone_tissue z:bone_tissue 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:eye y:eye 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:eye z:eye 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:eyeball z:eyeball 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:foot y:foot 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:foot z:foot 0.03755527620558374 0.03755527620558374 0.8497788951776651 0.07511055241116743
+x:hand y:hand 0.04468440230640902 0.04468440230640902 0.8212623907743639 0.08936880461281804
+x:hand z:hand 0.03755527620558374 0.03755527620558374 0.8497788951776651 0.07511055241116743
+x:heart y:heart 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+x:heart z:heart 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:heart z:organ 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:hindlimb z:hindlimb 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+x:liver y:liver 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+x:liver z:liver 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:liver z:organ 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:lung y:lung 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+x:lung z:lung 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:lung z:organ 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+x:organ y:organ 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+x:organ z:organ 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+x:region y:region 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+x:region z:region 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+x:tissue y:tissue 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+x:tissue z:tissue 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+y:appendage x:appendage 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:appendage z:appendage 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:bone x:bone_element 0.05883724076724989 0.05883724076724989 0.7646510369310004 0.11767448153449978
+y:bone x:bone_tissue 0.11634950965480911 0.11634950965480911 0.5346019613807635 0.23269901930961823
+y:bone z:bone_element 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:bone z:bone_tissue 0.11634950965480911 0.11634950965480911 0.5346019613807635 0.23269901930961823
+y:eye x:eye 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:eye z:eye 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:foot x:foot 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:foot z:foot 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:hand x:hand 0.04468440230640902 0.04468440230640902 0.8212623907743639 0.08936880461281804
+y:hand z:hand 0.04468440230640902 0.04468440230640902 0.8212623907743639 0.08936880461281804
+y:heart x:heart 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:heart z:heart 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:liver x:liver 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:liver z:liver 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:lung x:lung 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:lung z:lung 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+y:organ x:organ 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:organ z:organ 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:region x:region 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:region z:region 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:tissue x:tissue 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+y:tissue z:tissue 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+z:appendage x:appendage 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+z:appendage y:appendage 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+z:bone_element x:bone_element 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:bone_element x:bone_tissue 0.18469903125906462 0.18469903125906462 0.2612038749637414 0.3693980625181293
+z:bone_element y:bone 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:bone_tissue x:bone_element 0.18469903125906462 0.18469903125906462 0.2612038749637414 0.3693980625181293
+z:bone_tissue x:bone_tissue 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:bone_tissue y:bone 0.11634950965480911 0.11634950965480911 0.5346019613807635 0.23269901930961823
+z:eye x:eye 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:eye y:eye 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:eyeball x:eyeball 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:foot x:foot 0.03755527620558374 0.03755527620558374 0.8497788951776651 0.07511055241116743
+z:foot y:foot 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:hand x:hand 0.03755527620558374 0.03755527620558374 0.8497788951776651 0.07511055241116743
+z:hand y:hand 0.04468440230640902 0.04468440230640902 0.8212623907743639 0.08936880461281804
+z:heart x:heart 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:heart y:heart 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:hindlimb x:hindlimb 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+z:liver x:liver 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:liver y:liver 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:lung x:lung 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:lung y:lung 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:organ x:heart 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:organ x:liver 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:organ x:lung 0.06530096874093538 0.06530096874093538 0.7387961250362586 0.1306019374818707
+z:organ x:organ 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+z:organ y:organ 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+z:region x:region 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+z:region y:region 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
+z:tissue x:tissue 0.02953594098668788 0.02953594098668788 0.8818562360532485 0.05907188197337576
+z:tissue y:tissue 0.03982139852307098 0.03982139852307098 0.8407144059077161 0.07964279704614197
diff --git a/tests/data/empty.omn b/tests/data/empty.omn
new file mode 100644
index 00000000..cba7be27
--- /dev/null
+++ b/tests/data/empty.omn
@@ -0,0 +1,3 @@
+Ontology:
+
+## empty ontology
diff --git a/tests/data/prefixes.yaml b/tests/data/prefixes.yaml
new file mode 100644
index 00000000..66f72028
--- /dev/null
+++ b/tests/data/prefixes.yaml
@@ -0,0 +1,4 @@
+a: http://example.org/a/
+x: http://example.org/x/
+y: http://example.org/y/
+z: http://example.org/z/