Skip to content

Commit

Permalink
Merge pull request #206 from alliance-genome/secondary_ids_update
Browse files Browse the repository at this point in the history
Secondary IDs update
  • Loading branch information
markquintontulloch authored May 15, 2023
2 parents c3f4af4 + 499ad6b commit 862cff5
Show file tree
Hide file tree
Showing 10 changed files with 373 additions and 202 deletions.
440 changes: 267 additions & 173 deletions generated/jsonschema/allianceModel.schema.json

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions model/schema/affectedGenomicModel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ classes:
slots:
- name
- subtype
- agm_secondary_ids
- components
- sequence_targeting_reagents
- parental_populations
Expand All @@ -54,10 +55,22 @@ classes:
slots:
- name
- subtype_name
- agm_secondary_id_dtos
- reference_curies
- sequence_targeting_reagent_curies
- component_dtos

AgmSecondaryIdSlotAnnotation:
is_a: SlotAnnotation
slots:
- single_agm
- secondary_id
slot_usage:
single_agm:
required: true
secondary_id:
required: true

AffectedGenomicModelComponent:
is_a: AuditedObject
description: >-
Expand Down Expand Up @@ -86,6 +99,10 @@ slots:
range: string
required: true

single_agm:
range: AffectedGenomicModel
multivalued: false

subtype:
description: >-
Subtype of affected genomic model - permissible values: strain / genotype
Expand All @@ -102,6 +119,19 @@ slots:
range: string
required: true

agm_secondary_ids:
description: Secondary IDs of a given AGM
domain: AffectedGenomicModel
range: AgmSecondaryIdSlotAnnotation
multivalued: true

agm_secondary_id_dtos:
domain: AffectedGenomicModelDTO
range: SecondaryIdSlotAnnotationDTO
multivalued: true
inlined: true
inlined_as_list: true

components:
singular_name: component
description: >-
Expand Down
5 changes: 1 addition & 4 deletions model/schema/allele.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,12 @@ classes:
required: true

AlleleSecondaryIdSlotAnnotation:
is_a: SlotAnnotation
is_a: SecondaryIdSlotAnnotation
slots:
- single_allele
- secondary_id
slot_usage:
single_allele:
required: true
secondary_id:
required: true

AlleleSymbolSlotAnnotation:
description: >-
Expand Down
10 changes: 1 addition & 9 deletions model/schema/alleleDTO.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,6 @@ classes:
note_dto:
required: true

AlleleSecondaryIdSlotAnnotationDTO:
is_a: SlotAnnotationDTO
slots:
- secondary_id
slot_usage:
secondary_id:
required: true


## ------------
## ALLELE DTO ASSOCIATION CLASSES
Expand Down Expand Up @@ -376,7 +368,7 @@ slots:

allele_secondary_id_dtos:
domain: AlleleDTO
range: AlleleSecondaryIdSlotAnnotationDTO
range: SecondaryIdSlotAnnotationDTO
multivalued: true
inlined: true
inlined_as_list: true
Expand Down
18 changes: 16 additions & 2 deletions model/schema/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,12 @@ classes:
RNA transcript translation).
slots:
- cross_references
- secondary_identifiers
- genomic_location_associations

GenomicEntityDTO:
is_a: BiologicalEntityDTO
slots:
- cross_reference_dtos
- secondary_identifiers
- genomic_location_association_dtos

Transcript:
Expand Down Expand Up @@ -277,6 +275,22 @@ classes:
any_of:
- equals_string: systematic_name

SecondaryIdSlotAnnotation:
is_a: SlotAnnotation
slots:
- secondary_id
slot_usage:
secondary_id:
required: true

SecondaryIdSlotAnnotationDTO:
is_a: SlotAnnotationDTO
slots:
- secondary_id
slot_usage:
secondary_id:
required: true


Association:
is_a: AuditedObject
Expand Down
23 changes: 23 additions & 0 deletions model/schema/gene.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ classes:
- gene_full_name
- gene_systematic_name
- gene_synonyms
- gene_secondary_ids
- related_notes
- gene_type
- gene_types_secondary
Expand Down Expand Up @@ -91,6 +92,7 @@ classes:
- gene_full_name_dto
- gene_systematic_name_dto
- gene_synonym_dtos
- gene_secondary_id_dtos
- gene_type_curie

GeneSymbolSlotAnnotation:
Expand Down Expand Up @@ -119,6 +121,14 @@ classes:
notes: >-
permissible_values: full_name (VocabularyTerm)
GeneSecondaryIdSlotAnnotation:
is_a: SecondaryIdSlotAnnotation
slots:
- single_gene
slot_usage:
single_gene:
required: true

GeneSystematicNameSlotAnnotation:
is_a: NameSlotAnnotation
description: >-
Expand Down Expand Up @@ -239,6 +249,19 @@ slots:
required: false
inlined: true

gene_secondary_ids:
description: Secondary IDs of a given gene
domain: Gene
range: GeneSecondaryIdSlotAnnotation
multivalued: true

gene_secondary_id_dtos:
domain: GeneDTO
range: SecondaryIdSlotAnnotationDTO
multivalued: true
inlined: true
inlined_as_list: true

gene_systematic_name:
description: >-
The one current systematic name for a gene: e.g., YHR084W, R09F10.2.
Expand Down
20 changes: 16 additions & 4 deletions test/data/agm_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
"updated_by_curie": "ZFIN",
"internal": false,
"name": "TL + MO1-hars",
"secondary_identifiers": [
"ZFIN:ZDB-FISH-123456-1"
"agm_secondary_id_dtos": [
{
"secondary_id": "ZFIN:ZDB-FISH-123456-1",
"evidence_curies": [
"PMID:00020012"
],
"internal": false
}
],
"reference_curies": [],
"sequence_targeting_reagent_curies": [
Expand All @@ -35,8 +41,14 @@
"updated_by_curie": "ZFIN",
"internal": false,
"name": "pax2a<sup>tb21/tb21</sup>",
"secondary_identifiers": [
"ZFIN:ZDB-FISH-123456-1"
"agm_secondary_id_dtos": [
{
"secondary_id": "ZFIN:ZDB-FISH-123456-1",
"evidence_curies": [
"PMID:00020012"
],
"internal": false
}
],
"reference_curies": [],
"component_dtos": [
Expand Down
11 changes: 10 additions & 1 deletion test/data/allele_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@
"PMID:01231002"
],
"internal": false
}
},
"allele_secondary_id_dtos": [
{
"secondary_id": "scnd_id",
"evidence_curies": [
"PMID:00020012"
],
"internal": false
}
]
},
{
"curie": "ZFIN:ZDB-ALT-130411-947",
Expand Down
9 changes: 9 additions & 0 deletions test/data/gene_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@
"internal": false
}
],
"gene_secondary_id_dtos": [
{
"secondary_id": "scnd_id",
"evidence_curies": [
"PMID:00020012"
],
"internal": false
}
],
"cross_reference_dtos": [
{
"referenced_curie": "ZFIN:ZDB-GENE-010226-1",
Expand Down
9 changes: 0 additions & 9 deletions test/data/sqtr_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"created_by_curie": "ZFIN",
"updated_by_curie": "ZFIN",
"internal": false,
"secondary_identifiers": [
"ZFIN:ZDB-MRPHLNO-123456-1"
],
"reference_curies": [
"PMID:19648295"
],
Expand Down Expand Up @@ -42,9 +39,6 @@
"created_by_curie": "ZFIN",
"updated_by_curie": "ZFIN",
"internal": false,
"secondary_identifiers": [
"ZFIN:ZDB-MRPHLNO-123456-1"
],
"reference_curies": [
"PMID:19648295"
]
Expand All @@ -66,9 +60,6 @@
"created_by_curie": "ZFIN",
"updated_by_curie": "ZFIN",
"internal": false,
"secondary_identifiers": [
"ZFIN:ZDB-MRPHLNO-123456-1"
],
"reference_curies": [
"PMID:19648295"
]
Expand Down

0 comments on commit 862cff5

Please sign in to comment.