Skip to content

Commit

Permalink
Added first validation of enzymes
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Dec 20, 2023
1 parent cb162dc commit 28980d8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/GroovyScriptTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:

- name: Generate the Shex validation reports
run: |
groovy validate.groovy
groovy validate.groovy InteractionData http://vocabularies.wikipathways.org/wp#InteractionData
groovy validate.groovy Enzyme http://vocabularies.wikipathways.org/wp#Protein
15 changes: 15 additions & 0 deletions shapes/Enzyme.shex
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
BASE <http://bigcat-um.github.io/KinRDF/shapes#>
PREFIX : <http://bigcat-um.github.io/KinRDF/shapes#>

PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sbd: <https://www.sbd4nano.eu/rdf/#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
PREFIX sio: <http://semanticscience.org/resource/>

:Enzyme {
a [ wp:Protein ]
}
5 changes: 5 additions & 0 deletions shapes/InteractionData.shex
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ PREFIX sio: <http://semanticscience.org/resource/>
a [ wp:InteractionData ] ;
dc:identifier IRI {1} ;
sio:SIO_000008 IRI {1} ;
sio:SIO_000028 @:Enzyme {1} ;
sio:SIO_000028 IRI +
}

:Enzyme {
a [ wp:Protein ]
}
5 changes: 3 additions & 2 deletions validate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ workspaceRoot = "."
rdf = new net.bioclipse.managers.RDFManager(workspaceRoot);

file = "/Output/RDF_Kin_Data_2022-Dec.ttl"
clazz = "InteractionData"
clazz = args[0]
type = args[1]

store = rdf.createInMemoryStore(true);
store = rdf.importFile(store, "${file}", "TURTLE")
report = rdf.validateAllOfType(
store,
"/shapes/${clazz}.shex",
"http://bigcat-um.github.io/KinRDF/shapes#${clazz}",
"http://vocabularies.wikipathways.org/wp#${clazz}"
"${type}"
)

println "{"
Expand Down

0 comments on commit 28980d8

Please sign in to comment.