You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example LinkML schema to demonstrate Enum bindings
5
+
Example LinkML schema to demonstrate Enum bindings.
6
+
7
+
Here we define a generic Sample class which has a range indicating
8
+
the material type of the sample. In an environmental context this
9
+
could be soil, seawater, etc. In a medical context it may be human
10
+
tissue.
11
+
12
+
In both cases we want to use a generic Concept class
6
13
license: MIT
7
14
8
15
prefixes:
@@ -17,27 +24,59 @@ imports:
17
24
classes:
18
25
19
26
Concept:
27
+
description: A generic class for representing an element from a vocabulary or ontology.
20
28
attributes:
21
29
id:
22
30
identifier: true
31
+
descrption: CURIE/identifier for the concept. E.g. ENVO:1234567
23
32
name:
33
+
description: human-readable label of the concept. E.g. "blood"
34
+
vocabulary:
35
+
description: E.g. UBERON, PO, ENVO, NCIT
24
36
25
37
26
38
Sample:
39
+
description: Abstract grouping for different sample types
40
+
abstract: true
27
41
attributes:
28
42
name:
43
+
description: E.g. my blood sample
29
44
sample_material_type:
45
+
description: The material type for the sample - depending on the type of sample, could be tissue (e.g. blood, muscle) or environmental (rock, soil, ...)
30
46
range: Concept
31
47
32
48
EnvironmentalMaterialSample:
49
+
description: A sample taken from the environment
33
50
slot_usage:
34
51
sample_material_type:
52
+
description: Environmental material type
35
53
bindings:
36
54
- binds_value_of: id
37
55
range: ENVOMaterialEnum
38
56
obligation_level: RECOMMENDED
39
57
description: Material type from the ENVO ontology
40
58
59
+
HumanSampleSample:
60
+
description: A sample taken from a human subject
61
+
slot_usage:
62
+
sample_material_type:
63
+
description: Tissue material type
64
+
bindings:
65
+
- binds_value_of: id
66
+
range: AnatomyMaterialEnum
67
+
obligation_level: RECOMMENDED
68
+
description: Material type from an anatomy ontology
69
+
70
+
AlternateHumanSampleSample:
71
+
description: A sample taken from a human subject (alternative example for illustrative purposes)
72
+
slot_usage:
73
+
sample_material_type:
74
+
description: Does not constrain the ID that is used, but restricts the vocabulary field to a fixed enum
75
+
bindings:
76
+
- binds_value_of: vocabulary
77
+
range: HumanSampleVocabularyEnum
78
+
obligation_level: RECOMMENDED
79
+
41
80
enums:
42
81
ENVOMaterialEnum:
43
82
description: Material type from the ENVO ontology
@@ -48,5 +87,19 @@ enums:
48
87
is_direct: false
49
88
relationship_types:
50
89
- rdfs:subClassOf
90
+
AnatomyMaterialEnum:
91
+
description: Material type from the UBERON anatomy ontology
0 commit comments