Skip to content

Commit dd538b9

Browse files
authored
Merge pull request crs4#175 from nfdi4plants/process-fix
ISA profile update
2 parents fd39545 + 31caaa4 commit dd538b9

20 files changed

Lines changed: 785 additions & 110 deletions

rocrate_validator/profiles/isa-ro-crate/10_definedterm.ttl

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,111 @@
2424
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
2525
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2626

27+
isa-ro-crate:FindISAOntologyAnnotation a sh:NodeShape, validator:HiddenShape;
28+
sh:name "Identify ISA OntologyAnnotations within the RO-Crate" ;
29+
sh:description "An OntologyAnnotation has type DefinedTerm and is attached to an Assay, Protocol, Person, or Article." ;
30+
sh:targetClass schema:DefinedTerm ;
31+
sh:order 4 ;
32+
# Expand data graph with triples from the file data entity
33+
sh:rule [
34+
a sh:TripleRule ;
35+
sh:subject sh:this ;
36+
sh:predicate rdf:type ;
37+
sh:object isa-ro-crate:OntologyAnnotation ;
38+
# The condition: need to be attached to a Assay, Protocol, Person, or Article
39+
sh:condition [
40+
a sh:NodeShape;
41+
sh:name: "OntologyAnnotation is attached to an Assay, Protocol, Person, or Article" ;
42+
sh:or (
43+
[
44+
sh:property [
45+
sh:name "OntologyAnnotation is measurementMethod of an Assay" ;
46+
sh:path [ sh:inversePath schema:measurementMethod ] ;
47+
sh:qualifiedValueShape [
48+
sh:class isa-ro-crate:Assay ;
49+
] ;
50+
sh:qualifiedMinCount 1 ;
51+
]
52+
]
53+
[
54+
sh:property [
55+
sh:name "OntologyAnnotation is measurementTechnique of an Assay" ;
56+
sh:path [ sh:inversePath schema:measurementTechnique ] ;
57+
sh:qualifiedValueShape [
58+
sh:class isa-ro-crate:Assay
59+
] ;
60+
sh:qualifiedMinCount 1 ;
61+
]
62+
]
63+
[
64+
sh:property [
65+
sh:name "OntologyAnnotation is intendedUse of a Protocol" ;
66+
sh:path [ sh:inversePath schema:intendedUse ] ;
67+
sh:qualifiedValueShape [
68+
sh:class isa-ro-crate:Protocol
69+
] ;
70+
sh:qualifiedMinCount 1 ;
71+
]
72+
]
73+
[
74+
sh:property [
75+
sh:name "OntologyAnnotation is computationalTool of a Protocol" ;
76+
sh:path [ sh:inversePath schema:computationalTool ] ;
77+
sh:qualifiedValueShape [
78+
sh:class isa-ro-crate:Protocol
79+
] ;
80+
sh:qualifiedMinCount 1 ;
81+
]
82+
]
83+
[
84+
sh:property [
85+
sh:name "OntologyAnnotation is labEquipment of a Protocol" ;
86+
sh:path [ sh:inversePath schema:labEquipment ] ;
87+
sh:qualifiedValueShape [
88+
sh:class isa-ro-crate:Protocol
89+
] ;
90+
sh:qualifiedMinCount 1 ;
91+
]
92+
]
93+
[
94+
sh:property [
95+
sh:name "OntologyAnnotation is reagent of a Protocol" ;
96+
sh:path [ sh:inversePath schema:reagent ] ;
97+
sh:qualifiedValueShape [
98+
sh:class isa-ro-crate:Protocol
99+
] ;
100+
sh:qualifiedMinCount 1 ;
101+
]
102+
]
103+
[
104+
sh:property [
105+
sh:name "OntologyAnnotation is job title of a Person" ;
106+
sh:path [ sh:inversePath schema:jobTitle ] ;
107+
sh:qualifiedValueShape [
108+
sh:class isa-ro-crate:Person
109+
] ;
110+
sh:qualifiedMinCount 1 ;
111+
]
112+
]
113+
[
114+
sh:property [
115+
sh:name "OntologyAnnotation is status of a Publication" ;
116+
sh:path [ sh:inversePath schema:creativeWorkStatus ] ;
117+
sh:qualifiedValueShape [
118+
sh:class isa-ro-crate:Publication
119+
] ;
120+
sh:qualifiedMinCount 1 ;
121+
]
122+
]
123+
) ;
124+
] ;
125+
] ;
126+
.
27127

28128
isa-ro-crate:DefinedTermMustHaveName a sh:NodeShape ;
29129
sh:name "DefinedTerm MUST have a name" ;
30130
sh:description "A DefinedTerm MUST have a name" ;
31-
sh:targetClass schema:DefinedTerm ;
131+
sh:targetClass isa-ro-crate:OntologyAnnotation ;
32132
sh:property [
33133
a sh:PropertyShape ;
34134
sh:path schema:name ;
@@ -47,7 +147,7 @@ isa-ro-crate:DefinedTermMustHaveName a sh:NodeShape ;
47147
isa-ro-crate:DefinedTermShouldHaveTermCodeOfCorrectType a sh:NodeShape ;
48148
sh:name "DefinedTerm SHOULD have termCode of correct type" ;
49149
sh:description "A DefinedTerm SHOULD have at least one termCode of correct type" ;
50-
sh:targetClass schema:DefinedTerm ;
150+
sh:targetClass isa-ro-crate:OntologyAnnotation ;
51151
sh:property [
52152
a sh:PropertyShape ;
53153
sh:path schema:termCode ;

rocrate_validator/profiles/isa-ro-crate/11_propertyvalue.ttl

Lines changed: 103 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,111 @@
2424
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
2525
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2626

27+
isa-ro-crate:FindISAPropertyValue a sh:NodeShape, validator:HiddenShape;
28+
sh:name "Identify ISA PropertyValues within the RO-Crate" ;
29+
sh:description "An ISA PropertyValue has type PropertyValue and is attached to an Assay, Process, Protocol, Sample, Person, or Article." ;
30+
sh:targetClass schema:PropertyValue ;
31+
sh:order 4 ;
32+
# Expand data graph with triples from the file data entity
33+
sh:rule [
34+
a sh:TripleRule ;
35+
sh:subject sh:this ;
36+
sh:predicate rdf:type ;
37+
sh:object isa-ro-crate:PropertyValue ;
38+
# The condition: need to be attached to a Assay, Process, Protocol, Sample, Person, or Article
39+
sh:condition [
40+
a sh:NodeShape;
41+
sh:name: "PropertyValue is attached to an Assay, Process, Protocol, Sample, Person, or Article" ;
42+
sh:or (
43+
[
44+
sh:property [
45+
sh:name "PropertyValue is measurementMethod of an Assay" ;
46+
sh:path [ sh:inversePath schema:variableMeasured ] ;
47+
sh:qualifiedValueShape [
48+
sh:class isa-ro-crate:Assay ;
49+
] ;
50+
sh:qualifiedMinCount 1 ;
51+
]
52+
]
53+
[
54+
sh:property [
55+
sh:name "PropertyValue is parameterValue of a Process" ;
56+
sh:path [ sh:inversePath bioschemas-prop:parameterValue ] ;
57+
sh:qualifiedValueShape [
58+
sh:class isa-ro-crate:Process
59+
] ;
60+
sh:qualifiedMinCount 1 ;
61+
]
62+
]
63+
[
64+
sh:property [
65+
sh:name "PropertyValue is computationalTool of a Protocol" ;
66+
sh:path [ sh:inversePath schema:computationalTool ] ;
67+
sh:qualifiedValueShape [
68+
sh:class isa-ro-crate:Protocol
69+
] ;
70+
sh:qualifiedMinCount 1 ;
71+
]
72+
]
73+
[
74+
sh:property [
75+
sh:name "PropertyValue is labEquipment of a Protocol" ;
76+
sh:path [ sh:inversePath schema:labEquipment ] ;
77+
sh:qualifiedValueShape [
78+
sh:class isa-ro-crate:Protocol
79+
] ;
80+
sh:qualifiedMinCount 1 ;
81+
]
82+
]
83+
[
84+
sh:property [
85+
sh:name "PropertyValue is reagent of a Protocol" ;
86+
sh:path [ sh:inversePath schema:reagent ] ;
87+
sh:qualifiedValueShape [
88+
sh:class isa-ro-crate:Protocol
89+
] ;
90+
sh:qualifiedMinCount 1 ;
91+
]
92+
]
93+
[
94+
sh:property [
95+
sh:name "PropertyValue is characteristic of a Sample" ;
96+
sh:path [ sh:inversePath bioschemas-prop:additionalProperty ] ;
97+
sh:qualifiedValueShape [
98+
sh:class isa-ro-crate:Sample
99+
] ;
100+
sh:qualifiedMinCount 1 ;
101+
]
102+
]
103+
[
104+
sh:property [
105+
sh:name "PropertyValue is identifier of a Person" ;
106+
sh:path [ sh:inversePath schema:identifier ] ;
107+
sh:qualifiedValueShape [
108+
sh:class isa-ro-crate:Person
109+
] ;
110+
sh:qualifiedMinCount 1 ;
111+
]
112+
]
113+
[
114+
sh:property [
115+
sh:name "PropertyValue is identifier of a Publication" ;
116+
sh:path [ sh:inversePath schema:identifier ] ;
117+
sh:qualifiedValueShape [
118+
sh:class isa-ro-crate:Publication
119+
] ;
120+
sh:qualifiedMinCount 1 ;
121+
]
122+
]
123+
) ;
124+
] ;
125+
] ;
126+
.
27127

28128
ro-crate:FindPropertyValueSubtypes a sh:NodeShape, validator:HiddenShape;
29129
sh:name "Identify PropertyValue subtypes within the RO-Crate" ;
30130
sh:description "A PropertyValue has type Parameter, Characteristic, Factor or Component if additionalType is set accordingly." ;
31-
sh:targetClass schema:PropertyValue ;
131+
sh:targetClass isa-ro-crate:PropertyValue ;
32132
# Expand data graph with triples from the file data entity
33133
sh:rule [
34134
a sh:TripleRule ;
@@ -87,7 +187,7 @@ ro-crate:FindPropertyValueSubtypes a sh:NodeShape, validator:HiddenShape;
87187
isa-ro-crate:PropertyValueMustHaveName a sh:NodeShape ;
88188
sh:name "PropertyValue MUST have a name" ;
89189
sh:description "A PropertyValue MUST have a name" ;
90-
sh:targetClass schema:PropertyValue ;
190+
sh:targetClass isa-ro-crate:PropertyValue ;
91191
sh:property [
92192
a sh:PropertyShape ;
93193
sh:path schema:name ;
@@ -106,7 +206,7 @@ isa-ro-crate:PropertyValueMustHaveName a sh:NodeShape ;
106206
isa-ro-crate:PropertyValueShouldHaveValueOfCorrectType a sh:NodeShape ;
107207
sh:name "PropertyValue SHOULD have value of correct type" ;
108208
sh:description "A PropertyValue SHOULD have at least one value of correct type" ;
109-
sh:targetClass schema:PropertyValue ;
209+
sh:targetClass isa-ro-crate:PropertyValue ;
110210
sh:property [
111211
a sh:PropertyShape ;
112212
sh:path schema:value ;

rocrate_validator/profiles/isa-ro-crate/1_study.ttl

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -23,47 +23,11 @@
2323
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
2424
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2525

26-
# class:study
27-
# isTypeDataset
28-
# isAdditionalType"Study
29-
30-
31-
# check study must have identifier
32-
# check study must have name
33-
# check study must have description
34-
# check study should have about
35-
36-
# check study must be pointed to by investigation through hasPart
37-
38-
# # Find studies and add isa-ro-crate:Study type to them, for easier retrieval for checks
39-
# ro-crate:FindStudies a sh:NodeShape, validator:HiddenShape;
40-
# sh:name "Identify Studies within the RO-Crate" ;
41-
# sh:description "A Study has type Dataset and additionalType 'Study'." ;
42-
# sh:target [
43-
# a sh:SPARQLTarget ;
44-
# sh:prefixes ro-crate:sparqlPrefixes ;
45-
# sh:select """
46-
# SELECT ?this
47-
# WHERE {
48-
# ?this a schema:Dataset .
49-
# ?this schema:additionalType "Study" .
50-
# }
51-
# """
52-
# ] ;
53-
54-
# # Expand data graph with triples from the file data entity
55-
# sh:rule [
56-
# a sh:TripleRule ;
57-
# sh:subject sh:this ;
58-
# sh:predicate rdf:type ;
59-
# sh:object isa-ro-crate:Study ;
60-
# ] .
61-
62-
# Find studies and add isa-ro-crate:Study type to them, for easier retrieval for checks
63-
ro-crate:FindStudies a sh:NodeShape, validator:HiddenShape;
26+
isa-ro-crate:FindStudies a sh:NodeShape, validator:HiddenShape;
6427
sh:name "Identify Studies within the RO-Crate" ;
6528
sh:description "A Study has type Dataset and additionalType 'Study'." ;
6629
sh:targetClass schema:Dataset ;
30+
sh:order 1 ;
6731
# Expand data graph with triples from the file data entity
6832
sh:rule [
6933
a sh:TripleRule ;
@@ -80,7 +44,6 @@ ro-crate:FindStudies a sh:NodeShape, validator:HiddenShape;
8044
]
8145
.
8246

83-
# WIP
8447
isa-ro-crate:StudyMustHaveBaseDescriptors a sh:NodeShape ;
8548
sh:name "Study MUST have base properties" ;
8649
sh:description "A Study MUST have identifier, name and description" ;

rocrate_validator/profiles/isa-ro-crate/2_assay.ttl

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,11 @@
2323
@prefix validator: <https://github.com/crs4/rocrate-validator/> .
2424
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
2525

26-
27-
# check assay must have name
28-
29-
# check assay must be pointed to by investigation through hasPart
30-
31-
# Find assays and add isa-ro-crate:Assay type to them, for easier retrieval for checks
32-
# ro-crate:FindAssays a sh:NodeShape, validator:HiddenShape;
33-
# sh:name "Identify Assays within the RO-Crate" ;
34-
# sh:description "An Assay has type Dataset and additionalType 'Assay'." ;
35-
# sh:target [
36-
# a sh:SPARQLTarget ;
37-
# sh:prefixes ro-crate:sparqlPrefixes ;
38-
# sh:select """
39-
# SELECT ?this
40-
# WHERE {
41-
# ?this a schema:Dataset .
42-
# ?this schema:additionalType "Assay" .
43-
# }
44-
# """
45-
# ] ;
46-
47-
# # Expand data graph with triples from the file data entity
48-
# sh:rule [
49-
# a sh:TripleRule ;
50-
# sh:subject sh:this ;
51-
# sh:predicate rdf:type ;
52-
# sh:object isa-ro-crate:Assay ;
53-
# ] .
54-
55-
ro-crate:FindAssays a sh:NodeShape, validator:HiddenShape;
26+
isa-ro-crate:FindAssays a sh:NodeShape, validator:HiddenShape;
5627
sh:name "Identify Assays within the RO-Crate" ;
5728
sh:description "An Assay has type Dataset and additionalType 'Assay'." ;
5829
sh:targetClass schema:Dataset ;
30+
sh:order 1 ;
5931
# Expand data graph with triples from the file data entity
6032
sh:rule [
6133
a sh:TripleRule ;
@@ -72,7 +44,6 @@ ro-crate:FindAssays a sh:NodeShape, validator:HiddenShape;
7244
]
7345
.
7446

75-
# WIP
7647
isa-ro-crate:AssayMustHaveBaseDescriptors a sh:NodeShape ;
7748
sh:name "Assay MUST have base properties" ;
7849
sh:description "An Assay MUST have identifier" ;

0 commit comments

Comments
 (0)