-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEGA.assay.json
442 lines (432 loc) · 19.4 KB
/
EGA.assay.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://raw.githubusercontent.com/EbiEga/ega-metadata-schema/main/schemas/EGA.assay.json",
"type": "object",
"title": "EGA assay metadata schema",
"meta:version": "0.0.0",
"$async": true,
"description": "Metadata schema used by the European Genome-phenome Archive (EGA) to validate its assay metadata object. This object is intended to contain metadata about the raw qualitative or quantitative test performed to determine any kind of biological property of a biological sample. It can be of different types: (1) sequencing assay [EFO:0003740] (e.g. sequence CRAM or FastQ files); and an (2) array assay [EFO:0002696] (e.g. intensity CEL files). Further details can be found in the EGA-metadata-schema GitHub repository (https://github.com/EbiEga/ega-metadata-schema/tree/main/schemas) and EGA-archive website (https://ega-archive.org/)",
"required": ["objectId", "assayTypeSpecifications", "assayFiles"],
"additionalProperties": false,
"properties": {
"objectId": {
"type": "object",
"title": "Object's IDs block",
"description": "Node containing the main identifiers of the object (e.g. alias, centerName...), inherited from the common definitions. #! We extend the core object (objectCoreId) by adding a pattern check based on this schema's nature: an assay (by using EGAAssayIdPattern)",
"allOf": [
{
"title": "Inherited objectCoreId object",
"$ref": "./EGA.common-definitions.json#/$defs/objectCoreId"
},
{
"title": "Check that assay's EGA ID (EGAR) is correct",
"properties": {
"egaAccession": {
"$ref": "./EGA.common-definitions.json#/$defs/EGAAssayIdPattern"
}
}
}
]
},
"schemaDescriptor": {
"title": "Schema descriptor node",
"description": "Inherited schema descriptor node containing metadata about the schemas and standards used to create the JSON document itself.",
"$ref": "./EGA.common-definitions.json#/$defs/schemaDescriptor"
},
"objectTitle": {
"type": "string",
"title": "Title of the assay",
"description": "An informative assay title that should serve as an overview of the assay and differentiate it from others. This short text can be used to call out assay records in searches or in displays.",
"minLength": 1,
"examples": [ "Ilumina sequencing assay 3409 - Cancer genomics" ]
},
"objectDescription": {
"type": "string",
"title": "Description of the assay",
"description": "An in-depth description (e.g. used technology, sample groups, purpose...) of the assay. ",
"minLength": 1,
"examples": [ "Sequencing assay number 3409 of 4000. Sequenced through Illumina MiSeq to find SNPs of colorectal cancer samples..." ]
},
"assayCenter": {
"type": "string",
"title": "Centername that performed the assay",
"description": "The name of the center (e.g. 'EBI-TEST') responsible for performing assay, if applicable, in case it's different from the center submitting metadata).",
"minLength": 1,
"examples": [ "EBI-TEST" ]
},
"assayDate": {
"type": "string",
"title": "Date of the assay",
"description": "Date when the sequencing assay took place (e.g. '2021-05-15'). If the protocols are too long, the date shall be the day the assay concluded.",
"format": "date",
"examples": [ "2021-04-30", "2020-12-29" ]
},
"assayTypeSpecifications": {
"type": "object",
"title": "Assay type specifications",
"description": "Node containing different sets of fields that depend on the instrument used for the assay: either array assays (those in which an [array instrument [EFO:0002698]](http://www.ebi.ac.uk/efo/EFO_0002698) was used) or sequencing assays (those in which a [sequencing instrument [EFO:0003739]](http://www.ebi.ac.uk/efo/EFO_0003739) was used). Depending on the used technology, different types of fields will be required. For example, if an array was used, its arraySampleLabels will be expected. Having this modular assay type-related node allows for easy additions of new technology-specific requirements.",
"additionalProperties": false,
"required": ["assayInstrument"],
"properties": {
"assayInstrument": {
"type": "string",
"title": "Assay type",
"description": "The general categories, either sequencing or array, in which assays are categorized based on the used instruments. Term chosen from a list of controlled vocabulary (CV). If you cannot find your term in the CV list, please create an issue at our [metadata GitHub repository](https://github.com/EbiEga/ega-metadata-schema/issues/new/choose) proposing its addition.",
"enum": ["array", "sequencer"],
"meta:enum": {
"array": "An assay in which an [array instrument [EFO:0002698]](http://www.ebi.ac.uk/efo/EFO_0002698) was used.",
"sequencer": "An assay in which a [sequencer instrument [EFO:0003739]](http://www.ebi.ac.uk/efo/EFO_0003739) was used."
}
},
"arrayAssaySpecifications": {
"type": "object",
"title": "Specifications of an array assay",
"description": "Node containing the set of fields specific to an assay of type 'array' (i.e. an array was used to obtain the raw data).",
"additionalProperties": false,
"required": ["nLabelsPerArray"],
"properties": {
"nLabelsPerArray": {
"type": "number",
"title": "Number of labels per array",
"description": "A single array can be prepared with biological materials labelled differently for them to be compared in parallel. Here one shall specify the number of labels used in the single array (e.g. 2 for a Two-colour cDNA microarray). Term chosen from a list of controlled vocabulary (CV). If you cannot find your term in the CV list, please create an issue at our [metadata GitHub repository](https://github.com/EbiEga/ega-metadata-schema/issues/new/choose) proposing its addition.",
"enum": [1, 2, 3, 4],
"meta:enum": {
"1": "One single label was used for a single array",
"2": "Two labels were used for a single array. The node 'arraySampleLabels' specifying which samples were labelled by which compounds will be expected.",
"3": "Three labels were used for a single array. The node 'arraySampleLabels' specifying which samples were labelled by which compounds will be expected.",
"4": "Four labels were used for a single array. The node 'arraySampleLabels' specifying which samples were labelled by which compounds will be expected."
}
},
"arraySampleLabels": {
"type": "array",
"title": "Array of sampleLabel pairs of the array assay",
"description": "Sample-Label pairs (e.g. sample 'EGAN00000000001' and label 'Cy3') to know which samples used in this assay are labelled by which chemicals. Can be omitted if the array is of one single label/colour.",
"minItems": 1,
"additionalProperties": false,
"uniqueItems": true,
"items": {
"$ref": "./EGA.common-definitions.json#/$defs/sampleLabelAssociation"
}
}
},
"anyOf": [
{
"title": "2 labels per array check",
"description": "If 2 labels were used per array, the sampleLabel specifications will be expected and at least 2 items (one for each label)",
"required": [ "nLabelsPerArray", "arraySampleLabels" ],
"properties": {
"nLabelsPerArray": {
"const": 2
},
"arraySampleLabels": {
"minItems": 2
}
}
},
{
"title": "3 labels per array check",
"description": "If 3 labels were used per array, the sampleLabel specifications will be expected and at least 3 items (one for each label)",
"required": [ "nLabelsPerArray", "arraySampleLabels" ],
"properties": {
"nLabelsPerArray": {
"const": 3
},
"arraySampleLabels": {
"minItems": 3
}
}
},
{
"title": "4 labels per array check",
"description": "If 4 labels were used per array, the sampleLabel specifications will be expected and at least 4 items (one for each label)",
"required": [ "nLabelsPerArray", "arraySampleLabels" ],
"properties": {
"nLabelsPerArray": {
"const": 4
},
"arraySampleLabels": {
"minItems": 4
}
}
}
]
},
"sequencingAssaySpecifications": {
"type": "object",
"title": "Specifications of a sequencing assay",
"description": "Node containing the set of fields specific to an assay of type 'sequencer' (i.e. a sequencer was used to obtain the raw data).",
"additionalProperties": false,
"properties": {
"referenceAlignmentDetails": {
"title": "Reference assembly and sequence details",
"description": "Node containing details of the reference sequence used in the alignment.",
"$ref": "./EGA.common-definitions.json#/$defs/referenceAlignmentDetails"
}
}
}
},
"allOf": [
{
"title": "If the assay is of type array its specifications will be expected",
"if": {
"required": ["assayInstrument"],
"properties": {
"assayInstrument": {
"enum": ["array"]
}
}
},
"then": {
"required": ["arrayAssaySpecifications"]
}
}
]
},
"assayRelationships": {
"type": "array",
"title": "Assay relationships",
"description": "Comprises metadata (e.g. Source or Target) of a directional association between two entities, one of which shall be the current assay.",
"minItems": 1,
"additionalProperties": false,
"uniqueItems": true,
"items": {
"allOf": [
{
"title": "Inherited relationship node",
"$ref": "./EGA.common-definitions.json#/$defs/relationshipObject"
},
{
"title": "Relationship constraints for an assay",
"description": "Not all possible relationships between objects are allowed (e.g. an individual should not be linked to a policy). This node contains the restricted relationships that can be given for a XXXXX.",
"anyOf": [
{
"title": "Allowed relationships of type referencedBy (main ones)",
"allOf": [
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeReferencedBy"
},
{
"anyOf": [
{
"$ref": "./EGA.common-definitions.json#/$defs/rTargetDataset"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTargetAnalysis"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rSourceSample"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rSourceExperiment"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rSourceSubmission"
}
]
}
]
},
{
"title": "Allowed relationships of type groupedWith, isAfter, sameAs (optional ones)",
"allOf": [
{
"anyOf": [
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeGroupedWith"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeIsAfter"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeSameAs"
}
]
},
{
"anyOf": [
{
"$ref": "./EGA.common-definitions.json#/$defs/rSourceAssay"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTargetAssay"
}
]
}
]
},
{
"title": "Relationships of external accessions and URLs (optional ones)",
"description": "Almost any relationship is imaginable with external accessions and URLs.",
"allOf": [
{
"anyOf": [
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeChildOf"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeFamilyRelationshipWith"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeGroupedWith"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeSameAs"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeReferencedBy"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeDevelopsFrom"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeMemberOf"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTypeIsAfter"
}
]
},
{
"anyOf": [
{
"$ref": "./EGA.common-definitions.json#/$defs/rSourceExternalAccession"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rSourceExternalURL"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTargetExternalAccession"
},
{
"$ref": "./EGA.common-definitions.json#/$defs/rTargetExternalURL"
}
]
}
]
}
]
}
]
},
"contains": {
"title": "Constraint to have at least one 'submission' relationship",
"$ref": "./EGA.common-definitions.json#/$defs/rConstraintOneSourcedSubmission"
}
},
"assayFiles": {
"type": "array",
"title": "Data files produced from an assay",
"description": "This property contains the specific files (e.g. raw CRAM files) derived from performing the sequencing or hybridization and scanning with the sampled material.",
"minItems": 1,
"additionalProperties": false,
"uniqueItems": true,
"items": {
"allOf": [
{
"title": "Basic file object",
"$ref": "./EGA.common-definitions.json#/$defs/fileObject"
},
{
"title": "Constraint of filetypes that are allowed for an assay",
"$ref": "./EGA.common-definitions.json#/$defs/assayFiletypes"
}
]
}
},
"assayAttributes": {
"type": "array",
"title": "Assay custom attributes",
"description": "Custom attributes of an assay: reusable attributes to encode tag-value pairs (e.g. Tag being 'additional context' and its Value 'this specific assay was stored mistakenly for longer periods of time, so its data could be misleading...') with optional units. Its properties are inherited from the common-definitions.json schema.",
"minItems": 1,
"additionalProperties": false,
"uniqueItems": true,
"items": {
"$ref": "./EGA.common-definitions.json#/$defs/customAttribute"
}
}
},
"allOf": [
{
"title": "If the files are aligned reads, the reference alignment details are expected",
"if": {
"properties": {
"assayFiles": {
"items": {
"properties": {
"filetype": {
"enum": [ "BAM", "CRAM" ]
}
}
}
}
}
},
"then": {
"properties": {
"assayTypeSpecifications": {
"required": ["sequencingAssaySpecifications"],
"properties": {
"sequencingAssaySpecifications": {
"required": ["referenceAlignmentDetails"]
}
}
}
}
}
},
{
"title": "Allowed filetypes for a sequencing assay",
"if": {
"properties": {
"assayTypeSpecifications": {
"properties": {
"assayInstrument": {
"const": "sequencer"
}
}
}
}
},
"then": {
"properties": {
"assayFiles": {
"items": {
"properties": {
"filetype": {
"enum": [ "FASTQ", "FASTA", "SRA", "SRF", "SFF", "BAM", "CRAM" ]
}
}
}
}
}
}
},
{
"title": "Allowed filetypes for an array assay",
"if": {
"properties": {
"assayTypeSpecifications": {
"properties": {
"assayInstrument": {
"const": "array"
}
}
}
}
},
"then": {
"properties": {
"assayFiles": {
"items": {
"properties": {
"filetype": {
"enum": ["CEL", "TSV", "XLSX", "CSV", "IDAT", "TXT", "EXP", "GPR"]
}
}
}
}
}
}
}
]
}