Skip to content

Commit

Permalink
First pass at oboformat and obographs conformance suite.
Browse files Browse the repository at this point in the history
See

- owlcollab/oboformat#146
- geneontology/obographs#106

Note that that may move from the OAK repo in the longer term.
  • Loading branch information
cmungall committed Mar 12, 2024
1 parent 36a0db4 commit e4f8894
Show file tree
Hide file tree
Showing 502 changed files with 14,508 additions and 0 deletions.
717 changes: 717 additions & 0 deletions tests/input/obo-compliance.obo

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions tests/input/obo-compliance/alt_id/alt_id.expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"graphs" : [ {
"id" : "http://purl.obolibrary.org/obo/alt_id.owl",
"meta" : {
"basicPropertyValues" : [ {
"pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion",
"val" : "1.4"
} ]
},
"nodes" : [ {
"id" : "http://purl.obolibrary.org/obo/X_1",
"type" : "CLASS",
"meta" : {
"basicPropertyValues" : [ {
"pred" : "http://www.geneontology.org/formats/oboInOwl#hasAlternativeId",
"val" : "X:2"
} ]
}
}, {
"id" : "http://purl.obolibrary.org/obo/X_2",
"type" : "CLASS",
"meta" : {
"basicPropertyValues" : [ {
"pred" : "http://purl.obolibrary.org/obo/IAO_0000231",
"val" : "http://purl.obolibrary.org/obo/IAO_0000227"
}, {
"pred" : "http://purl.obolibrary.org/obo/IAO_0100001",
"val" : "http://purl.obolibrary.org/obo/X_1"
} ],
"deprecated" : true
}
}, {
"id" : "http://www.geneontology.org/formats/oboInOwl#hasAlternativeId",
"lbl" : "has_alternative_id",
"type" : "PROPERTY"
}, {
"id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion",
"lbl" : "has_obo_format_version",
"type" : "PROPERTY"
} ]
} ]
}
7 changes: 7 additions & 0 deletions tests/input/obo-compliance/alt_id/alt_id.expected.obo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
format-version: 1.2
ontology: alt_id

[Term]
id: X:1
alt_id: X:2

49 changes: 49 additions & 0 deletions tests/input/obo-compliance/alt_id/alt_id.expected.ofn
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Prefix(:=<http://purl.obolibrary.org/obo/alt_id.owl#>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/alt_id.owl>
Annotation(<http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion> "1.4")

Declaration(Class(<http://purl.obolibrary.org/obo/X_1>))
Declaration(Class(<http://purl.obolibrary.org/obo/X_2>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/IAO_0000231>))
Declaration(AnnotationProperty(<http://purl.obolibrary.org/obo/IAO_0100001>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#hasAlternativeId>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#id>))
############################
# Annotation Properties
############################

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasAlternativeId> (has_alternative_id)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasAlternativeId> "has_alternative_id")

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion> (has_obo_format_version)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion> "has_obo_format_version")



############################
# Classes
############################

# Class: <http://purl.obolibrary.org/obo/X_1> (<http://purl.obolibrary.org/obo/X_1>)

AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasAlternativeId> <http://purl.obolibrary.org/obo/X_1> "X:2")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#id> <http://purl.obolibrary.org/obo/X_1> "X:1")

# Class: <http://purl.obolibrary.org/obo/X_2> (<http://purl.obolibrary.org/obo/X_2>)

AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0000231> <http://purl.obolibrary.org/obo/X_2> <http://purl.obolibrary.org/obo/IAO_0000227>)
AnnotationAssertion(<http://purl.obolibrary.org/obo/IAO_0100001> <http://purl.obolibrary.org/obo/X_2> <http://purl.obolibrary.org/obo/X_1>)
AnnotationAssertion(owl:deprecated <http://purl.obolibrary.org/obo/X_2> "true"^^xsd:boolean)


)
94 changes: 94 additions & 0 deletions tests/input/obo-compliance/alt_id/alt_id.expected.owl
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/alt_id.owl#"
xml:base="http://purl.obolibrary.org/obo/alt_id.owl"
xmlns:obo="http://purl.obolibrary.org/obo/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#">
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/alt_id.owl">
<oboInOwl:hasOBOFormatVersion>1.4</oboInOwl:hasOBOFormatVersion>
</owl:Ontology>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Annotation properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!-- http://purl.obolibrary.org/obo/IAO_0000231 -->

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000231"/>



<!-- http://purl.obolibrary.org/obo/IAO_0100001 -->

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0100001"/>



<!-- http://www.geneontology.org/formats/oboInOwl#hasAlternativeId -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasAlternativeId">
<rdfs:label>has_alternative_id</rdfs:label>
</owl:AnnotationProperty>



<!-- http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion">
<rdfs:label>has_obo_format_version</rdfs:label>
</owl:AnnotationProperty>



<!-- http://www.geneontology.org/formats/oboInOwl#id -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id"/>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!-- http://purl.obolibrary.org/obo/X_1 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/X_1">
<oboInOwl:hasAlternativeId>X:2</oboInOwl:hasAlternativeId>
<oboInOwl:id>X:1</oboInOwl:id>
</owl:Class>



<!-- http://purl.obolibrary.org/obo/X_2 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/X_2">
<obo:IAO_0000231 rdf:resource="http://purl.obolibrary.org/obo/IAO_0000227"/>
<obo:IAO_0100001 rdf:resource="http://purl.obolibrary.org/obo/X_1"/>
<owl:deprecated rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</owl:deprecated>
</owl:Class>
</rdf:RDF>



<!-- Generated by the OWL API (version 4.5.25) https://github.com/owlcs/owlapi -->

3 changes: 3 additions & 0 deletions tests/input/obo-compliance/alt_id/alt_id.meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: alt_id
name: alt_id
description: Alternative ID for the term
7 changes: 7 additions & 0 deletions tests/input/obo-compliance/alt_id/alt_id.obo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
format-version: 1.4
ontology: alt_id

[Term]
id: X:1
alt_id: X:2

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"graphs" : [ {
"id" : "http://purl.obolibrary.org/obo/broad_synonym.owl",
"meta" : {
"basicPropertyValues" : [ {
"pred" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion",
"val" : "1.4"
} ]
},
"nodes" : [ {
"id" : "http://purl.obolibrary.org/obo/X_1",
"lbl" : "example term",
"type" : "CLASS",
"meta" : {
"synonyms" : [ {
"pred" : "hasBroadSynonym",
"val" : "broad synonym"
} ]
}
}, {
"id" : "http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym",
"lbl" : "has_broad_synonym",
"type" : "PROPERTY"
}, {
"id" : "http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion",
"lbl" : "has_obo_format_version",
"type" : "PROPERTY"
} ]
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
format-version: 1.2
ontology: broad_synonym

[Term]
id: X:1
name: example term
synonym: "broad synonym" BROAD []

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Prefix(:=<http://purl.obolibrary.org/obo/broad_synonym.owl#>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)


Ontology(<http://purl.obolibrary.org/obo/broad_synonym.owl>
Annotation(<http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion> "1.4")

Declaration(Class(<http://purl.obolibrary.org/obo/X_1>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion>))
Declaration(AnnotationProperty(<http://www.geneontology.org/formats/oboInOwl#id>))
Declaration(AnnotationProperty(rdfs:label))
############################
# Annotation Properties
############################

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym> (has_broad_synonym)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym> "has_broad_synonym")

# Annotation Property: <http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion> (has_obo_format_version)

AnnotationAssertion(rdfs:label <http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion> "has_obo_format_version")



############################
# Classes
############################

# Class: <http://purl.obolibrary.org/obo/X_1> (example term)

AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym> <http://purl.obolibrary.org/obo/X_1> "broad synonym")
AnnotationAssertion(<http://www.geneontology.org/formats/oboInOwl#id> <http://purl.obolibrary.org/obo/X_1> "X:1")
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/X_1> "example term")


)
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/broad_synonym.owl#"
xml:base="http://purl.obolibrary.org/obo/broad_synonym.owl"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#">
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/broad_synonym.owl">
<oboInOwl:hasOBOFormatVersion>1.4</oboInOwl:hasOBOFormatVersion>
</owl:Ontology>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Annotation properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!-- http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym">
<rdfs:label>has_broad_synonym</rdfs:label>
</owl:AnnotationProperty>



<!-- http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion">
<rdfs:label>has_obo_format_version</rdfs:label>
</owl:AnnotationProperty>



<!-- http://www.geneontology.org/formats/oboInOwl#id -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#id"/>



<!-- http://www.w3.org/2000/01/rdf-schema#label -->

<owl:AnnotationProperty rdf:about="http://www.w3.org/2000/01/rdf-schema#label"/>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!-- http://purl.obolibrary.org/obo/X_1 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/X_1">
<oboInOwl:hasBroadSynonym>broad synonym</oboInOwl:hasBroadSynonym>
<oboInOwl:id>X:1</oboInOwl:id>
<rdfs:label>example term</rdfs:label>
</owl:Class>
</rdf:RDF>



<!-- Generated by the OWL API (version 4.5.25) https://github.com/owlcs/owlapi -->

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: broad_synonym
name: broad_synonym
description: Test for broad synonym type
8 changes: 8 additions & 0 deletions tests/input/obo-compliance/broad_synonym/broad_synonym.obo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
format-version: 1.4
ontology: broad_synonym

[Term]
id: X:1
name: example term
synonym: "broad synonym" BROAD []

Loading

0 comments on commit e4f8894

Please sign in to comment.