-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathwcon_schema.json
185 lines (185 loc) · 8.16 KB
/
wcon_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{
"$schema": "http://json-schema.org/schema",
"title": "Worm tracker Commons Object Notation (WCON)",
"description": "A text-based data interchange format for *C. elegans* trackers. It is a constrained subset of JSON. It is designed to be both human and machine readable and to facilitate data exchange and inter-operability for worm tracking data that is independent of platform and the language used for implementation.",
"type": "object",
"required": ["units", "data"],
"additionalProperties": true,
"patternProperties" : {
"^@.*": {
"title": "Custom Feature Type 1",
"description": "Top-Level Custom Feature"
}
},
"properties": {
"files": {
"type": "object",
"description": "For very long tracking experiments, it may be convenient to split a single experiment across multiple WCON files. To make it easier to reconstruct tracks across files, we support a 'files' object.",
"properties": {
"current": {"type":"string"},
"prev": {"oneOf": [
{"type": "null"},
{"type":"string"},
{"type": "array", "items": {"type":"string", "minLength":1}}
]},
"next": {"oneOf": [
{"type": "null"},
{"type":"string"},
{"type": "array", "items": {"type":"string", "minLength":1}}
]}
},
"additionalProperties": false,
"required": ["current"]
},
"units": {
"type": "object",
"description": "Defines the dimensions (temporal, spatial, etc) of the experiment.",
"required": ["t", "x", "y"],
"properties": {
"t": {"type":"string"},
"x": {"type":"string"},
"y": {"type":"string"}
},
"additionalProperties":{
"type": "string"
}
},
"metadata": {
"type": "object",
"description": "Information about experimental conditions and software versions; critical for reproducibility across labs.",
"properties": {
"id": {"type": "string"},
"lab": {"type": "object"},
"who": { "$ref": "#/definitions/string_or_array_of_strings" },
"timestamp": {"type": "string", "format":"date-time"},
"temperature": {"type": "number"},
"humidity": {"type": "number"},
"arena": {
"type": "object",
"properties":{
"style": {"type": "string", "default":"petri"},
"size": {"oneOf":[ {"type": "number"}, {"type": "array", "minItems":2, "items": {"type":"string"} }] },
"orientation": {"type": "string"}
}
},
"food": {"type": "string"},
"media": {"type": "string"},
"sex": {"type": "string", "enum": ["hermaphrodite", "male"]},
"stage": {"type": "string", "enum": ["L1", "L2", "L3", "L4", "adult", "dauer"]},
"age": {"type": "number"},
"strain": {"type": "string"},
"protocol": { "$ref": "#/definitions/string_or_array_of_strings" },
"interpolate": {"oneOf":[
{ "$ref": "#/definitions/interpolate_metadata" },
{ "type": "array", "items": {"$ref": "#/definitions/interpolate_metadata"} }
]},
"software": {
"oneOf": [
{ "$ref": "#/definitions/software_metadata" },
{
"type": "array",
"items": { "$ref": "#/definitions/software_metadata" }
}
]
}
},
"additionalProperties": true
},
"data": {"oneOf":[
{ "$ref": "#/definitions/data_record" },
{ "type":"array", "items":{ "$ref": "#/definitions/data_record" } }
]}
},
"definitions": {
"nullable_number": {"oneOf":[{"type":"number"}, {"type":"null"}]},
"array_of_numbers": {"type":"array", "items":{"$ref": "#/definitions/nullable_number"}},
"array_of_numbers_or_arrays": {"oneOf":[
{"$ref": "#/definitions/array_of_numbers"},
{"type":"array", "items":{"$ref": "#/definitions/array_of_numbers"}}
]},
"array_or_number": {
"oneOf": [
{"$ref": "#/definitions/nullable_number"},
{"type":"array", "items":{"$ref": "#/definitions/nullable_number"}}
]
},
"string_or_array_of_strings": {
"oneOf": [
{"type": "string"},
{"type": "array", "items": {"type":"string"}}
]
},
"software_metadata": {
"type": "object",
"properties": {
"tracker": {
"type": "object",
"properties": {
"name": {"type": "string"},
"version": {
"description": "Supports semantic versioning (MAJOR.MINOR.PATCH) (http://semver.org/), written as a string, or any other string.",
"type": "string"
}
}
},
"featureID": {
"description": "i.e. the lab strain designation followed by an optional suffix (e.g. '@OMG')",
"type":"string"
},
"settings": {}
}
},
"interpolate_metadata": {
"type": "object",
"properties": {
"method": {"type": "string"},
"values": {"$ref": "#/definitions/string_or_array_of_strings"}
}
},
"pixel_walk_record": {
"type": "object",
"properties": {
"px": {"type": "array", "minItems": 3, "items": { "type":"number" }},
"n": { "oneOf":[ {"type": "number"}, {"type":"array", "minItems":2, "items":{"type":"number"}} ] },
"4": { "type": "string" }
}
},
"data_record": {
"type":"object",
"properties": {
"id": { "type":"string" },
"t": { "$ref": "#/definitions/array_of_numbers" },
"ox": { "$ref": "#/definitions/array_of_numbers" },
"oy": { "$ref": "#/definitions/array_of_numbers" },
"cx": { "$ref": "#/definitions/array_of_numbers" },
"cy": { "$ref": "#/definitions/array_of_numbers" },
"x": { "$ref": "#/definitions/array_of_numbers_or_arrays" },
"y": { "$ref": "#/definitions/array_of_numbers_or_arrays" },
"px": { "$ref": "#/definitions/array_of_numbers_or_arrays"},
"py": { "$ref": "#/definitions/array_of_numbers_or_arrays"},
"ptail": { "$ref": "#/definitions/array_or_number"},
"walk": {"type":"array", "items":{"$ref":"#/definitions/pixel_walk_record"}},
"head": {
"oneOf": [
{"oneOf": [{"type":"null"},{"type":"string", "enum":["L","R","?"]}]},
{"type":"array", "items":{"oneOf": [{"type":"null"},{"type":"string", "enum":["L","R","?"]}]}}
]
},
"ventral": {
"oneOf": [
{"oneOf": [{"type":"null"},{"type":"string", "enum":["CW","CCW","?"]}]},
{"type":"array", "items":{"oneOf": [{"type":"null"},{"type":"string", "enum":["CW","CCW","?"]}]}}
]
}
},
"patternProperties" : {
"^@.*": {
"title": "Custom Feature Type 2",
"description": "Data Array Time Series Custom Feature"
}
},
"additionalProperties": true,
"required": ["id", "t", "x", "y"]
}
}
}