Skip to content

Commit e3fda59

Browse files
committed
added classes for most ISA types
1 parent c5e29e4 commit e3fda59

11 files changed

Lines changed: 297 additions & 64 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ isa-ro-crate:FindStudies a sh:NodeShape, validator:HiddenShape;
6464
sh:name "Identify Studies within the RO-Crate" ;
6565
sh:description "A Study has type Dataset and additionalType 'Study'." ;
6666
sh:targetClass schema:Dataset ;
67+
sh:order 1 ;
6768
# Expand data graph with triples from the file data entity
6869
sh:rule [
6970
a sh:TripleRule ;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ isa-ro-crate:FindAssays a sh:NodeShape, validator:HiddenShape;
5656
sh:name "Identify Assays within the RO-Crate" ;
5757
sh:description "An Assay has type Dataset and additionalType 'Assay'." ;
5858
sh:targetClass schema:Dataset ;
59+
sh:order 1 ;
5960
# Expand data graph with triples from the file data entity
6061
sh:rule [
6162
a sh:TripleRule ;

rocrate_validator/profiles/isa-ro-crate/3_process.ttl

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ isa-ro-crate:FindISAProcesses a sh:NodeShape, validator:HiddenShape;
2828
sh:name "Identify ISA processes within the RO-Crate" ;
2929
sh:description "A Process has type LabProcess and is attached to a Study or Assay." ;
3030
sh:targetClass bioschemas:LabProcess ;
31+
sh:order 2 ;
3132
# Expand data graph with triples from the file data entity
3233
sh:rule [
3334
a sh:TripleRule ;
@@ -38,18 +39,11 @@ isa-ro-crate:FindISAProcesses a sh:NodeShape, validator:HiddenShape;
3839
sh:condition [
3940
sh:property [
4041
sh:path [ sh:inversePath schema:about ] ;
41-
# sh:qualifiedValueShape [
42-
# sh:class isa-ro-crate:Assay
43-
# ] ;
4442
sh:qualifiedValueShape [
45-
sh:class schema:Dataset ;
46-
sh:property [
47-
sh:path schema:additionalType ;
48-
sh:or (
49-
[sh:hasValue "Study"]
50-
[sh:hasValue "Assay"]
51-
) ;
52-
] ;
43+
sh:or(
44+
[sh:class isa-ro-crate:Assay]
45+
[sh:class isa-ro-crate:Study]
46+
)
5347
] ;
5448
sh:qualifiedMinCount 1 ;
5549
] ;
@@ -60,6 +54,7 @@ isa-ro-crate:FindISAProcesses a sh:NodeShape, validator:HiddenShape;
6054
# isa-ro-crate:FindISAProcesses a sh:NodeShape, validator:HiddenShape;
6155
# sh:name "Identify ISA processes within the RO-Crate" ;
6256
# sh:description "A Process has type LabProcess and is attached to a Study or Assay." ;
57+
# sh:order 3 ;
6358
# sh:target [
6459
# a sh:SPARQLTarget ;
6560
# sh:select """

rocrate_validator/profiles/isa-ro-crate/4_protocol.ttl

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

27-
27+
isa-ro-crate:FindISAProtocols a sh:NodeShape, validator:HiddenShape;
28+
sh:name "Identify ISA protocols within the RO-Crate" ;
29+
sh:description "A Protocol has type LabProtocol and is attached to an ISA process." ;
30+
sh:targetClass bioschemas:LabProtocol ;
31+
sh:order 3 ;
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:Protocol ;
38+
# The condition: need to be attached to a Study or Assay
39+
sh:condition [
40+
sh:property [
41+
sh:path [ sh:inversePath bioschemas-prop:executesLabProtocol ] ;
42+
sh:qualifiedValueShape [
43+
sh:class isa-ro-crate:Process ;
44+
] ;
45+
sh:qualifiedMinCount 1 ;
46+
] ;
47+
] ;
48+
] ;
49+
.
2850

2951
# check protocol attributes must have correct types
3052

3153
isa-ro-crate:ProtocolShouldHaveNameOfCorrectType a sh:NodeShape ;
3254
sh:name "Protocol SHOULD have name" ;
3355
sh:description "A Protocol SHOULD have a name" ;
34-
sh:targetClass bioschemas:LabProtocol ;
56+
sh:targetClass isa-ro-crate:Protocol ;
3557
sh:property [
3658
a sh:PropertyShape ;
3759
sh:path schema:name ;
@@ -57,7 +79,7 @@ isa-ro-crate:ProtocolShouldHaveNameOfCorrectType a sh:NodeShape ;
5779
isa-ro-crate:ProtocolShouldHaveDescriptionOfCorrectType a sh:NodeShape ;
5880
sh:name "Protocol SHOULD have description" ;
5981
sh:description "A Protocol SHOULD have a description" ;
60-
sh:targetClass bioschemas:LabProtocol ;
82+
sh:targetClass isa-ro-crate:Protocol ;
6183
sh:property [
6284
a sh:PropertyShape ;
6385
sh:path schema:description ;
@@ -83,7 +105,7 @@ isa-ro-crate:ProtocolShouldHaveDescriptionOfCorrectType a sh:NodeShape ;
83105
isa-ro-crate:ProtocolShouldHaveIntendedUse a sh:NodeShape ;
84106
sh:name "Protocol SHOULD have intended use" ;
85107
sh:description "A Protocol SHOULD have an intended use" ;
86-
sh:targetClass bioschemas:LabProtocol ;
108+
sh:targetClass isa-ro-crate:Protocol ;
87109
sh:property [
88110
a sh:PropertyShape ;
89111
sh:path bioschemas-prop:intendedUse ;

rocrate_validator/profiles/isa-ro-crate/5_sample.ttl

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

27-
27+
isa-ro-crate:FindISASamples a sh:NodeShape, validator:HiddenShape;
28+
sh:name "Identify ISA samples within the RO-Crate" ;
29+
sh:description "A Sample has type Sample and is attached to an ISA process." ;
30+
sh:targetClass bioschemas:Sample ;
31+
sh:order 3 ;
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:Sample ;
38+
# The condition: need to be attached to a Study or Assay
39+
sh:condition [
40+
a sh:NodeShape ;
41+
sh:name "Sample is attached to a process" ;
42+
sh:or(
43+
[
44+
sh:property [
45+
sh:path [ sh:inversePath schema:object ] ;
46+
sh:qualifiedValueShape [
47+
sh:class isa-ro-crate:Process
48+
] ;
49+
sh:qualifiedMinCount 1 ;
50+
]
51+
]
52+
[
53+
sh:property [
54+
sh:path [ sh:inversePath schema:result ] ;
55+
sh:qualifiedValueShape [
56+
sh:class isa-ro-crate:Process
57+
] ;
58+
sh:qualifiedMinCount 1 ;
59+
]
60+
]
61+
) ;
62+
] ;
63+
] ;
64+
.
2865

2966
# check Sample attributes must have correct types
3067

3168
isa-ro-crate:SampledMustHaveName a sh:NodeShape ;
3269
sh:name "Sample MUST have name" ;
3370
sh:description "A Sample MUST have a name" ;
34-
sh:targetClass bioschemas:Sample ;
71+
sh:targetClass isa-ro-crate:Sample ;
3572
sh:property [
3673
a sh:PropertyShape ;
3774
sh:path schema:name ;
@@ -50,7 +87,7 @@ isa-ro-crate:SampledMustHaveName a sh:NodeShape ;
5087
isa-ro-crate:SampleShouldHaveAdditionalPropertyOfCorrectType a sh:NodeShape ;
5188
sh:name "Sample SHOULD have additional properties" ;
5289
sh:description "A Sample SHOULD have at least one additional property" ;
53-
sh:targetClass bioschemas:Sample ;
90+
sh:targetClass isa-ro-crate:Sample ;
5491
sh:property [
5592
a sh:PropertyShape ;
5693
sh:path bioschemas-prop:additionalProperty ;

rocrate_validator/profiles/isa-ro-crate/6_data.ttl

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

27-
27+
isa-ro-crate:FindISAFiles a sh:NodeShape, validator:HiddenShape;
28+
sh:name "Identify ISA files within the RO-Crate" ;
29+
sh:description "A data file has type File/MediaObject and is attached to an ISA Study or Assay." ;
30+
sh:targetClass schema:MediaObject ;
31+
sh:order 2 ;
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:Data ;
38+
# The condition: need to be attached to a Study or Assay
39+
sh:condition [
40+
sh:property [
41+
sh:path [ sh:inversePath schema:hasPart ] ;
42+
sh:qualifiedValueShape [
43+
sh:or(
44+
[sh:class isa-ro-crate:Assay]
45+
[sh:class isa-ro-crate:Study]
46+
)
47+
] ;
48+
sh:qualifiedMinCount 1 ;
49+
] ;
50+
] ;
51+
] ;
52+
.
2853

2954
# check File attributes must have correct types
3055

3156
isa-ro-crate:FileMustHaveName a sh:NodeShape ;
3257
sh:name "File MUST have name" ;
3358
sh:description "A File MUST have a name" ;
34-
sh:targetClass schema:MediaObject ;
59+
sh:targetClass isa-ro-crate:Data ;
3560
sh:property [
3661
a sh:PropertyShape ;
3762
sh:path schema:name ;

rocrate_validator/profiles/isa-ro-crate/7_person.ttl

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

27-
27+
isa-ro-crate:FindISAPerson a sh:NodeShape, validator:HiddenShape;
28+
sh:name "Identify ISA persons within the RO-Crate" ;
29+
sh:description "A Person has type Person and is attached to an Investigation, Study, Assay, Process, or Article." ;
30+
sh:targetClass schema:Person ;
31+
sh:order 3 ;
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:Person ;
38+
# The condition: need to be attached to a Study or Assay
39+
sh:condition [
40+
a sh:NodeShape;
41+
sh:name: "Person is attached to an Investigation, Study, Assay, Process, or Article" ;
42+
sh:or (
43+
[
44+
sh:property [
45+
sh:name "Person is creator of a Study, Assay, or RootDataEntity" ;
46+
sh:path [ sh:inversePath schema:creator ] ;
47+
sh:qualifiedValueShape [
48+
sh:or(
49+
[sh:class isa-ro-crate:Assay]
50+
[sh:class isa-ro-crate:Study]
51+
[sh:class ro-crate:RootDataEntity]
52+
)
53+
] ;
54+
sh:qualifiedMinCount 1 ;
55+
]
56+
]
57+
[
58+
sh:property [
59+
sh:name "Person is author of an Article" ;
60+
sh:path [ sh:inversePath schema:author ] ;
61+
sh:qualifiedValueShape [
62+
sh:class isa-ro-crate:Article
63+
] ;
64+
sh:qualifiedMinCount 1 ;
65+
]
66+
]
67+
[
68+
sh:property [
69+
sh:name "Person is agent of a Process" ;
70+
sh:path [ sh:inversePath schema:agent ] ;
71+
sh:qualifiedValueShape [
72+
sh:class isa-ro-crate:Process
73+
] ;
74+
sh:qualifiedMinCount 1 ;
75+
]
76+
]
77+
) ;
78+
] ;
79+
] ;
80+
.
2881

2982
# check Person attributes must have correct types
3083

3184
isa-ro-crate:PersonMustHaveGivenName a sh:NodeShape ;
3285
sh:name "Person MUST have a given name" ;
3386
sh:description "A Person MUST have a given name" ;
34-
sh:targetClass schema:Person ;
87+
sh:targetClass isa-ro-crate:Person ;
3588
sh:property [
3689
a sh:PropertyShape ;
3790
sh:path schema:givenName ;
@@ -50,7 +103,7 @@ isa-ro-crate:PersonMustHaveGivenName a sh:NodeShape ;
50103
isa-ro-crate:PersonShouldHaveAffiliationOfCorrectType a sh:NodeShape ;
51104
sh:name "Person SHOULD have affiliation" ;
52105
sh:description "A Person SHOULD have at least one affiliation" ;
53-
sh:targetClass schema:Person ;
106+
sh:targetClass isa-ro-crate:Person ;
54107
sh:property [
55108
a sh:PropertyShape ;
56109
sh:path schema:affiliation ;
@@ -72,7 +125,7 @@ isa-ro-crate:PersonShouldHaveAffiliationOfCorrectType a sh:NodeShape ;
72125
isa-ro-crate:PersonShouldHaveJobTitleOfCorrectType a sh:NodeShape ;
73126
sh:name "Person SHOULD have job title" ;
74127
sh:description "A Person SHOULD have at least one job title" ;
75-
sh:targetClass schema:Person ;
128+
sh:targetClass isa-ro-crate:Person ;
76129
sh:property [
77130
a sh:PropertyShape ;
78131
sh:path schema:jobTitle ;
@@ -94,7 +147,7 @@ isa-ro-crate:PersonShouldHaveJobTitleOfCorrectType a sh:NodeShape ;
94147
isa-ro-crate:PersonShouldHaveEmailOfCorrectType a sh:NodeShape ;
95148
sh:name "Person SHOULD have email" ;
96149
sh:description "A Person SHOULD have at least one email" ;
97-
sh:targetClass schema:Person ;
150+
sh:targetClass isa-ro-crate:Person ;
98151
sh:property [
99152
a sh:PropertyShape ;
100153
sh:path schema:email ;
@@ -119,7 +172,7 @@ isa-ro-crate:PersonShouldHaveEmailOfCorrectType a sh:NodeShape ;
119172
isa-ro-crate:PersonShouldHaveFamilyNameOfCorrectType a sh:NodeShape ;
120173
sh:name "Person SHOULD have family name" ;
121174
sh:description "A Person SHOULD have at least one family name" ;
122-
sh:targetClass schema:Person ;
175+
sh:targetClass isa-ro-crate:Person ;
123176
sh:property [
124177
a sh:PropertyShape ;
125178
sh:path schema:familyName ;
@@ -144,7 +197,7 @@ isa-ro-crate:PersonShouldHaveFamilyNameOfCorrectType a sh:NodeShape ;
144197
isa-ro-crate:PersonShouldHaveIdentifierOfCorrectType a sh:NodeShape ;
145198
sh:name "Person SHOULD have identifier" ;
146199
sh:description "A Person SHOULD have at least one identifier" ;
147-
sh:targetClass schema:Person ;
200+
sh:targetClass isa-ro-crate:Person ;
148201
sh:property [
149202
a sh:PropertyShape ;
150203
sh:path schema:identifier ;

rocrate_validator/profiles/isa-ro-crate/8_article.ttl

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

27+
isa-ro-crate:FindISAPublication a sh:NodeShape, validator:HiddenShape;
28+
sh:name "Identify ISA publications within the RO-Crate" ;
29+
sh:description "A Publication has type ScholarlyArticle and is attached to a Study or Assay." ;
30+
sh:targetClass schema:ScholarlyArticle ;
31+
sh:order 2 ;
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:Article ;
38+
# The condition: need to be attached to a Study or Assay
39+
sh:condition [
40+
sh:property [
41+
sh:path [ sh:inversePath schema:citation ] ;
42+
sh:qualifiedValueShape [
43+
sh:or(
44+
[sh:class ro-crate:RootDataEntity]
45+
[sh:class isa-ro-crate:Study]
46+
)
47+
] ;
48+
sh:qualifiedMinCount 1 ;
49+
] ;
50+
] ;
51+
];
52+
.
53+
2754

2855
isa-ro-crate:ArticleMustHaveHeadline a sh:NodeShape ;
2956
sh:name "Article MUST have a headline" ;
3057
sh:description "An Article MUST have a headline" ;
31-
sh:targetClass schema:ScholarlyArticle ;
58+
sh:targetClass isa-ro-crate:Article ;
3259
sh:property [
3360
a sh:PropertyShape ;
3461
sh:path schema:headline ;
@@ -47,7 +74,7 @@ isa-ro-crate:ArticleMustHaveHeadline a sh:NodeShape ;
4774
isa-ro-crate:ArticleMustHaveIdentifier a sh:NodeShape ;
4875
sh:name "Article MUST have an identifier" ;
4976
sh:description "An Article MUST have an identifier" ;
50-
sh:targetClass schema:ScholarlyArticle ;
77+
sh:targetClass isa-ro-crate:Article ;
5178
sh:property [
5279
a sh:PropertyShape ;
5380
sh:path schema:identifier ;
@@ -69,7 +96,7 @@ isa-ro-crate:ArticleMustHaveIdentifier a sh:NodeShape ;
6996
isa-ro-crate:ArticleShouldHaveAuthorOfCorrectType a sh:NodeShape ;
7097
sh:name "Article SHOULD have author" ;
7198
sh:description "An Article SHOULD have at least one author" ;
72-
sh:targetClass schema:ScholarlyArticle ;
99+
sh:targetClass isa-ro-crate:Article ;
73100
sh:property [
74101
a sh:PropertyShape ;
75102
sh:path schema:author ;

0 commit comments

Comments
 (0)