gem-mapping-studio 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,387 @@
1
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
2
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
5
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
6
+ @prefix gem: <https://w3id.org/genetic-evidence-model/> .
7
+
8
+ # =====================================================================
9
+ # SHACL shapes for the Genetic Evidence Model
10
+ #
11
+ # Schema version: 1.1
12
+ # (1.1 adds enforceable shapes for resolution, credibility, and a
13
+ # mandatory source_span, enum value sets for the categorical
14
+ # conditional dimensions, and the not_applicable_or_omitted sentinel;
15
+ # 1.0 shaped only knowledge_domain, method, target_type, phenotype_scale.)
16
+ #
17
+ # This file encodes (a) the top-level class hierarchy, (b) the
18
+ # dimension enumerations, (c) the always-required and conditional
19
+ # dimension shapes, and (d) the mandatory source_span on every
20
+ # assertion. Every released annotation validates against it
21
+ # (scripts/validate_annotations.py, run in CI). Remaining open shapes
22
+ # (an organism vocabulary; reviewer-flag fields) are noted in
23
+ # schema/examples.md.
24
+ #
25
+ # Namespace note: `gem:` is a placeholder. Register a persistent
26
+ # w3id redirect before the paper goes to camera-ready.
27
+ # =====================================================================
28
+
29
+ # ---------- top-level classes ----------
30
+
31
+ gem:ScientificEvidence a rdfs:Class .
32
+ gem:EvidenceVariable a rdfs:Class .
33
+ gem:EvidenceAssertion a rdfs:Class .
34
+
35
+ gem:GeneticEvidence rdfs:subClassOf gem:ScientificEvidence .
36
+ gem:GeneticEvidenceVariable rdfs:subClassOf gem:EvidenceVariable .
37
+ gem:GeneticEvidenceAssertion rdfs:subClassOf gem:EvidenceAssertion .
38
+
39
+ # ---------- enumeration of knowledge domain values ----------
40
+
41
+ gem:KnowledgeDomain a rdfs:Class .
42
+ gem:HUMAN_GENETICS a gem:KnowledgeDomain .
43
+ gem:ANIMAL_GENETICS a gem:KnowledgeDomain .
44
+ gem:POPULATION_GENETICS a gem:KnowledgeDomain .
45
+ gem:COMPARATIVE_GENOMICS a gem:KnowledgeDomain .
46
+ gem:EPIGENETICS a gem:KnowledgeDomain .
47
+ gem:GENE_FUNCTION a gem:KnowledgeDomain .
48
+ gem:MODEL_ORGANISM a gem:KnowledgeDomain .
49
+
50
+ # ---------- enumeration of method values (hierarchical) ----------
51
+ #
52
+ # The method dimension is hierarchical; see schema/dimensions.md for the
53
+ # human-readable terms table and `is_a` relations. Each term is declared as
54
+ # an instance of gem:Method so that it satisfies the `sh:class gem:Method`
55
+ # constraint when used as a method value. The OBO-style `is_a` hierarchy is
56
+ # encoded with rdfs:subClassOf (subject is_a object), which lifts directly to
57
+ # OWL when the schema is rendered as an ontology (future work). Terms are thus
58
+ # punned: an instance of gem:Method (for enumeration membership) and a class
59
+ # (for the subsumption hierarchy).
60
+
61
+ gem:Method a rdfs:Class .
62
+
63
+ # top-level families (no parent)
64
+ gem:STATISTICAL_GENETICS a gem:Method .
65
+ gem:EXPERIMENT a gem:Method .
66
+ gem:BIOINFORMATICS_INFERENCE a gem:Method .
67
+ gem:CLINICAL_EVIDENCE a gem:Method .
68
+
69
+ # STATISTICAL_GENETICS subtree
70
+ gem:ASSOCIATION_STUDY a gem:Method ; rdfs:subClassOf gem:STATISTICAL_GENETICS .
71
+ gem:GWAS a gem:Method ; rdfs:subClassOf gem:ASSOCIATION_STUDY .
72
+ gem:CANDIDATE_GENE_STUDY a gem:Method ; rdfs:subClassOf gem:ASSOCIATION_STUDY .
73
+ gem:FINE_MAPPING a gem:Method ; rdfs:subClassOf gem:ASSOCIATION_STUDY .
74
+ gem:FAMILY_BASED a gem:Method ; rdfs:subClassOf gem:STATISTICAL_GENETICS .
75
+ gem:LINKAGE_ANALYSIS a gem:Method ; rdfs:subClassOf gem:FAMILY_BASED .
76
+ gem:TRANSMISSION_DISEQUILIBRIUM_TEST a gem:Method ; rdfs:subClassOf gem:FAMILY_BASED .
77
+ gem:SEGREGATION_ANALYSIS a gem:Method ; rdfs:subClassOf gem:FAMILY_BASED .
78
+ gem:META_ANALYSIS a gem:Method ; rdfs:subClassOf gem:STATISTICAL_GENETICS .
79
+
80
+ # EXPERIMENT subtree
81
+ gem:IN_VIVO a gem:Method ; rdfs:subClassOf gem:EXPERIMENT .
82
+ gem:IN_VITRO a gem:Method ; rdfs:subClassOf gem:EXPERIMENT .
83
+ gem:IN_SILICO a gem:Method ; rdfs:subClassOf gem:EXPERIMENT .
84
+
85
+ # Legacy synonyms, retained so existing annotations validate. Migration to
86
+ # the renamed values is deferred (see notes/ROADMAP.md §1.b and the
87
+ # "Backward compatibility" note in dimensions.md).
88
+ gem:IN_VIVO_EXPERIMENT a gem:Method ; owl:sameAs gem:IN_VIVO .
89
+ gem:IN_VITRO_EXPERIMENT a gem:Method ; owl:sameAs gem:IN_VITRO .
90
+ gem:BIOINFORMATICS_PREDICTION a gem:Method ; owl:sameAs gem:BIOINFORMATICS_INFERENCE .
91
+
92
+ # Removed in this revision (never exercised by any annotation). Their content
93
+ # is recovered in knowledge_domain (POPULATION_GENETICS / EPIGENETICS):
94
+ # gem:POPULATION_DATA a gem:Method .
95
+ # gem:EPIGENETICS_DATA a gem:Method .
96
+
97
+ # ---------- enumeration of target-type values ----------
98
+
99
+ gem:TargetType a rdfs:Class .
100
+ gem:GENE a gem:TargetType .
101
+ gem:RELATED_GENE a gem:TargetType .
102
+ gem:VARIANT a gem:TargetType .
103
+ gem:SEGMENT a gem:TargetType .
104
+ gem:INTERVAL a gem:TargetType .
105
+ gem:TRANSCRIPT a gem:TargetType .
106
+ # Candidate extensions (not yet promoted; require second paper confirmation):
107
+ # gem:INTERACTION a gem:TargetType . (source: Jossin 2017)
108
+ # gem:COMPLEX a gem:TargetType . (source: Jossin 2017)
109
+
110
+ # ---------- enumeration of phenotype_scale values (PROMOTED) ----------
111
+
112
+ gem:PhenotypeScale a rdfs:Class .
113
+ gem:MOLECULAR a gem:PhenotypeScale .
114
+ gem:CELLULAR a gem:PhenotypeScale .
115
+ gem:HISTOLOGICAL a gem:PhenotypeScale .
116
+ gem:ORGANISMAL a gem:PhenotypeScale .
117
+ gem:CLINICAL a gem:PhenotypeScale .
118
+
119
+ # ---------- enumeration of variant_ascertainment values (PROMOTED) ----------
120
+
121
+ gem:VariantAscertainment a rdfs:Class .
122
+ gem:OBSERVED_IN_CASES a gem:VariantAscertainment .
123
+ gem:OBSERVED_IN_CONTROLS a gem:VariantAscertainment .
124
+ gem:FROM_DATABASE a gem:VariantAscertainment .
125
+ gem:SYNTHETIC a gem:VariantAscertainment .
126
+
127
+ # ---------- base shape: every GeneticEvidence requires these ----------
128
+
129
+ gem:GeneticEvidenceShape
130
+ a sh:NodeShape ;
131
+ sh:targetClass gem:GeneticEvidence ;
132
+
133
+ # knowledge_domain: required, at least one value, must be from the
134
+ # enumeration.
135
+ sh:property [
136
+ sh:path gem:knowledgeDomain ;
137
+ sh:minCount 1 ;
138
+ sh:class gem:KnowledgeDomain ;
139
+ sh:message "GeneticEvidence must declare at least one knowledge_domain from the enumeration."
140
+ ] ;
141
+
142
+ # method: required, at least one value, must be from the enumeration.
143
+ sh:property [
144
+ sh:path gem:method ;
145
+ sh:minCount 1 ;
146
+ sh:class gem:Method ;
147
+ sh:message "GeneticEvidence must declare at least one method from the enumeration."
148
+ ] ;
149
+
150
+ # target_type: required, exactly one value.
151
+ sh:property [
152
+ sh:path gem:targetType ;
153
+ sh:minCount 1 ;
154
+ sh:maxCount 1 ;
155
+ sh:class gem:TargetType ;
156
+ sh:message "GeneticEvidence must declare exactly one target_type."
157
+ ] ;
158
+
159
+ # phenotype_scale: required, exactly one value (PROMOTED dimension).
160
+ sh:property [
161
+ sh:path gem:phenotypeScale ;
162
+ sh:minCount 1 ;
163
+ sh:maxCount 1 ;
164
+ sh:class gem:PhenotypeScale ;
165
+ sh:message "GeneticEvidence must declare exactly one phenotype_scale."
166
+ ] ;
167
+
168
+ # resolution: required, exactly one value.
169
+ sh:property [
170
+ sh:path gem:resolution ;
171
+ sh:minCount 1 ;
172
+ sh:maxCount 1 ;
173
+ sh:class gem:Resolution ;
174
+ sh:message "GeneticEvidence must declare exactly one resolution."
175
+ ] ;
176
+
177
+ # credibility: required overall rating (one tier from the enumeration).
178
+ sh:property [
179
+ sh:path gem:credibility ;
180
+ sh:minCount 1 ;
181
+ sh:maxCount 1 ;
182
+ sh:class gem:Credibility ;
183
+ sh:message "GeneticEvidence must declare exactly one credibility rating."
184
+ ] .
185
+
186
+ # ---------- optional shape: variant_ascertainment ----------
187
+ # Multi-valued; required only when target_type is VARIANT (enforced by
188
+ # the conditional shape below). Outside that context it may be absent.
189
+
190
+ gem:VariantAscertainmentShape
191
+ a sh:NodeShape ;
192
+ sh:targetClass gem:GeneticEvidence ;
193
+ sh:property [
194
+ sh:path gem:variantAscertainment ;
195
+ sh:class gem:VariantAscertainment ;
196
+ sh:message "variant_ascertainment values must come from the enumeration."
197
+ ] .
198
+
199
+ # ---------- conditional-activation rule: variant_ascertainment ----------
200
+ #
201
+ # variant_ascertainment is required (at least one value) when
202
+ # target_type = VARIANT. PROMOTED dimension per Davis 2011 annotation.
203
+
204
+ gem:VariantAscertainmentConditionalShape
205
+ a sh:NodeShape ;
206
+ sh:targetClass gem:GeneticEvidence ;
207
+ sh:sparql [
208
+ sh:message "When target_type is VARIANT, variant_ascertainment is required." ;
209
+ sh:prefixes gem: ;
210
+ sh:select """
211
+ PREFIX gem: <https://w3id.org/genetic-evidence-model/>
212
+ SELECT $this
213
+ WHERE {
214
+ $this gem:targetType gem:VARIANT .
215
+ FILTER NOT EXISTS { $this gem:variantAscertainment ?v }
216
+ }
217
+ """
218
+ ] .
219
+
220
+ # ---------- conditional-activation rule: mode_of_inheritance ----------
221
+ #
222
+ # Mode of inheritance is required exactly when knowledge_domain contains
223
+ # HUMAN_GENETICS AND target_type is GENE.
224
+
225
+ gem:ModeOfInheritanceConditionalShape
226
+ a sh:NodeShape ;
227
+ sh:targetClass gem:GeneticEvidence ;
228
+ sh:sparql [
229
+ sh:message "When knowledge_domain contains HUMAN_GENETICS and target_type is GENE, mode_of_inheritance is required." ;
230
+ sh:prefixes gem: ;
231
+ sh:select """
232
+ PREFIX gem: <https://w3id.org/genetic-evidence-model/>
233
+ SELECT $this
234
+ WHERE {
235
+ $this gem:knowledgeDomain gem:HUMAN_GENETICS .
236
+ $this gem:targetType gem:GENE .
237
+ FILTER NOT EXISTS { $this gem:modeOfInheritance ?moi }
238
+ }
239
+ """
240
+ ] .
241
+
242
+ # ---------- conditional-activation rule: organism ----------
243
+ #
244
+ # Organism is required when method contains IN_VIVO (or its legacy synonym
245
+ # IN_VIVO_EXPERIMENT) OR knowledge_domain contains MODEL_ORGANISM.
246
+ # Demonstrates the disjunctive (OR-joined) activation shape and cross-axis
247
+ # activation (Method OR Knowledge Domain). Both the renamed and legacy method
248
+ # values are matched explicitly, since owl:sameAs is not materialised without
249
+ # a reasoner.
250
+
251
+ gem:OrganismConditionalShape
252
+ a sh:NodeShape ;
253
+ sh:targetClass gem:GeneticEvidence ;
254
+ sh:sparql [
255
+ sh:message "When method contains IN_VIVO (or legacy IN_VIVO_EXPERIMENT) or knowledge_domain contains MODEL_ORGANISM, organism is required." ;
256
+ sh:prefixes gem: ;
257
+ sh:select """
258
+ PREFIX gem: <https://w3id.org/genetic-evidence-model/>
259
+ SELECT $this
260
+ WHERE {
261
+ { $this gem:method gem:IN_VIVO . }
262
+ UNION
263
+ { $this gem:method gem:IN_VIVO_EXPERIMENT . }
264
+ UNION
265
+ { $this gem:knowledgeDomain gem:MODEL_ORGANISM . }
266
+ FILTER NOT EXISTS { $this gem:organism ?org }
267
+ }
268
+ """
269
+ ] .
270
+
271
+ # ---------- enumeration of resolution values ----------
272
+
273
+ gem:Resolution a rdfs:Class .
274
+ gem:WINDOW a gem:Resolution .
275
+ gem:FUNCTIONAL_ELEMENT a gem:Resolution .
276
+ gem:POSITION a gem:Resolution .
277
+ # gem:GENE and gem:VARIANT are reused from the TargetType block above and are
278
+ # also valid Resolution values (gene-level and variant-level resolution).
279
+ gem:GENE a gem:Resolution .
280
+ gem:VARIANT a gem:Resolution .
281
+
282
+ # ---------- enumeration of credibility ratings (overall tier) ----------
283
+
284
+ gem:Credibility a rdfs:Class .
285
+ gem:VERY_HIGH a gem:Credibility .
286
+ gem:HIGH a gem:Credibility .
287
+ gem:MEDIUM a gem:Credibility .
288
+ gem:LOW a gem:Credibility .
289
+
290
+ # ---------- enumeration of conditional-dimension values ----------
291
+
292
+ gem:MeasurementTarget a rdfs:Class .
293
+ gem:EXISTENCE a gem:MeasurementTarget .
294
+ gem:EXPRESSION a gem:MeasurementTarget .
295
+ gem:STABILITY a gem:MeasurementTarget .
296
+ gem:BINDING a gem:MeasurementTarget .
297
+ gem:LOCALIZATION a gem:MeasurementTarget .
298
+ gem:ACTIVITY a gem:MeasurementTarget .
299
+ gem:CATALYSIS a gem:MeasurementTarget .
300
+
301
+ gem:GeneRelation a rdfs:Class .
302
+ gem:X_has_same_function_as_Y a gem:GeneRelation .
303
+ gem:X_regulates_Y a gem:GeneRelation .
304
+ gem:X_inhibits_Y a gem:GeneRelation .
305
+
306
+ gem:KnockoutType a rdfs:Class .
307
+ gem:CONDITIONAL a gem:KnockoutType .
308
+ gem:UNCONDITIONAL a gem:KnockoutType .
309
+
310
+ gem:Penetrance a rdfs:Class .
311
+ gem:complete a gem:Penetrance .
312
+ gem:incomplete a gem:Penetrance .
313
+ gem:unknown a gem:Penetrance .
314
+
315
+ # ---------- the "addressed but not populated" sentinel ----------
316
+ # A curator may explicitly mark a dimension not_applicable_or_omitted after
317
+ # considering it. This sentinel is a member of every dimension class, so a
318
+ # dimension carrying it satisfies presence and class constraints: the
319
+ # dimension was addressed, just not populated with a substantive value.
320
+
321
+ gem:NOT_APPLICABLE_OR_OMITTED
322
+ a gem:KnowledgeDomain, gem:Method, gem:TargetType, gem:Resolution,
323
+ gem:Credibility, gem:PhenotypeScale, gem:VariantAscertainment,
324
+ gem:MeasurementTarget, gem:GeneRelation, gem:KnockoutType,
325
+ gem:Penetrance .
326
+
327
+ # ---------- enum-validity shapes for conditional dimensions ----------
328
+ # These constrain values to the enumeration when the dimension is present;
329
+ # they do not force population (the conditional-activation shapes above and
330
+ # the coverage analysis handle which dimensions are expected where).
331
+
332
+ gem:MeasurementTargetShape
333
+ a sh:NodeShape ;
334
+ sh:targetClass gem:GeneticEvidence ;
335
+ sh:property [
336
+ sh:path gem:measurementTarget ;
337
+ sh:class gem:MeasurementTarget ;
338
+ sh:message "measurement_target values must come from the enumeration."
339
+ ] .
340
+
341
+ gem:GeneRelationShape
342
+ a sh:NodeShape ;
343
+ sh:targetClass gem:GeneticEvidence ;
344
+ sh:property [
345
+ sh:path gem:geneRelation ;
346
+ sh:class gem:GeneRelation ;
347
+ sh:message "gene_relation must come from the enumeration."
348
+ ] .
349
+
350
+ gem:KnockoutTypeShape
351
+ a sh:NodeShape ;
352
+ sh:targetClass gem:GeneticEvidence ;
353
+ sh:property [
354
+ sh:path gem:knockoutType ;
355
+ sh:class gem:KnockoutType ;
356
+ sh:message "knockout_type must come from the enumeration."
357
+ ] .
358
+
359
+ # ---------- source anchoring: every assertion needs a source span ----------
360
+ # This is the machine-checkable form of the paper's source-anchoring
361
+ # requirement: an annotation with any assertion lacking a source_span (page +
362
+ # phrase) is rejected at validation time.
363
+
364
+ gem:AssertionShape
365
+ a sh:NodeShape ;
366
+ sh:targetClass gem:GeneticEvidenceAssertion ;
367
+ sh:property [
368
+ sh:path gem:sourceSpan ;
369
+ sh:minCount 1 ;
370
+ sh:maxCount 1 ;
371
+ sh:message "Every assertion must carry exactly one source_span."
372
+ ] .
373
+
374
+ gem:SourceSpanShape
375
+ a sh:NodeShape ;
376
+ sh:targetClass gem:SourceSpan ;
377
+ sh:property [
378
+ sh:path gem:page ;
379
+ sh:minCount 1 ;
380
+ sh:datatype xsd:integer ;
381
+ sh:message "A source_span must record a page number."
382
+ ] ;
383
+ sh:property [
384
+ sh:path gem:phrase ;
385
+ sh:minCount 1 ;
386
+ sh:message "A source_span must record a key phrase locating the passage."
387
+ ] .