-
Notifications
You must be signed in to change notification settings - Fork 23
/
airr-schema.yaml
5204 lines (5127 loc) · 190 KB
/
airr-schema.yaml
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 definitions for AIRR standards objects
#
Info:
title: AIRR Schema
description: Schema definitions for AIRR standards objects
version: 1.4
contact:
name: AIRR Community
url: https://github.com/airr-community
license:
name: Creative Commons Attribution 4.0 International
url: https://creativecommons.org/licenses/by/4.0/
# Properties that are based upon an ontology use this
# standard schema definition
Ontology:
type: object
properties:
id:
type: string
description: CURIE of the concept, encoding the ontology and the local ID
label:
type: string
description: Label of the concept in the respective ontology
# Map to expand CURIE prefixes to full IRIs
CURIEMap:
ABREG:
type: identifier
default:
map: ABREG
map:
ABREG:
iri_prefix: "http://antibodyregistry.org/AB_"
CHEBI:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/CHEBI_"
CL:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/CL_"
DOI:
type: identifier
default:
map: DOI
map:
DOI:
iri_prefix: "https://doi.org/"
DOID:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/DOID_"
ENA:
type: identifier
default:
map: ENA
map:
ENA:
iri_prefix: "https://www.ebi.ac.uk/ena/browser/view/"
ENSG:
type: identifier
default:
map: ENSG
map:
ENSG:
iri_prefix: "https://www.ensembl.org/Multi/Search/Results?q="
GAZ:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/GAZ_"
IEDB_RECEPTOR:
type: identifier
default:
map: IEDB_RECEPTOR
provider: IEDB_RECEPTOR
map:
IEDB_RECEPTOR:
iri_prefix: "https://www.iedb.org/receptor/"
IEDB_EPITOPE:
type: identifier
default:
map: IEDB_EPITOPE
provider: IEDB_EPITOPE
map:
IEDB_EPITOPE:
iri_prefix: "https://www.iedb.org/epitope/"
MRO:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/MRO_"
NCBITAXON:
type: taxonomy
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/NCBITaxon_"
BioPortal:
iri_prefix: "http://purl.bioontology.org/ontology/NCBITAXON/"
NCIT:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/NCIT_"
ORCID:
type: catalog
default:
map: ORCID
provider: ORCID
map:
ORCID:
iri_prefix: "https://orcid.org/"
ROR:
type: catalog
default:
map: ROR
provider: ROR
map:
ROR:
iri_prefix: "https://ror.org/"
SRA:
type: identifier
default:
map: SRA
map:
SRA:
iri_prefix: "https://trace.ncbi.nlm.nih.gov/Traces/sra/?run="
UBERON:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/UBERON_"
UNIPROT:
type: identifier
default:
map: UNIPROT
map:
UniProt:
iri_prefix: "http://purl.uniprot.org/uniprot/"
UO:
type: ontology
default:
map: OBO
provider: OLS
map:
OBO:
iri_prefix: "http://purl.obolibrary.org/obo/UO_"
InformationProvider:
provider:
ENA:
request:
url: "{iri}"
response: text/html
IEDB_RECEPTOR:
request:
url:
- 'https://query-api.iedb.org/tcr_search?receptor_group_id=eq.{local_id}'
- 'https://query-api.iedb.org/bcr_search?receptor_group_id=eq.{local_id}'
response: application/json
IEDB_EPITOPE:
request:
url: "https://query-api.iedb.org/epitope_search?structure_id=eq.{local_id}"
response: application/json
OLS:
request:
url: "https://www.ebi.ac.uk/ols/api/ontologies/{ontology_id}/terms?iri={iri}"
response: application/json
Ontobee:
request:
url: "http://www.ontobee.org/ontology/rdf/{ontology_id}?iri={iri}"
response: application/rdf+xml
ORCID:
request:
url: "https://pub.orcid.org/v2.1/{local_id}"
header:
Accept: application/json
response: application/json
ROR:
request:
url: "https://api.ror.org/organizations/{iri}"
response: application/json
SRA:
request:
url: "{iri}"
response: text/html
parameter:
CHEBI:
Ontobee:
ontology_id: CHEBI
OLS:
ontology_id: chebi
CL:
Ontobee:
ontology_id: CL
OLS:
ontology_id: cl
DOID:
Ontobee:
ontology_id: DOID
OLS:
ontology_id: doid
GAZ:
Ontobee:
ontology_id: GAZ
OLS:
ontology_id: gaz
MRO:
Ontobee:
ontology_id: MRO
OLS:
ontology_id: mro
NCBITAXON:
Ontobee:
ontology_id: NCBITaxon
OLS:
ontology_id: ncbitaxon
BioPortal:
ontology_id: NCBITAXON
NCIT:
Ontobee:
ontology_id: NCIT
OLS:
ontology_id: ncit
UBERON:
Ontobee:
ontology_id: UBERON
OLS:
ontology_id: uberon
UO:
Ontobee:
ontology_id: UO
OLS:
ontology_id: uo
# AIRR specification extensions
#
# The schema definitions for AIRR standards objects is extended to
# provide a number of AIRR specific attributes. This schema definition
# specifies the structure, property names and data types. These
# attributes are attached to an AIRR field with the x-airr property.
Attributes:
type: object
properties:
miairr:
type: string
description: MiAIRR requirement level.
enum:
- essential
- important
- defined
default: defined
identifier:
type: boolean
description: >
True if the field is an identifier required to link metadata and/or individual
sequence records across objects in the complete AIRR Data Model and ADC API.
default: false
adc-query-support:
type: boolean
description: >
True if an ADC API implementation must support queries on the field.
If false, query support for the field in ADC API implementations is optional.
default: false
adc-api-optional:
type: boolean
description: >
If false, repositories must implement these fields both for queries and query repsonse.
Only applies to fields in the ADC API spec that are extensions to the AIRR Standard,
targeted at "convenience query fields" that make queries against repositories more
efficient than if queries were limited to AIRR fields only.
If true, repositories can choose to support the field or not.
default: false
nullable:
type: boolean
description: True if the field may have a null value.
default: true
deprecated:
type: boolean
description: True if the field has been deprecated from the schema.
default: false
deprecated-description:
type: string
description: Information regarding the deprecation of the field.
deprecated-replaced-by:
type: array
items:
type: string
description: The deprecated field is replaced by this list of fields.
set:
type: integer
description: MiAIRR set
subset:
type: string
description: MiAIRR subset
name:
type: string
description: MiAIRR name
format:
type: string
description: Field format. If null then assume the full range of the field data type
enum:
- ontology
- controlled_vocabulary
- physical_quantity
- time_point
- time_interval
- CURIE
ontology:
type: object
description: Ontology definition for field
properties:
draft:
type: boolean
description: Indicates if ontology definition is a draft
top_node:
type: object
description: >
Concept to use as top node for ontology. Note that this must have the same CURIE namespace
as the actually annotated concept.
properties:
id:
type: string
description: CURIE for the top node term
label:
type: string
description: Ontology name for the top node term
# FileObject
FileObject:
type: object
properties:
format:
type: string
description: The file format for the file (e.g. json, tsv).
compression:
type: string
description: The type of compression (if any) used for the file (e.g. zip, gz, bz2).
filename:
type: string
description: The name of the file
checksum:
type: string
description: MD5 checksum of the file.
version:
type: string
description: Version stamp for the file (if any).
# AIRR DataSet specification
# An AIRR DataSet consists of tags for types of AIRR Schema Objects and a set of files that hold data in the AIRR format
# appropriate for that AIRR schema object.
DataSet:
type: object
properties:
name:
type: string
description: A human readable name for the data set.
description:
type: string
description: A description of the data set.
repository_url:
type: string
description: The URL of the repository from which the data set came from (if the data came from a repository)
files:
type: object
description: A set of files based on data type, where the key for each object denotes the type of data and the accompanying array of files (and related file metadata) contain the data of that type. All top level AIRR objects (e.g. Repertoire, Rearrangement, Clone, Cell, Expression, Reactivity, Receptor, RepertoireGroup) are allowed. Custom data types are also permitted, so the manifest can include data that is outside of the AIRR specification.
properties:
Repertoire:
type: array
items:
$ref: '#/FileObject'
Rearrangement:
type: array
items:
$ref: '#/FileObject'
Clone:
type: array
items:
$ref: '#/FileObject'
Cell:
type: array
items:
$ref: '#/FileObject'
Expression:
type: array
items:
$ref: '#/FileObject'
Reactivity:
type: array
items:
$ref: '#/FileObject'
Receptor:
type: array
items:
$ref: '#/FileObject'
GermlineSet:
type: array
items:
$ref: '#/FileObject'
GenotypeSet:
type: array
items:
$ref: '#/FileObject'
RepertoireGroup:
type: array
items:
$ref: '#/FileObject'
ADCQuery:
type: array
items:
$ref: '#/FileObject'
# AIRR Manifest specification.
# An AIRR Manifest contains metadata for a group of accompanying files that are part of a set or coherent unit.
Manifest:
type: object
properties:
name:
type: string
description: A human readable name for the data manifest.
x-airr:
nullable: false
description:
type: string
description: A description of the purpose for this data manifest
created_at:
type: string
description: Time/data stamp when the dat manifest was created.
data_sets:
type: array
items:
$ref: '#/DataSet'
# AIRR Data File
#
# A JSON data file that holds Repertoire metadata, data processing
# analysis objects, or any object in the AIRR Data Model.
#
# It is presumed that the objects gathered together in an AIRR Data File are related
# or relevant to each other, e.g. part of the same study; thus, the ID fields can be
# internally resolved unless the ID contains an external PID. This implies that AIRR
# Data Files cannot be merged simply by concatenating arrays; any merge program
# would need to manage duplicate or conflicting ID values.
#
# While the properties in an AIRR Data File are not required, if one is provided then
# the value should not be null.
DataFile:
type: object
properties:
Info:
$ref: '#/InfoObject'
x-airr:
nullable: false
Repertoire:
type: array
description: List of repertoires
items:
$ref: '#/Repertoire'
x-airr:
nullable: false
RepertoireGroup:
type: array
description: List of repertoire groups
items:
$ref: '#/RepertoireGroup'
x-airr:
nullable: false
Rearrangement:
type: array
description: List of rearrangement records
items:
$ref: '#/Rearrangement'
x-airr:
nullable: false
Cell:
type: array
description: List of cells
items:
$ref: '#/Cell'
x-airr:
nullable: false
Clone:
type: array
description: List of clones
items:
$ref: '#/Clone'
x-airr:
nullable: false
GermlineSet:
type: array
description: List of germline sets
items:
$ref: '#/GermlineSet'
x-airr:
nullable: false
GenotypeSet:
type: array
description: List of genotype sets
items:
$ref: '#/GenotypeSet'
x-airr:
nullable: false
Manifest:
type: array
description: List of data set manifests
items:
$ref: '#/Manifest'
x-airr:
nullable: false
# AIRR Info object, should be similar to openapi
# should we point to an openapi schema?
InfoObject:
type: object
description: Provides information about data and API responses.
required:
- title
- version
properties:
title:
type: string
x-airr:
nullable: false
version:
type: string
x-airr:
nullable: false
description:
type: string
contact:
type: object
properties:
name:
type: string
url:
type: string
email:
type: string
license:
type: object
required:
- name
properties:
name:
type: string
x-airr:
nullable: false
url:
type: string
#
# General objects
#
# A time point
TimePoint:
description: Time point at which an observation or other action was performed.
type: object
properties:
label:
type: string
description: Informative label for the time point
example: Pre-operative sampling of cancer tissue
x-airr:
adc-query-support: true
value:
type: number
description: Value of the time point
example: -5.0
x-airr:
nullable: false
adc-query-support: true
unit:
$ref: '#/Ontology'
description: Unit of the time point
title: Unit of immunization schedule
example:
id: UO:0000033
label: day
x-airr:
nullable: false
adc-query-support: true
format: ontology
ontology:
draft: false
top_node:
id: UO:0000003
label: time unit
# A time range or interval
TimeInterval:
description: Time range or interval for a measurement, observation or action.
type: object
properties:
min:
type: number
description: Lower/minimum value of the time interval
example: 5.0
x-airr:
adc-query-support: true
nullable: false
max:
type: number
description: Upper/maximum value of the time interval
example: 10.0
x-airr:
adc-query-support: true
nullable: false
unit:
$ref: '#/Ontology'
description: Unit of the time interval
example:
id: UO:0000033
label: day
x-airr:
nullable: false
adc-query-support: true
format: ontology
ontology:
draft: false
top_node:
id: UO:0000003
label: time unit
# A physical quantity
PhysicalQuantity:
description: A physical quantity from a measurement or observation.
type: object
properties:
quantity:
type: number
description: Physical quantity
example: -5.0
x-airr:
adc-query-support: true
nullable: false
unit:
$ref: '#/Ontology'
description: Unit of physical quantity
example:
id: UO:0000024
label: nanogram
x-airr:
nullable: false
adc-query-support: true
format: ontology
ontology:
draft: false
top_node:
id: UO:0000002
label: physical quantity
# A time quantity
TimeQuantity:
description: A time quantity
type: object
properties:
quantity:
type: number
description: Time quantity
example: 30.0
x-airr:
adc-query-support: true
nullable: false
unit:
$ref: '#/Ontology'
description: Unit of time
example:
id: UO:0000033
label: day
x-airr:
nullable: false
adc-query-support: true
format: ontology
ontology:
draft: false
top_node:
id: UO:0000003
label: time unit
# Contributor record to describe invididuals and their contribution to a data set
#
Contributor:
description: Individual whose contribution to this work should be acknowledged
type: object
required:
- contributor_id
- name
properties:
contributor_id:
type: string
description: Unique identifier of this contributor within the file
x-airr:
nullable: true
identifier: true
miairr: important
name:
type: string
description: Full name of contributor
x-airr:
nullable: false
orcid_id:
$ref: '#/Ontology'
description: >
ORCID identifier of the contributor. Note that if present, the label of the ORCID record should take
precedence over the name reported in the `name` property.
title: ORCID iD
example:
id: ORCID:0000-0002-1825-0097
label: Josiah Carberry
x-airr:
nullable: true
adc-query-support: true
format: ontology
ontology:
draft: false
top_node:
id: null
label: null
affiliation:
$ref: '#/Ontology'
description: >
ROR of the contributor's primary affiliation. Note that ROR are only minted for institutions, not
from individuals institutes, divisions or departments.
title: ROR
example:
id: ROR:05h7xva58
label: Wesleyan University
x-airr:
nullable: true
adc-query-support: true
format: ontology
ontology:
draft: false
top_node:
id: null
label: null
affiliation_department:
type: string
description: >
Additional information regarding the contributor's primary affiliation. Can be used to specify
individual institutes, divisions or departments.
example: Department for Psychoceramics
x-airr:
nullable: true
contributions:
type: array
description: List of all roles the contributor had in a project
items:
$ref: '#/ContributorContribution'
x-airr:
nullable: true
ContributorContribution:
type: object
required:
- role
properties:
role:
type: string
description: Role according to CRediT taxonomy
enum:
- conceptualization
- data curation
- formal analysis
- funding acquisition
- investigation
- methodology
- project administration
- resources
- software
- supervision
- validation
- visualization
- writing - original draft
- writing - review & editing
x-airr:
nullable: false
degree:
type: string
description: >
Optional specification of the degree of contribution, should be used if multiple individuals serve
the same role.
enum:
- lead
- equal
- supporting
x-airr:
nullable: true
#
# Germline gene schema
#
# Rearranged and genomic germline sequences
RearrangedSequence:
type: object
description: >
Details of a directly observed rearranged sequence or an inference from rearranged sequences
contributing support for a gene or allele.
required:
- sequence_id
- sequence
- derivation
- observation_type
- repository_name
- repository_id
- deposited_version
- seq_start
- seq_end
properties:
sequence_id:
type: string
description: >
Unique identifier of this RearrangedSequence within the file, typically generated by the repository
hosting the schema, for example from the underlying ID of the database record.
x-airr:
identifier: true
miairr: important
sequence:
type: string
description: nucleotide sequence
x-airr:
miairr: essential
nullable: false
derivation:
type: string
enum:
- DNA
- RNA
- null
description: The class of nucleic acid that was used as primary starting material
x-airr:
miairr: important
nullable: true
observation_type:
type: string
enum:
- direct_sequencing
- inference_from_repertoire
description: >
The type of observation from which this sequence was drawn, such as direct sequencing or
inference from repertoire sequencing data.
x-airr:
miairr: essential
nullable: false
curation:
type: string
description: Curational notes on the sequence
repository_name:
type: string
description: Name of the repository in which the sequence has been deposited
x-airr:
miairr: defined
repository_ref:
type: string
description: Queryable id or accession number of the sequence published by the repository
x-airr:
miairr: defined
deposited_version:
type: string
description: Version number of the sequence within the repository
x-airr:
miairr: defined
sequence_start:
type: integer
description: Start co-ordinate of the sequence detailed in this record, within the sequence deposited
x-airr:
miairr: essential
nullable: false
sequence_end:
type: integer
description: End co-ordinate of the sequence detailed in this record, within the sequence deposited
x-airr:
miairr: essential
nullable: false
UnrearrangedSequence:
description: Details of an unrearranged sequence contributing support for a gene or allele
type: object
required:
- sequence_id
- sequence
- repository_name
- assembly_id
- gff_seqid
- gff_start
- gff_end
- strand
properties:
sequence_id:
type: string
description: unique identifier of this UnrearrangedSequence within the file
x-airr:
identifier: true
miairr: important
sequence:
type: string
description: >
Sequence of interest described in this record. Typically, this will include gene and promoter region.
x-airr:
miairr: essential
nullable: false
curation:
type: string
description: Curational notes on the sequence
repository_name:
type: string
description: Name of the repository in which the assembly or contig is deposited
x-airr:
miairr: defined
repository_ref:
type: string
description: Queryable id or accession number of the sequence published by the repository
x-airr:
miairr: defined
patch_no:
type: string
description: Genome assembly patch number in which this gene was determined
gff_seqid:
type: string
description: >
Sequence (from the assembly) of a window including the gene and preferably also the promoter region.
gff_start:
type: integer
description: >
Genomic co-ordinates of the start of the sequence of interest described in this record in
Ensemble GFF version 3.
gff_end:
type: integer
description: >
Genomic co-ordinates of the end of the sequence of interest described in this record in
Ensemble GFF version 3.
strand:
type: string
enum:
- "+"
- "-"
- null
description: sense (+ or -)
x-airr:
nullable: true
# V gene delineation
SequenceDelineationV:
description: Delineation of a V-gene in a particular system
type: object
required:
- sequence_delineation_id
- delineation_scheme
- fwr1_start
- fwr1_end
- cdr1_start
- cdr1_end
- fwr2_start
- fwr2_end
- cdr2_start
- cdr2_end
- fwr3_start
- fwr3_end
- cdr3_start
properties: